From c55963ac0b6e9e5e88c0e4e6dacdd4ee5b171549 Mon Sep 17 00:00:00 2001 From: Mark Coletti Date: Thu, 5 Nov 2026 17:09:37 -0500 Subject: [PATCH 1/3] Returned --bind-to core for prun --- ipsframework/task_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipsframework/task_manager.py b/ipsframework/task_manager.py index 697fbe34..ae0e9cd8 100644 --- a/ipsframework/task_manager.py +++ b/ipsframework/task_manager.py @@ -453,7 +453,7 @@ def build_launch_cmd( if not mpicmd: raise Exception('Missing %s command in $PATH' % (mpi_binary)) - nproc_flag = '-np' + nproc_flag = '-n' ppn_flag = '-npernode' host_select = '-H' if mpi_binary == 'prun': @@ -483,6 +483,7 @@ def build_launch_cmd( ) if cpp: cmd += f' --map-by slot:PE={cpp}' + cmd += ' --bind-to core' elif smp_node: cmd = ' '.join([mpicmd, nproc_flag, str(nproc)]) else: From 1a92fa47f81dda864b30190316104789791e7b02 Mon Sep 17 00:00:00 2001 From: Mark Coletti Date: Thu, 5 Nov 2026 17:17:58 -0500 Subject: [PATCH 2/3] Added a documentation note regarding possible issues with `mpi4py` being bound to Mpich and not Openmpi --- doc/user_guides/ensembles.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/user_guides/ensembles.rst b/doc/user_guides/ensembles.rst index 72917c51..2d1706d9 100644 --- a/doc/user_guides/ensembles.rst +++ b/doc/user_guides/ensembles.rst @@ -366,6 +366,27 @@ components within each running ensemble instance: (assuming one core per MPI process). For example, two concurrent four-process tasks need a budget of at least eight cores per instance. +.. note:: + + Python MPI tasks must use an ``mpi4py`` installation linked to the MPI + implementation used by the launcher. An ``mpi4py`` package + linked to MPICH can cause every process launched by Open MPI's ``prun`` to + report rank 0 in an ``MPI.COMM_WORLD`` of size 1 even though the user + requested multiple ranks. + + If you encounter this symptom, check the library loaded by the Python + environment used for the task: + + .. code-block:: bash + + python -c 'from mpi4py import MPI; print(MPI.Get_library_version())' + + In the affected environment, rebuilding and reinstalling ``mpi4py`` from + source after loading the ``openmpi`` module and setting + ``MPICC="$(which mpicc)"`` will resolve this issue. Verify that the rebuilt + package reports Open MPI, and rerun a multi-rank task to confirm that its + communicator has the requested size and distinct ranks. + Portal ------ From ee81a65d4b033a72255007050480963dadf789ee Mon Sep 17 00:00:00 2001 From: Mark Coletti Date: Thu, 5 Nov 2026 17:54:50 -0500 Subject: [PATCH 3/3] fix: clarify mpi4py installation requirements for IPS tasks in documentation --- doc/user_guides/ensembles.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/user_guides/ensembles.rst b/doc/user_guides/ensembles.rst index 2d1706d9..ff364441 100644 --- a/doc/user_guides/ensembles.rst +++ b/doc/user_guides/ensembles.rst @@ -368,9 +368,10 @@ components within each running ensemble instance: .. note:: - Python MPI tasks must use an ``mpi4py`` installation linked to the MPI - implementation used by the launcher. An ``mpi4py`` package - linked to MPICH can cause every process launched by Open MPI's ``prun`` to + IPS tasks that call python scripts that use ``mpi4py`` must ensure that ``mpi4py`` package in your + environment is linked to OpenMPI, not MPICH or another MPI + implementation. An ``mpi4py`` package + linked to MPICH can cause every process launched by an IPS component to report rank 0 in an ``MPI.COMM_WORLD`` of size 1 even though the user requested multiple ranks.