Does sisl fork on import? Warning with mpi4py
See original GitHub issueSo I occasionally write scripts that are simple to parallelize with mpi4py. What I have discovered is that I occasionally get MPI warnings when importing sisl like so:
from mpi4py import MPI
import sisl
Which gives the following MPI warning:
--------------------------------------------------------------------------
A process has executed an operation involving a call to the
"fork()" system call to create a child process. Open MPI is currently
operating in a condition that could result in memory corruption or
other system errors; your job may hang, crash, or produce silent
data corruption. The use of fork() (or system() or other calls that
create child processes) is strongly discouraged.
The process that invoked fork was:
Local host: [[22936,1],0] (PID 24519)
If you are *absolutely sure* that your application will successfully
and correctly survive a call to fork(), you may disable this warning
by setting the mpi_warn_on_fork MCA parameter to 0.
--------------------------------------------------------------------------
However, the following two versions don’t result in the warning:
import mpi4py
import sisl
import sisl
from mpi4py import MPI
Also importing other libraries doesn’t seem to trigger the warning, only sisl.
I can’t really figure out why it occurs. It doesn’t stop the script from executing, but I still think it would be nice if it could be avoided regardless of import order.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Importing h5py before mpi4py causes OpenMPI warnings #1079
A process has executed an operation involving a call to the "fork()" system call to create a child process. Open MPI is currently...
Read more >Received warning about fork incompatible with MPI. In what ...
I am using python2.7 multiprocessing together with mpi4py for my calculation and I received warning on fork being used and is not supported...
Read more >mpi4py.futures — MPI for Python 3.1.4 documentation
This package provides a high-level interface for asynchronously executing callables on a pool of worker processes using MPI for inter-process communication.
Read more >Tips and FAQs — Chainer 7.8.0 documentation
This is because MultiprocessIterator creates child processes by the fork system call, which has incompatibilities with the design of MPI and InfiniBand.
Read more >[R-sig-hpc] what causes this fork warning from openmpi
An MPI process has executed an operation involving a call to the "fork()" system call to create a child process. Open MPI is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
See here https://github.com/h5py/h5py/issues/1079 not only sisl.
I think I will close my issue here, both tqdm and h5py have solutions in their pipelines and it’s not relevant with OpenMPI 4 anyway.