[Mpi-forum] Discussion points from the MPI-<next> discussion today

Jed Brown jedbrown at mcs.anl.gov
Fri Sep 21 16:02:07 CDT 2012


Perhaps he is referring to C99 7.14.1.1.5

"If the signal occurs other than as the result of calling the abort or
raise function, the behavior is undefined if the signal handler refers to
any object with static storage duration other than by assigning a value to
an object declared as volatile sig_atomic_t, ..."

The same part of C11 is worded as

"If the signal occurs other than as the result of calling the abort or
raise function, the behavior is undefined if the signal handler refers to
any object with static or thread storage duration that is not a lock-free
atomic object other than by assigning a value to an object declared as
volatile sig_atomic_t"

If a reduction, buffer copy, or similar is occurring inside a signal
handler, it's violating the letter of the standard. As a practical matter,
it can be made to work with careful attention to memory barriers.

On Fri, Sep 21, 2012 at 3:24 PM, Jeff Hammond <jhammond at alcf.anl.gov> wrote:

> Why can't you just be explicit and say what the problem is?
>
> Just show us some code that is compliant with both MPI-3.0 and C99
> that does not work.
>
> Jeff
>
> On Fri, Sep 21, 2012 at 3:15 PM, N.M. Maclaren <nmm1 at cam.ac.uk> wrote:
> > On Sep 21 2012, Jeff Hammond wrote:
> >>
> >>
> >> Can you send me a link to a page that describes the C89 memory model?
> >> It would help me to write better C+Pthread code if I had a memory
> >> model to rely upon instead of nonportable inline assembly.
> >
> >
> > It's there in the standard.  In C99, which is more readily accessible
> > and very similar to C90, the relevant wording is mainly in 5.1.2.3,
> > 6.5 and 6.5.2.2.
> >
> >
> >
> > Regards,
> > Nick Maclaren.
> >
> > _______________________________________________
> > mpi-forum mailing list
> > mpi-forum at lists.mpi-forum.org
> > http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
>
>
>
> --
> Jeff Hammond
> Argonne Leadership Computing Facility
> University of Chicago Computation Institute
> jhammond at alcf.anl.gov / (630) 252-5381
> http://www.linkedin.com/in/jeffhammond
> https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20120921/6bb8b636/attachment-0001.html>


More information about the mpi-forum mailing list