Skip to content

Commit

Permalink
Added a synchronize call after memset int the devMemset wrappers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce J Palmer committed Jul 19, 2023
1 parent c68aa88 commit 1fb7157
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions comex/src-mpi-pr/dev_utils.cu
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ void deviceMemset(void *ptr, int val, size_t bytes)
printf("p[%d] cudaMemset ptr: %p bytes: %d msg: %s\n",rank,ptr,bytes,msg);
MPI_Wrapper_abort(err);
}
cudaDeviceSynchronize();
}

__global__ void iaxpy_kernel(int *dst, const int *src, int scale, int n)
Expand Down
1 change: 1 addition & 0 deletions comex/src-mpi-pr/dev_utils_hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ void deviceMemset(void *ptr, int val, size_t bytes)
printf("p[%d] hipMemset ptr: %p bytes: %zu msg: %s\n",rank,ptr,bytes,msg);
MPI_Wrapper_abort(err);
}
hipDeviceSynchronize();
}

__global__ void iaxpy_kernel(int *dst, const int *src, int scale, int n)
Expand Down

0 comments on commit 1fb7157

Please sign in to comment.