ompi
ompi copied to clipboard
MPI-4.0: Mandatory "mpi_size" info key from Session processors sets.
Please review MPI-4.0, pp 503, lines 43-44, quoted below:
A process set caches key/value tuples that are accessible to the application via an MPI_Info object. The "mpi_size" key is mandatory for all process sets.
Next take a look at this two test cases from mpi4py test suite.
These two test cases are currently failing the following way:
FAIL: testSessionSELF (test_session.TestSession)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/dalcinl/Devel/mpi4py/test/test_session.py", line 54, in testSessionSELF
self.assertEqual(info.Get("mpi_size"), "1")
AssertionError: None != '1'
FAIL: testSessionWORLD (test_session.TestSession)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/dalcinl/Devel/mpi4py/test/test_session.py", line 68, in testSessionWORLD
self.assertEqual(info.Get("mpi_size"), str(size))
AssertionError: None != '1'
Looks like the Info
object returned by MPI_Session_get_pset_info()
does not have the mandatory "mpi_size"
key/value pair set.
Clarification: In mpi4py, info.Get(key)
returns None
if the key/value pair is not set in the Info
object.
@hppritcha You may want to look at this one.
we forgot to update the key string when this was changed in the sessions proposal.
closed via #10637 and #10650
@hppritcha Unfortunately, It is not working as expected:
Reproducer
from mpi4py import MPI
session = MPI.Session.Init()
info = session.Get_pset_info("mpi://SELF")
print(info.Get("mpi_size"))
info.Free()
info = session.Get_pset_info("mpi://WORLD")
print(info.Get("mpi_size"))
info.Free()
session.Finalize()
Output
$ mpiexec -n 1 python test.py
self size: 0
world size: 0
try with mpi://world
i fixed the process set name parsing in a subsequent PR #10672