MPI_Init and MPI_COMM_WORLD
13 Apr
2022
13 Apr
'22
12:29 p.m.
Hi, Does MPI_COMM_WORLD exist in any sense before MPI_Init is called? In particular, does this code violate the standard? InitializeMyApp(MPI_Comm comm, int argc, char **argv) { int initialized; MPI_Initialized(&initialized); if (!initialized) MPI_Init(&argc, &argv); /* call some function that uses comm */ } int main(int argc, char **argv) { MPI_Comm comm = MPI_COMM_WORLD; InitializeMyApp(comm, argc, argv); : } My instinct is that this is wrong, but I would like to be sure before I complain about it. It appears to work with some existing implementations, but it looks sketchy to me. Bruce
1560
Age (days ago)
1560
Last active (days ago)
0 comments
1 participants
participants (1)
-
Palmer, Bruce J