System(), popen(), fork() and OpenMPI
From Gerris
When running GfsView (but bizarelly not Gerris?) linked with OpenMPI, one may get the following warning
An MPI 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 MPI 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: babbage2.lmm.jussieu.fr (PID 7545) MPI_COMM_WORLD rank: 0 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.
This is a serious warning which is due (according to the OpenMPI FAQ) to the partial/lack of support for the fork() system call within the OpenFabrics/OpenIB software stack used to deal with InfiniBand and iWARP networks.
Gerris needs to call system() in order to compile the code included in GfsFunctions (and also when using GfsEventScript).
You can check if your version of the OpenFabrics/OpenIB network stack supports fork() using the commmand:
% mpi_info --param btl all | grep have_fork_support MCA btl: information "btl_openib_have_fork_support" (value: "1", data source: default value)