Open GoogleCodeExporter opened 9 years ago
Support for C11 atomics in compilers is quite new. Do any vendor compilers
support it yet?
Original comment by jeff.science@gmail.com
on 14 Dec 2014 at 4:35
Really not following why you would want to avoid addressing C11 threading by
recommending that UPC implementations omit it. People already use OpenMP,
pthreads, etc within UPC threads for implementations where UPC threads are
processes, but they are forced to do so without any guidance whatsoever from
any spec as to how they interact. It would be nice to solve that problem and
not ignore it just because it is perhaps more inconvenient for thread-oriented
implementations of UPC. And yeah I know the spec doesn't say how UPC threads
are implemented, but UPC thread vs C11 thread interaction will eventually be a
practical issue for users because it already is for OpenMP.
Original comment by johnson....@gmail.com
on 14 Dec 2014 at 4:46
I'm a huge fan of thread interoperability discussions because it's a huge
problem, but I am curious for whom C11 threads are essential, given that they
don't appear to do anything that Pthreads can't today.
Original comment by jeff.science@gmail.com
on 14 Dec 2014 at 4:52
Jeff -- no idea who uses C11 threads. I was referring to use of OpenMP in UPC
codes being an issue for users.
Original comment by johnson....@gmail.com
on 14 Dec 2014 at 2:34
Re: "Support for C11 atomics in compilers is quite new. Do any vendor
compilers support it yet?"
This page summarizes GCC support for C11 in GCC 4.8 (Released May 31, 2013).
It looks like C11 atomics are fully implemented. GCC 4.8 is currently
available on most Linux distributions.
https://gcc.gnu.org/gcc-4.8/cxx0x_status.html
Original comment by gary.funck
on 14 Dec 2014 at 8:20
Gary:
As far as I can tell, GCC 4.9 is the _only_ compiler that supports C11 atomics
and only it and very recent clang even attempt to support the full set of
required features (which does not include atomics or threads).
GCC had the first implementation and works as of 4.9 (on the other hand,
threads.h is missing), per https://gcc.gnu.org/wiki/C11Status. Your citation
is for C++11, for which atomics support happened earlier.
Clang/LLVM claims to support it online but it does not work as of version 3.5
(stdatomic.h is missing) on my laptop.
IBM claims to support C11 now
(http://www.ibm.com/developerworks/rational/library/support-iso-c11/) but if
it's anything like their "support" of other novel language features in C/C++,
then it's not going to be functional (in the sense of correct code generation
and non-erroneous termination of the compiler execution) for a while :-)
According to
https://software.intel.com/en-us/articles/c11-support-in-intel-c-compiler,
Intel supports almost none of C11 in the latest release.
As of version 8.3.4, Cray Compiler Environment says it doesn't support C11 via
__STDC_VERSION__ and I am inclined to believe it.
The only reference to PGI support for C11 is in a press release
(http://www.pgroup.com/about/news.htm) and it is indicated to be something for
the future as part of OpenPOWER support.
At the rate things are going, I wouldn't be surprised if it's 2016 before C11
is fully supported by multiple HPC vendors.
Original comment by jeff.science@gmail.com
on 14 Dec 2014 at 10:16
Jeff, nice summary. I tend to agree with your timeframe. There seems to be
higher demand / interest in C++11 than C11 and therefore feel that widespread
C11 support will lag behind.
Original comment by johnson....@gmail.com
on 14 Dec 2014 at 10:25
Maybe we should make C++11 the base language for UPC? :-)
(I am well-aware of UPC++ and Coarray C++, so no one should bother with a
serious reply to this question.)
Original comment by jeff.science@gmail.com
on 14 Dec 2014 at 10:37
Jeff, thanks for the correction/clarification re: C11 atomic support in GCC.
Original comment by gary.funck
on 14 Dec 2014 at 10:50
Original issue reported on code.google.com by
danbonachea
on 14 Sep 2012 at 6:33