From: Christian Heinrich Date: Tue, 16 Jan 2018 18:02:04 +0000 (+0100) Subject: [SMPI] Added 2 FIXME's for PMPI_Is_thread_main() X-Git-Tag: v3.19~325 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3e728d1aca22af1ddb024f5268012531bfeafbb0 [SMPI] Added 2 FIXME's for PMPI_Is_thread_main() --- diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index 52dcf73c97..c8129b9195 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -104,10 +104,13 @@ int PMPI_Query_thread(int *provided) int PMPI_Is_thread_main(int *flag) { + // FIXME: The MPI standard seems to say that fatal errors need to be triggered + // if MPI has been finalized or not yet been initialized if (flag == nullptr) { return MPI_ERR_ARG; } else { - *flag = smpi_process()->index() == 0; + *flag = smpi_process()->index() == 0; // FIXME: I don't think this is correct: This just returns true if the process ID is 1, + // regardless of whether this process called MPI_Thread_Init() or not. return MPI_SUCCESS; } }