Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI_Init
From: Ralph Castain (rhc_at_[hidden])
Date: 2012-08-28 22:49:51


On Aug 28, 2012, at 6:47 PM, Tony Raymond <traymond_at_[hidden]> wrote:

> Hi Ralph,
>
> Thanks for taking care of this so quick!
>
> Does this mean that MPI_Init will leave the SIGCHLD handler alone?

Yes

> Should it be fine to set the handler as I did in the current version of MPI?

Yes - no harm done either way, but we shouldn't be messing with the handler (and didn't realize we were).

>
> Thanks,
> Tony
> ________________________________________
> From: users-bounces_at_[hidden] [users-bounces_at_[hidden]] On Behalf Of Ralph Castain [rhc_at_[hidden]]
> Sent: Tuesday, August 28, 2012 2:40 PM
> To: Open MPI Users
> Subject: Re: [OMPI users] MPI_Init
>
> Okay, I fixed this on our trunk - I'll post it for transfer to the 1.7 and 1.6 series in their next releases.
>
> Thanks!
>
> On Aug 28, 2012, at 2:27 PM, Ralph Castain <rhc_at_[hidden]> wrote:
>
>> Oh crud - yes we do. Checking on it...
>>
>> On Aug 28, 2012, at 2:23 PM, Ralph Castain <rhc_at_[hidden]> wrote:
>>
>>> Glancing at the code, I don't see anywhere that we trap SIGCHLD outside of mpirun and the orte daemons - certainly not inside an MPI app. What version of OMPI are you using?
>>>
>>> On Aug 28, 2012, at 2:06 PM, Tony Raymond <traymond_at_[hidden]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have an application that uses openMPI and creates some child processes using fork(). I've been trying to catch SIGCHLD in order to check the exit status of these processes so that the program will exit if a child errors out.
>>>>
>>>> I've found out that if I set the SIGCHLD handler before calling MPI_Init, MPI_Init sets the SIGCHLD handler so that my application appears to ignore SIGCHLD, but if I set my handler after MPI_Init, the application handles SIGCHLD appropriately.
>>>>
>>>> I'm wondering if there are any problems that could come up by changing the SIGCHLD handler, and why MPI_Init modifies the SIGCHLD handler in the first place.
>>>>
>>>> Thanks,
>>>> Tony
>>>> _______________________________________________
>>>> users mailing list
>>>> users_at_[hidden]
>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>
>>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users