Skip to content
Snippets Groups Projects
Commit 42be16a6 authored by Andreas Herten's avatar Andreas Herten
Browse files

Implement TODOs

parent 779b2f1e
Branches
No related tags found
No related merge requests found
......@@ -24,8 +24,13 @@ int main(int argc, char** argv){
const char *payload = "world!";
// TODO: Implement the MPI_Send call to send the six characters of "payload" to rank 1
if (rank == 0) {
#ifdef SOLUTION
MPI_Send(payload, 6, MPI_CHAR, 1, tag, MPI_COMM_WORLD);
#else
MPI_Send();
#endif
}
printf("\n");
......
......@@ -51,8 +51,13 @@ int main(int argc, char** argv){
CUDA_RT_CALL( cudaPeekAtLastError() );
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
if (rank == 1) {
#ifdef SOLUTION
MPI_Recv(d_payload, 6, MPI_CHAR, 0, tag, MPI_COMM_WORLD, &stat);
#else
MPI_Recv();
#endif
}
hello<<<1, 1>>>(d_payload);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment