[mpich-discuss] How to determine if a program is not started with mpiexec

Jeff Hammond jhammond at alcf.anl.gov
Fri Oct 28 15:06:27 CDT 2011


Shouldn't the MPI_UNIVERSE_SIZE attribute of MPI_COMM_WORLD provide a
useful way to check if MPI_COMM_SPAWN can be used to start new
processes?

See the very last bullet of MPI 2.2 Section 10.2.2 for the text to
which I refer.

Jeff

On Fri, Oct 28, 2011 at 1:25 PM, Darius Buntinas <buntinas at mcs.anl.gov> wrote:
>
> On Oct 28, 2011, at 1:01 PM, Jonathan Bishop wrote:
>
>> Hi,
>>
>> I would like to be able to detect when a program is not started with mpiexec. This is to prevent MPI_Comm_spawn from failing.
>
> There's no portable way to determine if it's been started with mpiexec.  You could look for environment variables set by mpiexec.  A portable way would be to set the error handler on a communicator to MPI_ERRORS_RETURN, then try to do a spawn and check the return value.
>
>> Or is there a way to make MPI_Comm_spawn work in the case where a program is simply run by running its exec?
>
> This depends on the MPI implementation, but currently MPICH doesn't support this.
>
> -d
>
>
>> Jon
>>
>>
>> _______________________________________________
>> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
>> To manage subscription options or unsubscribe:
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>



-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/index.php/User:Jhammond


More information about the mpich-discuss mailing list