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

James Dinan dinan at mcs.anl.gov
Fri Oct 28 15:38:06 CDT 2011


AFAICT, this currently does not work.  It looks like there is an issue 
with mpiexec when you call MPI_Comm_get_attr() after launching the 
program in this way.  I passed the bug along to our mpiexec expert.

  ~Jim.

On 10/28/11 3:33 PM, Jeff Hammond wrote:
> 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
>>
>>
>
>
>


More information about the mpich-discuss mailing list