-
Notifications
You must be signed in to change notification settings - Fork 52
Description
The following mpi4py import on fancylogger is causing python to crash on login nodes (where we don't have a working MPI subsystem):
from mpi4py import MPI
The author of mpi4py suggested a couple of workarounds, the first being to precede the import with:
import mpi4py.rc
mpi4py.rc.initialize = False
This would fix the crash on the login nodes, but I suppose the following call to MPI.COMM_WORLD.Get_rank() would stop working on the compute nodes.
For keeping track of the discussion, I'm also pasting here another proposed solution by the author of mpi4py:
However, you could write your code this way:
from mpi4py import MPI
if MPI.Is_initialized():
rank_id = MPI.COMM_WORLD.Get_rank()
else:
rank_id = 0 # or None, and special case None values elsewhere in the logger code
Here we have some clues on how to fix the problem, however it is not clear to me how we can fix that in a way that it works on both compute and login nodes.
Any ideas?