Skip to content
Snippets Groups Projects
Commit 54ae99ed authored by Chao Zhan's avatar Chao Zhan
Browse files

refactor scatter example

parent efeaf241
Branches
Tags
No related merge requests found
......@@ -31,7 +31,7 @@ int main(int argc, char **argv) {
MPI_Scatter(bigdata, SCATTER_NUM, MPI_INT, localdata, SCATTER_NUM, MPI_INT, 0,
MPI_COMM_WORLD);
printf("Process %d of %d on %s: localdata[10] = {", rank, num_processes, processor_name);
printf("Process %d of %d on %s received: localdata[%d] = {", rank, num_processes, processor_name, SCATTER_NUM);
for (int i = 0; i < SCATTER_NUM; i++) {
printf("%d, ", localdata[i]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment