[mpich-discuss] How to determine if a program is not started with mpiexec
Jeff Hammond
jhammond at alcf.anl.gov
Fri Oct 28 15:33:40 CDT 2011
more importantly, what is UNIVERSE_SIZE when you launch a.out without mpiexec?
jeff
On Fri, Oct 28, 2011 at 3:32 PM, James Dinan <dinan at mcs.anl.gov> wrote:
> That's interesting. The example in 10.3.5 also suggests that UNIVERSE_SIZE
> should be used for this purpose. I wrote a little test that suggests the
> value may not be helpful:
>
> $ mpiexec -n 2 ./a.out
> 0: UNIVERSE_SIZE = 1
> 1: UNIVERSE_SIZE = 1
>
> When run with the MPICH2 trunk on my 4-core laptop.
>
> ~Jim.
>
> On 10/28/11 3:06 PM, Jeff Hammond wrote:
>>
>> 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
>>>
>>
>>
>>
>
> _______________________________________________
> 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