Skip to content

Commit bed909c

Browse files
committed
Read the info key mpi_initial_errhandler from spawn/spawn_multiple
Signed-off-by: Aurélien Bouteiller <bouteill@icl.utk.edu> Use the same env to transmit the initial error handler to spawnees Signed-off-by: Aurelien Bouteiller <bouteill@icl.utk.edu>
1 parent 83d0f92 commit bed909c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ompi/dpm/dpm.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
782782
int flag=0;
783783
char cwd[OPAL_PATH_MAX];
784784
char host[OPAL_MAX_INFO_VAL]; /*** should define OMPI_HOST_MAX ***/
785+
char init_errh[OPAL_MAX_INFO_VAL];
785786
char prefix[OPAL_MAX_INFO_VAL];
786787
char stdin_target[OPAL_MAX_INFO_VAL];
787788
char params[OPAL_MAX_INFO_VAL];
@@ -814,6 +815,7 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
814815
- "file": filename, where additional information is provided.
815816
- "soft": see page 92 of MPI-2.
816817
- "host": desired host where to spawn the processes
818+
- "mpi_initial_errhandler": the error handler attached to predefined communicators.
817819
Non-standard keys:
818820
- "hostfile": hostfile containing hosts where procs are
819821
to be spawned
@@ -968,6 +970,15 @@ int ompi_dpm_spawn(int count, const char *array_of_commands[],
968970
}
969971
#endif
970972

973+
/* check for 'mpi_initial_errhandler' */
974+
ompi_info_get (array_of_info[i], "mpi_initial_errhandler", sizeof(init_errh) - 1, init_errh, &flag);
975+
if ( flag ) {
976+
/* this is set as an environment because it must be available
977+
* before pmix_init */
978+
opal_setenv("OMPI_MCA_mpi_initial_errhandler", init_errh, true, &app->env);
979+
continue;
980+
}
981+
971982
/* 'path', 'arch', 'file', 'soft' -- to be implemented */
972983

973984
/* non-standard keys

0 commit comments

Comments
 (0)