Non-Blocking MPI_Comm_Spawn

Non-Blocking MPI_Comm_Spawn

Florentino S.'s picture

Hello,

I'm currently trying to do a MPI_Comm_Spawn of a "non-MPI" application which its launched via a script (well, its an MPI application which handles the connection by itselfr).

But my parent process is blocking on MPI_Comm_Spawn call, i guess that's because my script won't do any MPI_Init.

Is there a way to configure MPI_Comm_Spawn so it doesn't block? (or doesn't expect MPI_Init, like the ompi_non_mpi in open-mpi MPI_Info structure which it's passed to MPI_Comm_Spawn).

I can't launch the MPI application directly (ok, i maybe could use a dummy process instead of a script, but i would prefer a script if possible)

Thanks,

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
James Tullos (Intel)'s picture

Hi Florentino,

I don't think we have that capability, I'll check. If you are launching a separate program that connects in a different way, I would recommend launching with a system call rather than MPI_Comm_spawn, as the purpose of MPI_Comm_spawn is to launch a new process group that automatically joins with the existing one.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

Florentino S.'s picture

Yeah you are right, such an obvious solution and i didn't realise about it.

I'm pretty sure that will work, in case it doesn't i'll update again.

Thanks,

James Tullos (Intel)'s picture

Hi Florentino,

One additional point of information. MPI_Comm_spawn cannot be non-blocking, according to the standard.

MPI_COMM_SPAWN is collective over comm, and also may not return until MPI_INIT has been called in the children.  Similarly, MPI_INIT in the children may not return until all parents have called MPI_COMM_SPAWN.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

Florentino S.'s picture

Thanks for your previous answer,

I didn't see that line in the standard, implementation looks fine according to that, at the end i managed to do a workaround launching scripts+exec (i don't know why it was not working before i opened this forum).

But i have a problem, i couldn't find any documentation on MPI_COMM_SPAWN on intel docs/MPI_Comm_Spawn man about the "info" ( MPI_Info info, fourth parameter of the call) keys supported by Intel MPI. In MPI_Comm_spawn function, any hints? All the ones which the standard suggests can be supported are supported?/any extra one?.
http://www.mpi-forum.org/docs/mpi-3.0/mpi30-report.pdf / http://www.mpi-forum.org/docs/mpi-20-html/node97.htm#Node97

I'm particullary interested in launching the same process multiple times and on multiple hosts, without parsing the hostlist manually and using spawn multiple, but if not possible with a "simple" spawn i'll have to do it.

Thanks,

James Tullos (Intel)'s picture

Hi Florentino,

I'm checking with our developers for details.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools

Login to leave a comment.