Hi there,
I have a MPI application, say p1.exe, compiled with command,
mpiifort p1.f90 /Od /Qopenmp /link
The program receives a parameter from command line in runtime, p1.exe SRN:n. When n=1, the MPI is initiated by
CALL MPI_INIT(I)
CALL MPI_COMM_RANK(MPI_COMM_WORLD, ThreadID, I)
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NumThreads, I)
Otherwise, MPI is NOT initiated and NOT used.
Now I have a 2nd MPI application which always initiates and uses MPI. The line of code in p2.f90 that calls p1.exe is
call system("p1.exe SRN:0")
However, this does not work. When I run p2.exe, I got the error messages
PMI_ConnectToHost failed: unable to post a connect to ...
MPIDU_Sock_post_connect(1200): unable to connect to...
It seems to me that MPI is still invoked in P1.exe and therefore there is a clash of MPI between P1 and P2. This is weird as no MPI is initiated at runtime when n is set to 0.
When P1.f90 is compiled without MPI (e.g. ifort p1.f90), then it works.
Any help?