Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Warning on fork() disappears if I use MPI threads!!
From: ananda.mudar_at_[hidden]
Date: 2010-11-29 17:44:15


George

Thanks for the explanation. I am trying to understand the following line
in your mail:

"In fact, any fork done prior to the communication is a non-issue, but
it is difficult to identify. Therefore, we output the warning as soon as
we detect a fork after MPI_Init."

Does it mean that if I have a fork() after the communication (ie;
mpi_send or mpi_receive etc), I may have to relook at a different
implementation to be at safe side? I don't want to suppress the messages
if they result in any corruption later.

How can one be sure that the disabling the warning is ok? Could you
please elaborate on what makes forks vulnerable? May be that will guide
the developers to make an informed decision on whether to disable them
or find another alternative.

 

Thanks

Ananda

------------------ PREVIOUS MESSAGE ---------------------------------

Subject: Re: [OMPI devel] Warning on fork() disappears if I use MPI
threads!!
From: George Bosilca (bosilca_at_[hidden])
Date: 2010-11-29 12:22:15

* Next message: Jeff Squyres: "Re: [OMPI devel] Warning on fork()
disappears if I use MPI threads!!"
<http://www.open-mpi.org/community/lists/devel/2010/11/8730.php>
* Previous message: ananda.mudar_at_[hidden]: "Re: [OMPI devel]
Warning on fork() disappears if I use MPI threads!!"
<http://www.open-mpi.org/community/lists/devel/2010/11/8728.php>
* In reply to: ananda.mudar_at_[hidden]: "Re: [OMPI devel] Warning
on fork() disappears if I use MPI threads!!"
<http://www.open-mpi.org/community/lists/devel/2010/11/8728.php>
* Next in thread: N.M. Maclaren: "Re: [OMPI devel] Warning on
fork() disappears if I use MPI threads!!"
<http://www.open-mpi.org/community/lists/devel/2010/11/8731.php>
* Reply: N.M. Maclaren: "Re: [OMPI devel] Warning on fork()
disappears if I use MPI threads!!"
<http://www.open-mpi.org/community/lists/devel/2010/11/8731.php>

________________________________

If your code doesn't exactly what is described in the code snippet
attached to your previous email, then you can safely ignore the warning.
In fact, any fork done prior to the communication is a non-issue, but it
is difficult to identify. Therefore, we output the warning as soon as we
detect a fork after MPI_Init.

You can find more information about the usage of fork in Open MPI at
http://www.open-mpi.de/faq/?category=tuning#fork-warning

  george.

On Nov 29, 2010, at 12:12 , <ananda.mudar_at_[hidden]> wrote:

> I am posting this question again as it was sent before the long
weekend and didn't see any responses so far. Can anyone please explain
the discrepancy I am observing with the scenario explained in the post
below?
>
> Thanks
> Ananda
> Sent: Tuesday, November 23, 2010 2:24 PM
> To: devel_at_[hidden]
> Subject: Warning on fork() disappears if I use MPI threads!!
>
> Hi
>
> I am running into a very wierd problem.
>
> If I initialize MPI normally ie; with MPI_Init(), and make one of the
MPI process to do "popen()" call, I get the following warning/error
message:
>
> == Message start ===
> An MPI process has executed an operation involving a call to the
> "fork()" system call to create a child process. Open MPI is currently
> operating in a condition that could result in memory corruption or
> other system errors; your MPI job may hang, crash, or produce silent
> data corruption. The use of fork() (or system() or other calls that
> create child processes) is strongly discouraged.
> == Message end ====
>
> However this error message goes away, if I initialize MPI with threads
ie; MPI_Init_thread(). Can anyone explain this discrepancy?
>
> I am giving a snippet of the program that causes this problem:
>
> == Code snippet start ======
> if ( rank == 0) {
> output = popen("ls -l", "r");
> while((c=getc(output))!=EOF)
> printf("%c",c);
> pclose(output);
> }
> == Code snippet end ======
>
> If this is a design constraint, how can I overcome this problem.
>
> Thanks
> Ananda
>
> Ananda B Mudar, PMP
> Senior Technical Architect
> Wipro Technologies
> Ph: 972 765 8093 begin_of_the_skype_highlighting 972 765
8093 end_of_the_skype_highlighting
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
>
> www.wipro.com
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

________________________________

 

Ananda B Mudar, PMP

Senior Technical Architect

Wipro Technologies

Ph: 972 765 8093

ananda.mudar_at_[hidden]

 

Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com