public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/40190] DATE_AND_TIME returns GMT hour sometimes with OpenMP
Date: Tue, 19 May 2009 09:11:00 -0000	[thread overview]
Message-ID: <20090519091129.18428.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40190-14710@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from dfranke at gcc dot gnu dot org  2009-05-19 09:11 -------
(In reply to comment #3)
> HJL is right, we should use the _r functions if available, if not we must
> protect the calls with a mutex.

Janne, if mutexes are added, could you also add a note to the docs of that
these function(s) may be a serialization point in OMP applications? Something
similar to RANDOM_NUMBER:

"Please note, this RNG is thread safe if used within OpenMP directives, i.e.,
its state will be consistent while called from multiple threads. However, the
KISS generator does not create random numbers in parallel from multiple
sources, but in sequence from a single source. If an OpenMP-enabled application
heavily relies on random numbers, one should consider employing a dedicated
parallel random number generator instead."

Thanks.

     Daniel


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40190


  parent reply	other threads:[~2009-05-19  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18 19:52 [Bug fortran/40190] New: " longb at cray dot com
2009-05-18 21:12 ` [Bug fortran/40190] " burnus at gcc dot gnu dot org
2009-05-18 22:11 ` [Bug libfortran/40190] " hjl dot tools at gmail dot com
2009-05-19  6:42 ` jb at gcc dot gnu dot org
2009-05-19  9:11 ` dfranke at gcc dot gnu dot org [this message]
2009-05-19 17:48 ` hjl dot tools at gmail dot com
2009-05-29 21:04 ` jb at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090519091129.18428.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).