This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: OpenMP and fork
- From: Ian Lance Taylor <iant at google dot com>
- To: Pierre LÃonard <pierre dot leonard at jouy dot inra dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 08 Aug 2011 10:40:35 -0700
- Subject: Re: OpenMP and fork
- References: <4E3FAE3C.3000903@jouy.inra.fr>
Pierre LÃonard <pierre.leonard@jouy.inra.fr> writes:
> I work with openMP (gcc 4.5.1) and use the fork unix system call in
> order to manage the different states of the computation. Unfortunelty
> openmp don't work after a fork.
>
> I have found a document : http://bisqwit.iki.fi/story/howto/openmp/
> that explain that the gnu gcc does not allow fork and openmp.
>
>
> So my question : is there a roadmap for correction of that problem ?
It's really hard to use fork with a threaded program on Unix. The two
different ideas do not play well together. I'm not aware of any plans
to make the specific case of OpenMP work better when using fork.
Ian