#914: Don't use fork() -----------------------------------+---------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: Keywords: | -----------------------------------+---------------------------------------- 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.
#914: Don't use fork() ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by knarf):
Which thorn is this ticket about?
#914: Don't use fork() ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: defect | Status: new Priority: major | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by eschnett):
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.
#914: Don't use fork() ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+--------------------------------------- Changes (by knarf):
* priority: major => minor * type: defect => enhancement
Comment:
A quick grep over the ET doesn't reveal any usage of fork, except in Formaline - but there it is disabled by default.
#914: Don't use fork() ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by knarf):
Maybe this could be an entry for #831?
#914: Don't use fork() ------------------------------------+--------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: ------------------------------------+---------------------------------------
Comment (by rhaas):
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).
trac@lists.einsteintoolkit.org