I have successfully installed the preCICE adapter for coupling OpenFOAM models to each other, as well as the Python bindings to connect two Python solvers to one another, but have run into issues when attempting to couple an OpenFOAM model with a ‘Pythonic’ solver.
After initializing an OpenFOAM model and a Python model using the attached Allrun script, the following error is output by the Python model (Solid1.log) and the OpenFOAM model waits at the first timestep for initialization of the preCICE coupling to begin.
Open MPI has detected that this process has attempted to initialize
MPI (via MPI_INIT or MPI_INIT_THREAD) more than once. This is
[n2554:72834] *** An error occurred in MPI_Init
[n2554:72834] *** reported by process [4192272385,0]
[n2554:72834] *** on a NULL communicator
[n2554:72834] *** Unknown error
[n2554:72834] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
[n2554:72834] *** and potentially your MPI job)
Seems as though there is a problem with the initialization of MPI by the Python script, but I do not know enough about how the Python bindings initialize their connection to the preCICE driven MPI to understand where the issue is arising from.
Can anyone offer assistance or guidance?
p.s. I have attached all files relevant to the issue to this post.