Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream_df_cholesky_peek: Guarantee data is copied back to shared memory #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions examples/cholesky/stream_df_cholesky_peek.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,22 +328,15 @@ void create_terminal_task(int id_x, int id_y)
int token;

if(id_x == id_y) {
if(id_x == ntiles-1) {
#pragma omp task peek(sdpotrf_ref[IDX_DPOTRF(id_x)] >> in[T*T]) \
output(sfinal_ref[0] << token)
{
copy_block_to_global(in, id_x, id_y);
debug_printf("Terminal Task %d, %d\n", id_x, id_y);
}
} else {
#pragma omp task peek(sdpotrf_ref[IDX_DPOTRF(id_x)] >> in[T*T])
{
copy_block_to_global(in, id_x, id_y);
debug_printf("Terminal Task %d, %d\n", id_x, id_y);
}
#pragma omp task peek(sdpotrf_ref[IDX_DPOTRF(id_x)] >> in[T*T]) \
output(sfinal_ref[0] << token)
{
copy_block_to_global(in, id_x, id_y);
debug_printf("Terminal Task %d, %d\n", id_x, id_y);
}
} else {
#pragma omp task peek(sdtrsm_ref[IDX_DTRSM(id_x, id_y)] >> in[T*T])
#pragma omp task peek(sdtrsm_ref[IDX_DTRSM(id_x, id_y)] >> in[T*T]) \
output(sfinal_ref[0] << token)
{
copy_block_to_global(in, id_x, id_y);
debug_printf("Terminal Task %d, %d\n", id_x, id_y);
Expand Down Expand Up @@ -521,7 +514,7 @@ int main(int argc, char** argv)
int px = 4;
int py = px;

int token;
int token[ntiles*(ntiles+1)/2];
int ntasks = 0;
int nntasks = 0;

Expand Down Expand Up @@ -600,7 +593,7 @@ int main(int argc, char** argv)
}
}

#pragma omp task input(sfinal_ref[0] >> token)
#pragma omp task input(sfinal_ref[0] >> token[ntiles*(ntiles+1)/2])
{
printf("All tasks finished\n");
}
Expand Down