"/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc+ + -- broken" during cmake

Dear all,

first of all, I hope that this is the right place to ask this question.
So, I am trying to build Tinker 9 (a GPU-accelerated Molecular Dynamics code - GitHub - TinkerTools/tinker9: Tinker9: Next Generation of Tinker with GPU Support) locally on a HPC. An nvc++ compiler is needed for that and, therefore, I’ve built hpc_sdk locally. I obtain the following error when cmake checks for a CXX compiler in the hpc_sdk compiler directory:

– Check for working CXX compiler: /home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++ – broken
CMake Error at /trinity/shared/easybuild/software/CMake/3.16.4-GCCcore-9.3.0/share/cmake-3.16/Modules/CM
akeTestCXXCompiler.cmake:53 (message):
The C++ compiler

"/home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++"

is not able to compile a simple test program.

So, it seems that there’s a problem with the hpc_sdk build. However, no issues occured when I built it, just the regular info of how to use it etc.

Thanks in advance!

Best,
Jacek

The entire output from cmake:
– The CXX compiler identification is PGI 21.9.0
– Check for working CXX compiler: /home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++
– Check for working CXX compiler: /home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++ – broken
CMake Error at /trinity/shared/easybuild/software/CMake/3.16.4-GCCcore-9.3.0/share/cmake-3.16/Modules/CM
akeTestCXXCompiler.cmake:53 (message):
The C++ compiler

"/home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/jkozuch/tinker9/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_1f34e/fast && /usr/bin/gmake -f CMakeFiles/cmTC_1f34e.dir/b

uild.make CMakeFiles/cmTC_1f34e.dir/build
gmake[1]: Entering directory /home/jkozuch/tinker9/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_1f34e.dir/testCXXCompiler.cxx.o /home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++ -o CMakeFiles/cmTC_1f34e. dir/testCXXCompiler.cxx.o -c /home/jkozuch/tinker9/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_1f34e /trinity/shared/easybuild/software/CMake/3.16.4-GCCcore-9.3.0/bin/cmake -E cmake_link_script CMakeFi les/cmTC_1f34e.dir/link.txt --verbose=1 /home/jkozuch/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/nvc++ CMakeFiles/cmTC_1f34e.d ir/testCXXCompiler.cxx.o -o cmTC_1f34e /trinity/shared/easybuild/software/binutils/2.34-GCCcore-9.3.0/bin/ld: cannot find -lstdc++ gmake[1]: *** [cmTC_1f34e] Error 2 gmake[1]: Leaving directory /home/jkozuch/tinker9/CMakeFiles/CMakeTmp’
gmake: *** [cmTC_1f34e/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:387 (enable_language)

– Configuring incomplete, errors occurred!