Skip to content
Snippets Groups Projects
Commit 65cb8797 authored by Sebastian Achilles's avatar Sebastian Achilles
Browse files

02 Hello World GPU: update rank number

parent 46dc6757
Branches
Tags
1 merge request!802 Hello World GPU: update rank number
...@@ -51,7 +51,7 @@ int main(int argc, char** argv){ ...@@ -51,7 +51,7 @@ int main(int argc, char** argv){
CUDA_RT_CALL( cudaPeekAtLastError() ); CUDA_RT_CALL( cudaPeekAtLastError() );
CUDA_RT_CALL( cudaDeviceSynchronize() ); CUDA_RT_CALL( cudaDeviceSynchronize() );
// TODO: Implement the MPI_Recv() call to receive the "payload" from rank 1 using directly "d_payload" as the target buffer on the GPU // TODO: Implement the MPI_Recv() call to receive the "payload" from rank 0 using directly "d_payload" as the target buffer on the GPU
if (rank == 1) { if (rank == 1) {
MPI_Recv(d_payload, 6, MPI_CHAR, 0, tag, MPI_COMM_WORLD, &stat); MPI_Recv(d_payload, 6, MPI_CHAR, 0, tag, MPI_COMM_WORLD, &stat);
} }
......
...@@ -51,7 +51,7 @@ int main(int argc, char** argv){ ...@@ -51,7 +51,7 @@ int main(int argc, char** argv){
CUDA_RT_CALL( cudaPeekAtLastError() ); CUDA_RT_CALL( cudaPeekAtLastError() );
CUDA_RT_CALL( cudaDeviceSynchronize() ); CUDA_RT_CALL( cudaDeviceSynchronize() );
// TODO: Implement the MPI_Recv() call to receive the "payload" from rank 1 using directly "d_payload" as the target buffer on the GPU // TODO: Implement the MPI_Recv() call to receive the "payload" from rank 0 using directly "d_payload" as the target buffer on the GPU
if (rank == 1) { if (rank == 1) {
MPI_Recv(); MPI_Recv();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment