Compile ADIOS2 using nvhpc/21.7, got no instance of overloaded function error
Hi,
I tried to compile ADIOS2 using nvhpc/21.7 with setting std=c++14, I still got the following errors. Do you know how I can solve the problems? The CMakeLists.txt is almost same except settting "set(CMAKE_CXX_STANDARD 14)" ''' ADIOS2 build configuration: ADIOS Version: 2.7.1.745 C++ Compiler : PGI 21.7.0 /dav/opt/ncarcompilers/0.5.0/nvhpc/21.7/nvc++
Fortran Compiler : PGI 21.7.0 /dav/opt/ncarcompilers/0.5.0/nvhpc/21.7/nvfortran
Installation prefix: /usr/local bin: bin lib: lib64 include: include cmake: lib64/cmake/adios2 python: lib/python3.7/site-packages
Features:
Library Type: shared
Build Type: Release
Testing: ON
Examples: ON
Build Options:
Blosc : OFF
BZip2 : ON
ZFP : OFF
SZ : OFF
MGARD : OFF
PNG : OFF
MPI : ON
DataMan : OFF
DAOS : OFF
MHS : ON
SSC : ON
SST : ON
BP5 : ON
DataSpaces: OFF
ZeroMQ : OFF
HDF5 : ON
HDF5_VOL : OFF
IME : OFF
Python : OFF
Fortran : ON
SysVShMem : ON
Profiling : ON
Endian_Reverse: OFF
LIBPRESSIO: OFF
RDMA Transport for Staging: Available
'''
"/usr/include/c++/4.8.5/complex", line 475: error: no instance of overloaded function "std::complex
I don't know about this, but I am using PGI compiler to build ADIOS and use NVHPC to build the application.
@halehawk is it possible to use a more recent gcc version? I don't think gcc 4.8.5 supports C++14. Hope it helps.
I used gnu/9.1.0 compile ADIOS2 and had no problem, but when I used NVHPC/21.3 to compile an application that include "adios2.h" in *.C file, I got the following errors: /ADIOS2/install/include/adios2/cxx11/ADIOS.h", line 203: error: expected an identifier template <class R, class... Args> ^
"/ADIOS2/install/include/adios2/cxx11/ADIOS.h", line 205: error: expected a type specifier const std::function<R(Args...)> &function, ^ "/ADIOS2/install/include/adios2/cxx11/ADIOS.inl", line 22: error: expected an identifier template <class R, class... Args> ^
"/ADIOS2/install/include/adios2/cxx11/ADIOS.inl", line 24: error: expected a type specifier const std::function<R(Args...)> &function, ^
@halehawk thanks. Somehow NVHPC is using gcc 4.8.5 under the hood as shown in the logs. Is there a way to use a more recent gcc version from within NVHPC. There is an old issue with PGI compilers (my guess is that NVHPC is a rebrand) using the system's old gcc, see 4) here.
I ran the command: /glade/u/apps/opt/nvhpc/21.7/Linux_x86_64/21.7/compilers/bin/makelocalrc -d /glade/u/apps/dav/opt/ncarcompilers/0.5.0/nvhpc/21.7/mpi -gcc /glade/u/apps/dav/opt/ncarcompilers/0.5.0/gnu/9.1.0/gcc -gpp /glade/u/apps/dav/opt/ncarcompilers/0.5.0/gnu/9.1.0/g++ -g77 /glade/u/apps/dav/opt/ncarcompilers/0.5.0/gnu/9.1.0/gfortran -o -net 1>${HOME}/.mypgirc 2>/dev/null
When I look the mypgirc, it is set LDSO=/lib64/ld-linux-x86-64.so.2; set GCCDIR=/usr/lib/gcc/x86_64-redhat-linux/4.8.5; set G77DIR=/usr/lib/gcc/x86_64-redhat-linux/4.8.5/; set OEM_INFO=64-bit target on x86-64 Linux $INFOTPVAL; set GNUATOMIC=-latomic;
Did I do anything wrong?
@halehawk hard to tell, try editing the file manually. BTW, are you able to reproduce the error with gcc 4.8.5 outside of NVHPC?
After I used makelocalrc command and created mypgirc, I still got the same error. @williamfgc do you mean this?