support pgc++ on ppc64el (summit)
This issue is to track the status of support for PGI (aka Portland Group) compilers on little-endian PowerPC, such as Summit at OLCF.
Below are the errors I see with release 18.4 of the PGI compilers on Summitdev (at OLCF) and today's PR43 branch (which should be very near to the 2018.9 release).
Based on the lack of std::max_align_t
and std::is_trivially_copyable
, I strongly suspect that the main issue is that the install of pgc++ is using the libstdc++ (headers and libs) from the system install of gcc-4.8.5. So, I do not consider this to be a true test of the PGI compiler.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pgc++ -std=c++11 -D_GNU_SOURCE=1 -I/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf3c058964ec8a6af65dca -DNOBS_DISCOVERY -MM -MT x /autofs/nccs-svm1_home1/hargrove/upcxx-subteams/src/upcxx.cpp
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/backend_fwd.hpp", line 65: error:
namespace "std" has no member "max_align_t"
std::size_t alignment = alignof(std::max_align_t));
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/future1.hpp", line 212: error:
invalid storage class for a class member
auto wait(Fn &&progress)
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/future1.hpp", line 212: error:
expected a ")"
auto wait(Fn &&progress)
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/future1.hpp", line 212: error:
member "upcxx::future1<Kind, T...>::Fn" is not a valid class member
template
auto wait(Fn &&progress)
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/future1.hpp", line 214: error:
expected a ";"
-> decltype(this->template result<i>()) {
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/make_future.hpp", line 48: error:
namespace "std" has no member "is_trivially_copyable"
std::is_trivially_copyable,
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/make_future.hpp", line 47: error:
incomplete type is not allowed
upcxx::trait_any<
^
detected during instantiation of class
"upcxx::detail::make_future<T...> [with T=<>]" at line 27
of
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/
a8ea28590b36e6e671cf3c058964ec8a6af65dca/upcxx/future/apply
.hpp"
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/make_future.hpp", line 42: error:
incomplete type is not allowed
upcxx::trait_forall<
^
detected during instantiation of class
"upcxx::detail::make_future<T...> [with T=<>]" at line 27
of
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/
a8ea28590b36e6e671cf3c058964ec8a6af65dca/upcxx/future/apply
.hpp"
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/make_future.hpp", line 41: error:
incomplete type is not allowed
make_future_<
^
detected during instantiation of class
"upcxx::detail::make_future<T...> [with T=<>]" at line 27
of
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/
a8ea28590b36e6e671cf3c058964ec8a6af65dca/upcxx/future/apply
.hpp"
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/apply.hpp", line 27: error: no
instance of function template "upcxx::make_future" matches the
argument list
using return_type = decltype(upcxx::make_future());
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/future/apply.hpp", line 39: error: no
instance of function template "upcxx::make_future" matches the
argument list
using return_type = decltype(upcxx::make_future());
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/lpc.hpp", line 52: error: incomplete type
is not allowed
detail::intru_queue<lpc_base, safety, &lpc_base::intruder> q_;
^
detected during instantiation of class
"upcxx::detail::lpc_inbox<safety> [with
safety=upcxx::detail::intru_queue_safety::mpsc]" at line 35
of
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/
a8ea28590b36e6e671cf3c058964ec8a6af65dca/upcxx/persona.hpp"
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 245: error: namespace
"std" has no member "is_trivially_copyable"
std::is_trivially_copyable<T>::value;
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 245: error: type name
is not allowed
std::is_trivially_copyable<T>::value;
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 245: error: the global
scope has no "value"
std::is_trivially_copyable<T>::value;
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 357: error: namespace
"std" has no member "is_trivially_copyable"
bool is_trivially_copyable = std::is_trivially_copyable<T>::value>
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 357: error: type name
is not allowed
bool is_trivially_copyable = std::is_trivially_copyable<T>::value>
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 357: error: the global
scope has no "value"
bool is_trivially_copyable = std::is_trivially_copyable<T>::value>
bool is_trivially_copyable = std::is_trivially_copyable<T>::value>
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 361: error: a template
argument list is not allowed in a declaration of a primary template
struct packing_opaque<T, /*is_empty=*/true, is_trivially_copyable>:
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 370: error: a template
argument list is not allowed in a declaration of a primary template
struct packing_opaque<T, /*is_empty=*/false, /*is_trivially_copyable=*/true>:
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 379: error: a template
argument list is not allowed in a declaration of a primary template
struct packing_opaque<T, /*is_empty=*/false, /*is_trivially_copyable=*/false>:
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 490: error: identifier
"packing_opaque" is undefined
is_definitely_supported1 && /*false=*/packing_opaque<T>::is_definitely_supported,
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 490: error: type name
is not allowed
is_definitely_supported1 && /*false=*/packing_opaque<T>::is_definitely_supported,
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 489: error: nontype
"upcxx::detail::packing_meta_reflector<is_definitely_supported1,
is_owning1, is_ubound_tight1>::is_definitely_supported [with
is_definitely_supported1=<error-constant>, is_owning1=true,
is_ubound_tight1=true]" is not a type name
packing_meta_reflector<
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 490: error: expected a
";"
is_definitely_supported1 && /*false=*/packing_opaque<T>::is_definitely_supported,
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 514: error: identifier
"packing_opaque" is undefined
decltype(packing_opaque<T>::ubound(ub, mbr, /*skippable=*/std::false_type()))
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 514: error: type name
is not allowed
decltype(packing_opaque<T>::ubound(ub, mbr, /*skippable=*/std::false_type()))
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 514: error: the global
scope has no "ubound"
decltype(packing_opaque<T>::ubound(ub, mbr, /*skippable=*/std::false_type()))
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 674: error:
packing_opaque is not a template
packing_opaque<T> {
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/packing.hpp", line 674: error: not a class
or struct name
packing_opaque<T> {
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/team_fwd.hpp", line 66: error: incomplete
type is not allowed
backend::team_base /* defined by <backend>/runtime_fwd.hpp */ {
^
"/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/.nobs/art/a8ea28590b36e6e671cf
3c058964ec8a6af65dca/upcxx/team_fwd.hpp", line 104: error: identifier
"team_base" is undefined
team_base& base(detail::internal_only) {
^
32 errors detected in the compilation of "/autofs/nccs-svm1_home1/hargrove/upcxx-subteams/src/upcxx.cpp".
Indeed the following simple test confirms the lack of std::max_align_t
:
$ cat q.cc
#include <iostream>
#include <cstddef>
int main()
{
std::cout << alignof(std::max_align_t) << '\n';
}
$ pgc++ -std=c++11 q.cc
"q.cc", line 5: error: namespace "std" has no member "max_align_t"
std::cout << alignof(std::max_align_t) << '\n';
^
"q.cc", line 5: warning: the standard "alignof" operator does not accept an
expression argument (use a type instead)
std::cout << alignof(std::max_align_t) << '\n';
^
1 error detected in the compilation of "q.cc".
Comments (19)
-
reporter -
reporter It may be worth noting that my reading of https://en.cppreference.com/w/cpp/language/auto indicates that use of
auto
for deduction of the return type of a function from its return statement was added in C++14. So, it may be helpful for portability if we moved away from this usage. -
The code in question is using the
auto function -> return type
syntax (number 2) which is C++11 compliant.Based on the text of the error message "invalid storage class for a class member", I suspect the error indicates the compiler lacks even C++11 compliance, since the
auto
type specifier is new in C++11 (and previously was a C++98 storage class specifier).The compiler support table claims that both auto and trailing return type was added in PGI v15, but the PGI documentation for v17 makes it sound like they only added
auto
for variables and not for C++11 trailing return type syntax.Hooray for vendors who claim compliance and cannot even parse the grammar!
-
reporter Thanks, Dan, for correcting my misunderstanding regarding
auto
.I looked at the code a bit more and find that "trailing return type" uses of
auto
both before and after the rejected one passed through the compiler just fine. So, there may be something else about that one usage that is problematic. I did try#undef wait
, but thankfully that was not the problem. -
reporter Ugh!
While
#undef wait
did not help, renaming toWait
made the four errors on lines 212 and 214 vanish.
Also, testing the same compiler version on macOS/x86-64 I see only the latter 3 errors.
So thewait
error was well characterized by Winston Churchill's description of Russia:It is a riddle, wrapped in a mystery, inside an enigma; but perhaps there is a key.
-
How about this hideous workaround:
#if __PGI__ auto wait_pgi_sucks #define wait wait_pgi_sucks #else auto wait #endif .... // exiting function declaration
It's ugly but the workaround only affects the compiler we currently don't support at all..
We should of course report this to PGI.
-
reporter Fairly certain that work-around breaks use of
std::future::wait()
and POSIXwait()
.PGI has released 18.7, but I have only access to <= 18.4 on Summitdev at the moment.
I am not planning to file a report w/ PGI until I've been able to test their latest. -
reporter New results with PGI 18.10.
These are after removing-Wall
from nobsrule.py and removing pgcc blacklist in utils/system-checks.sh.I see the same failure (below) on three platforms:
- macOS Sierra (my laptop)
- Linux/x86-64 (Dirac)
- Linux/ppc64el (Firestone @JLSE)
Note that modifying nobsrule.py to pass
-std=c++14
did not change anything.pgc++ -std=c++14 -D_GNU_SOURCE=1 -I/Users/phargrov/upcxx/.nobs/art/3cfe7acd1a9473aa8078a6d38a20ce89db49e9ec -DNOBS_DISCOVERY -MM -MT x /Users/phargrov/upcxx/src/upcxx.cpp *** Something FAILED! *** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pgc++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/phargrov/upcxx/.nobs/art/3cfe7acd1a9473aa8078a6d38a20ce89db49e9ec -DNOBS_DISCOVERY -MM -MT x /Users/phargrov/upcxx/src/upcxx.cpp "/Users/phargrov/upcxx/.nobs/art/3cfe7acd1a9473aa8078a6d38a20ce89db49e9ec/upcxx /lpc.hpp", line 52: error: incomplete type is not allowed detail::intru_queue<lpc_base, safety, &lpc_base::intruder> q_; ^ detected during instantiation of class "upcxx::detail::lpc_inbox<safety> [with safety=upcxx::detail::intru_queue_safety::mpsc]" at line 35 of "/Users/phargrov/upcxx/.nobs/art/3cfe7acd1a9473aa8078a6d38a 20ce89db49e9ec/upcxx/persona.hpp" "/Users/phargrov/upcxx/.nobs/art/3cfe7acd1a9473aa8078a6d38a20ce89db49e9ec/upcxx /team_fwd.hpp", line 66: error: incomplete type is not allowed backend::team_base /* defined by <backend>/runtime_fwd.hpp */ { ^ "/Users/phargrov/upcxx/.nobs/art/3cfe7acd1a9473aa8078a6d38a20ce89db49e9ec/upcxx /team_fwd.hpp", line 104: error: identifier "team_base" is undefined team_base& base(detail::internal_only) { ^ 3 errors detected in the compilation of "/Users/phargrov/upcxx/src/upcxx.cpp". UPC++ Installation failed. Please report the entire log above to: upcxx@googlegroups.com
-
-
assigned issue to
@jdbachan can you look at this error message?
Note the PGI compiler is installed on dirac (module load pgi), and also on the sierra and high-sierra Macs in /opt/pgi
-
assigned issue to
-
reporter PGI 19.1 was released Jan 31, 2019 and claims "full support for the C+17 [sic] language standard".
Despite that claim, I observe the same failures I reported above with PGI 18.10, using the current tip of develop (d6aa25b).I am not aware of any public installs of PGI 19.1.
My testing was conducted on Summit, but required a private re-install to use g++ 6.4.0 (not the default 4.8.5) for its libstdc++ and associated headers. I can provide instructions to duplicate my install if needed.
It is worth noting that if nothing changes with the system install on Summit, this issue might be a problem for our end-users (but one roadblock at a time). -
reporter Interestingly, forcing the IBM XL compilers on Summit to use g++ 6.4.0 leads to errors a the same places as the complaints from pgc++:
/autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/lpc.hpp:52:66: error: implicit instantiation of undefined template 'upcxx::detail::intru_queue<upcxx::detail::lpc_base, upcxx::detail::intru_queue_safety::mpsc, &upcxx::detail::lpc_base::intruder>' detail::intru_queue<lpc_base, safety, &lpc_base::intruder> q_; ^ /autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/persona.hpp:35:57: note: in instantiation of template class 'upcxx::detail::lpc_inbox<upcxx::detail::intru_queue_safety::mpsc>' requested here detail::lpc_inbox<detail::intru_queue_safety::mpsc> peer_inbox_[2]; ^ /autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/intru_queue.hpp:50:11: note: template is declared here class intru_queue; ^
/autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/team_fwd.hpp:66:7: error: base class has incomplete type backend::team_base /* defined by <backend>/runtime_fwd.hpp */ { ^~~~~~~~~~~~~~~~~~ /autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/backend_fwd.hpp:106:10: note: forward declaration of 'upcxx::backend::team_base' struct team_base; // backend-specific base class for teams (holds a handle usually) ^
/autofs/nccs-svm1_home1/hargrove/upcxx/.nobs/art/2962a4074e7b6322fe5e6784d65e5fabfd0e55f7/upcxx/team_fwd.hpp:104:5: error: unknown type name 'team_base'; did you mean 'backend::team_base'? team_base& base(detail::internal_only) { ^~~~~~~~~ backend::team_base
This make me suspect we are at fault, not the compiler(s).
-
reporter Since I am sure it will be asked...
To use PGI compilers on Summit with gcc-6.4.0's libstdc++:
$ module load pgi/19.1 $ PATH+=:/sw/summit/gcc/6.4.0/bin $ export CC='pgcc -rc=/ccs/home/hargrove/pgi-localrc-gcc640' $ export CXX='pgc++ -rc=/ccs/home/hargrove/pgi-localrc-gcc640'
To use IBM compilers on Summit with gcc-6.4.0's libstdc++:
$ module load xl $ PATH+=:/sw/summit/gcc/6.4.0/bin $ export CC='xlc -F/ccs/home/hargrove/xlc.cfg.gcc.6.4.0' $ export CXX='xlC -F/ccs/home/hargrove/xlc.cfg.gcc.6.4.0'
-
reporter No change observed with PGI version 19.3
-
reporter No change observed with PGI version 19.4
-
reporter - attached PGI_XLC_patch.txt
This patch changes three lines to allow one to test PGI and IBM XL compilers.
-
reporter Some options for "locally" reproducing with the April 2019 PGI Community Edition (free semi-annual releases).
- On Dirac cluster
module load pgi/19.4
- On mojave, high-sierra or sierra (machine room macs):
PATH+=:/opt/pgi/osx86-64/19.4/bin
(bash syntax).
Additionally, one should be able to download and install for Linux or macOS: https://www.pgroup.com/products/community.htm
- On Dirac cluster
-
reporter - attached compile.rpt
- attached upcxx.log
-
reporter -
assigned issue to
- changed component to Documentation
- marked as task
With the recent merge of PR96 (Thanks, @john bachan ), this is now a documentation task, for which I've assumed responsibility.
-
assigned issue to
-
reporter - changed status to resolved
Document PGI as a supported compiler family
This adds PGI on Linux (19.1 on x86_64, 18.10 Linux/ppc64el) to the lists of supported compilers, and promotes these to "GOOD" in
utils/system-checks.sh
. Meanwhile, older versions on Linux are now BAD.PGI on macOS is "BAD" (see issue
#249).Resolves issue
#166→ <<cset 2997df38bacf>>
- Log in to comment
I wrote:
I have made a local install of PGI-18.4 configured against gcc-7.1 to get a C++11 compatible libstdc++.
With that I now see the errors below, which do look more like actual issues.
Note that editing nobsrule.py to pass
-std=c++14
did not change anything.