Commit 5fa3f8fd authored by Antoine Jego's avatar Antoine Jego
Browse files

added super-pruning

parent 192eda52
......@@ -133,12 +133,12 @@ program fstarpu_example_dgemm
write(*,'("mbxnbxkb = ",i5,"x",i5,"x",i5)') mb, nb, kb
write(*,'("B = ",i5)') bs
write(*,'("PxQ = ",i3,"x",i3)') p,q
if (trace) write(*,*) "(T)racing enabled"
if (lflush) write(*,*) "(F)lushing enabled"
if (super_prune) then; write(*,*) "(S)uper-pruning enabled"
else if (prune) then ; write(*,*) "(P)runing enabled"; endif
if (trace) write(*,*) "(T)racing enabled"
if (lflush) write(*,*) "(F)lushing enabled"
if (super_prune) write(*,*) "(S)uper-pruning enabled"
if (prune) write(*,*) "(P)runing enabled"
if (prune_handles) write(*,*) "(H)andles pruning enabled"
if (delay) write (*,*) "(D)elayed handle registration enabled"
if (delay) write(*,*) "(D)elayed handle registration enabled"
write(*,'("========================================")')
end if
ret = fstarpu_mpi_barrier(comm_world)
......@@ -169,12 +169,13 @@ program fstarpu_example_dgemm
A_local = A%blocks(i,l)%owner == comm_rank
B_local = B%blocks(l,j)%owner == comm_rank
C_local = C%blocks(i,j)%owner == comm_rank
if ( (.not.super_prune.or.(C_local.or.l<=q.or.l<=p)).and.&
(.not.prune.or.(A_local.or.B_local.or.C_local))) then
!if (c_local) then; write(*,*) "executing",i,j,l,"with A",c_associated(A%blocks(i,l)%h),&
if ( &
( .not.super_prune.or.(C_local.or.(A_local.and.j<=q).or.(B_local.and.i<=p)) ).and.&
( .not.prune.or.(A_local.or.B_local.or.C_local)) ) then
!if (c_local) then; write(*,*) comm_rank,"] executing",i,j,l,"with A",c_associated(A%blocks(i,l)%h),&
! "with B",c_associated(B%blocks(l,j)%h),&
! "with C",c_associated(C%blocks(i,j)%h)
!else; write(*,*) "inserting",i,j,l,"with A",c_associated(A%blocks(i,l)%h),&
!else; write(*,*) comm_rank,"] inserting",i,j,l,"with A",c_associated(A%blocks(i,l)%h),&
! "with B",c_associated(B%blocks(l,j)%h),&
! "with C",c_associated(C%blocks(i,j)%h)
!endif
......
......@@ -550,7 +550,7 @@ int main(int argc, char *argv[])
if (mpi_thread > -1) printf("- MPI thread support level : %d\n", provided_mpi_thread);
if (!flush) printf("- Flushing disabled\n");
if (super_prune) printf("- Super-Pruning enabled\n");
else if (prune) printf("- Pruning enabled\n");
if (prune) printf("- Pruning enabled\n");
if (prune_handles) printf("- Handle pruning enabled\n");
}
int barrier_ret, trial;
......@@ -594,7 +594,7 @@ int main(int argc, char *argv[])
// TODO : logic might be written more clearly (a/b/c_local may be redundant)
// FIXME (starpu-side) : fortran allows this but not C
// (note : inserting tasks *is* different but it does not feel *that* different
if ((!super_prune || (c_local || b_aisle <= Q || b_aisle <= P )) &&
if ((!super_prune || (c_local || (a_local && b_col <= Q) || (b_local && b_row <= P) )) &&
(!prune || (a_local || b_local || c_local))) {
struct cl_zgemm_args_s *clargs = NULL;
if (C->blocks[b_row*NB+b_col].owner == comm_rank) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment