Skip to content

Commit 644a6be

Browse files
committed
Fixed example's MPI_Bcast call
1 parent 8419064 commit 644a6be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
160160
srand(time(NULL));
161161
id = rand() % 1000000;
162162
}
163-
MPI_Bcast(&id,sizeof(id), MPI_INT, 0, MPI_COMM_WORLD);
163+
MPI_Bcast(&id,1, MPI_INT, 0, MPI_COMM_WORLD);
164164
char name[32];
165165
sprintf(name,"Example_%i",id);
166166
printf("Using name %s\n",name);

0 commit comments

Comments
 (0)