Modify

Opened 7 years ago

Last modified 15 months ago

#914 new enhancement

Don't use fork()

Reported by: Erik Schnetter Owned by:
Priority: minor Milestone:
Component: EinsteinToolkit thorn Version:
Keywords: Cc:

Description

It seems that it is in many cases not safe to call fork() in MPI applications. This page <http://www.open-mpi.de/faq/?category=openfabrics#ofa-fork> has some information. The upshot seems to be:

  • In many (most) cases, one can call system() or popen() to execute external processes while waiting for them.
  • It is generally not safe to call fork() to execute a certain task in the background. However, it should be possible to use threads in this case.

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by Frank Löffler

Which thorn is this ticket about?

comment:2 Changed 6 years ago by Erik Schnetter

This is not about a particular thorn. This is about all source code in Cactus thorns that may be running under MPI. We should review the code, and add a note to the documentation, and maybe even report compiler or run-time warnings when fork() is called.

comment:3 Changed 6 years ago by Frank Löffler

Priority: majorminor
Type: defectenhancement

A quick grep over the ET doesn't reveal any usage of fork, except in Formaline - but there it is disabled by default.

comment:4 Changed 6 years ago by Frank Löffler

Maybe this could be an entry for #831?

comment:5 Changed 15 months ago by Roland Haas

I believe fork() is ok. exec() can be a problem and so is doing anything with MPI in the forked() process (including and in particular calling MPI_Finalize).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
Next status will be 'confirmed'.
The owner will be changed from (none) to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.