Skip to content

mpi4py: overly-verbose and misleading output from MPI_Group_from_session_pset() #13497

@dalcinl

Description

@dalcinl

Trying to create a group from a nonexistent session pset fails with an overly verbose and misleading output message. IMHO, I would argue that nothing should be printed to stdout/stderr, at least if MPI_ERRORS_RETURN is the active error handler. While I would be willing to accept the first part of this extra output, the second part mentions MPI_INIT and is quite misleading.

>>> from mpi4py import MPI >>> s = MPI.Session.Init() >>> s.Create_group("dummy")
-------------------------------------------------------------------------- Your application has invoked an MPI function that is not supported in this environment.  MPI function: MPI_Group_from_session_pset  Reason: PMIx server unreachable -------------------------------------------------------------------------- -------------------------------------------------------------------------- It looks like MPI_INIT failed for some reason; your parallel process is likely to abort. There are many reasons that a parallel process can fail during MPI_INIT; some of which are due to configuration or environment problems. This failure appears to be an internal failure; here's some additional information (which may only be relevant to an Open MPI developer):  PMIx_Query_info() failed  --> Returned "(null)" (52) instead of "Success" (0) -------------------------------------------------------------------------- Traceback (most recent call last):  File "<python-input-2>", line 1, in <module>  s.Create_group("dummy")  ~~~~~~~~~~~~~~^^^^^^^^^  File "src/mpi4py/MPI.src/Session.pyx", line 119, in mpi4py.MPI.Session.Create_group  CHKERR( MPI_Group_from_session_pset( mpi4py.MPI.Exception: MPI_ERR_UNSUPPORTED_OPERATION: operation not supported

The first part of the error is due to not using mpiexec, however the second part shows up even if using mpiexec. In this case I see no justification for this extra misleading output.

$ mpiexec -n 1 python -c 'from mpi4py import MPI; MPI.Session.Init().Create_group("dummy")' -------------------------------------------------------------------------- It looks like MPI_INIT failed for some reason; your parallel process is likely to abort. There are many reasons that a parallel process can fail during MPI_INIT; some of which are due to configuration or environment problems. This failure appears to be an internal failure; here's some additional information (which may only be relevant to an Open MPI developer):  PMIx_Query_info() failed  --> Returned "(null)" (13) instead of "Success" (0) -------------------------------------------------------------------------- Traceback (most recent call last):  File "<string>", line 1, in <module>  from mpi4py import MPI; MPI.Session.Init().Create_group("dummy")  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^  File "src/mpi4py/MPI.src/Session.pyx", line 119, in mpi4py.MPI.Session.Create_group  CHKERR( MPI_Group_from_session_pset( mpi4py.MPI.Exception: MPI_ERR_ARG: invalid argument of some other kind

This is very low hanging fruit and definitely not a serious issue, but maybe something to consider improving if that part of the code is ever refactored or worked on.

cc @hppritcha

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions