[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2018-12-13 Thread njs at pobox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #13 from Nathaniel J. Smith  ---
Unfortunately, AFAICT, the omp_pause_resource APIs don't actually solve the
problem.

They're fine and useful if you have a single piece of code that wants to use
both omp and fork(). But, this was never a *huge* issue, because if you knew
you were using omp then you also knew that fork() wasn't going to work, and
could use some workaround.

The really nasty case is when the code using omp and the code using fork() are
in entirely different pieces of code, that don't know about each other (e.g.,
different shared libraries). That's the motivating use case for this patch. I
don't see how the omp_pause_resource APIs help with this. The best you could do
is to set up a pre-fork hook to call omp_pause_resource_all, but that would be
equivalent to my first patch that got rejected for breaking standards-compliant
programs.

(In practice, the effect of this issue has been that the whole scientific
python ecosystem simply avoids omp where-ever possible. That's why no one's
been nagging about this patch. It still seems like a shame to me that all this
work goes into the omp runtime and then it gets ruled out for so many users for
such a trivial thing, but so it goes I guess.)

[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2018-12-13 Thread jeff.science at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #12 from Jeff Hammond  ---
I apologize for stupidly misinterpreting the automated message as something
else. My email client did not show the true sender address.

[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2018-12-13 Thread jeff.science at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #11 from Jeff Hammond  ---
Thanks for sharing. I’ve seen that bug or closely related ones before. This
is definitely one of the motivating examples for this feature set.

The only question is how many years before it gets adopted (which requires
everybody to use the latest OpenMP implementations, of course)...

Jeff

On Wed, Dec 12, 2018 at 7:21 PM jakub at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035
>
> --- Comment #10 from Jakub Jelinek  ---
> GCC 9 has omp_pause_resource and omp_pause_resource_all APIs as required by
> OpenMP 5.0 for this.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2018-12-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #10 from Jakub Jelinek  ---
GCC 9 has omp_pause_resource and omp_pause_resource_all APIs as required by
OpenMP 5.0 for this.

[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2017-11-17 Thread pouar at pouar dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

pouar at pouar dot net changed:

   What|Removed |Added

 CC||pouar at pouar dot net

--- Comment #9 from pouar at pouar dot net ---
Any news on this? as I would like to use OpenMP with BLAS but I'm currently
stuck with pthreads because of this.

[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-04-05 Thread larsmans at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

larsmans at gmail dot com changed:

   What|Removed |Added

 CC||larsmans at gmail dot com

--- Comment #4 from larsmans at gmail dot com ---
Nathaniel, could you apply the cosmetic changes suggested at
http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00860.html? I'd hate to see this
patch go to waste.


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-04-05 Thread njs at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

Nathaniel J. Smith njs at pobox dot com changed:

   What|Removed |Added

  Attachment #32019|0   |1
is obsolete||

--- Comment #5 from Nathaniel J. Smith njs at pobox dot com ---
Created attachment 32548
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32548action=edit
patch to make openmp - quiesce - fork - openmp work (updated)

Updated based on feedback from Richard Henderson


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-04-05 Thread njs at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #6 from Nathaniel J. Smith njs at pobox dot com ---
(In reply to larsmans from comment #4)
 Nathaniel, could you apply the cosmetic changes suggested at
 http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00860.html? I'd hate to see
 this patch go to waste.

If you look at that thread then you'll see I did resend the patch with those
fixes -- I've just attached the updated patch to this bug report as well,
thanks for the catch.

My guess is that no-one will pay much attention to this until gcc re-enters
phase 1 in any case.


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-04-05 Thread larsmans at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #7 from larsmans at gmail dot com ---
Phase 1? (Not familiar with the GCC dev cycle.)


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-04-05 Thread njs at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #8 from Nathaniel J. Smith njs at pobox dot com ---
(In reply to larsmans from comment #7)
 Phase 1? (Not familiar with the GCC dev cycle.)

Sorry, meant stage 1. GCC trunk is (IIUC) currently in RC-bug-fixes-only
pre-release freeze mode.

http://gcc.gnu.org/develop.html


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-02-13 Thread gcc-bugs at warnes dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

Gregory R. Warnes gcc-bugs at warnes dot net changed:

   What|Removed |Added

 CC||gcc-bugs at warnes dot net

--- Comment #3 from Gregory R. Warnes gcc-bugs at warnes dot net ---
+1   

I've just spent several days tracking down the cause of the mysterious hangs in
processes forked by R (http://www.r-project.org).   A resolution of this issue
would be very helpful.


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-02-12 Thread njs at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

--- Comment #2 from Nathaniel J. Smith njs at pobox dot com ---
Good point -- sent.

http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00813.html


[Bug libgomp/60035] [PATCH] make it possible to use OMP on both sides of a fork (without violating standard)

2014-02-06 Thread conradsand.arma at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035

Conrad conradsand.arma at gmail dot com changed:

   What|Removed |Added

 CC||conradsand.arma at gmail dot 
com

--- Comment #1 from Conrad conradsand.arma at gmail dot com ---
It would be a good idea to post this to the gcc-patches mailing list.

See http://gcc.gnu.org/lists.html