Nvc++ compiler from nvidia hpc sdk

Hi,
I am trying to compile psi4 using the nvc++ compiler, unfortunately, I ended with some compilation errors that I haven’t tried to solve yet. Has anyone already tried to use nvc++? Or maybe suggest some tweaks to the compilation options?

I passed these options to cmake
cmake -S. -Bobjdir -DCMAKE_INSTALL_PREFIX=/gpfswork/rech/uhf/ufa57dc/local -DPython_INCLUDE_DIR=/gpfswork/rech/uhf/ufa57dc/conda/psi4dev/include/python3.8 -DPython_EXECUTABLE=/gpfswork/rech/uhf/ufa57dc/conda/psi4dev/bin/python -DCMAKE_CXX_COMPILER=nvc++ -DCMAKE_C_COMPILER=gcc -D BLAS_TYPE=MKL -D CMAKE_CXX_FLAGS_INIT="-stdpar" -D OpenMP_LIBRARY_DIRS=/gpfslocalsys/intel/parallel_studio_xe_2020_update4_cluster_edition/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64 -DCMAKE_BUILD_TYPE=debug

and trying to be very cautious I used gcc/5.5.0 (although newer versions of gcc seem to be fine too). All the external libraries are correctly complied, but then:

[ 18%] **Linking CXX static library libdpd.a**

[ 18%] **Linking CXX static library libfock.a**

[ 18%] Built target dpd

[ 18%] Built target fock

6 errors detected in the compilation of "/gpfswork/rech/uhf/ufa57dc/psi4/psi4/src/export_mints.cc".

make[5]: *** [src/CMakeFiles/l2export.dir/build.make:76: src/CMakeFiles/l2export.dir/export_mints.cc.o] Error 2

make[4]: *** [CMakeFiles/Makefile2:1054: src/CMakeFiles/l2export.dir/all] Error 2

make[3]: *** [Makefile:136: all] Error 2

make[2]: *** [CMakeFiles/psi4-core.dir/build.make:86: psi4-core-prefix/src/psi4-core-stamp/psi4-core-build] Error 2

make[1]: *** [CMakeFiles/Makefile2:10115: CMakeFiles/psi4-core.dir/all] Error 2

Final thoughts:
according to https://developer.nvidia.com/blog/accelerating-standard-c-with-gpus-using-stdpar/ , GPU acceleration in a standard c++ code can be achieved by adding an execution policy std::execution::par .
Thanks in advance for any suggestion/comments

Best
Matteo

I haven’t ever tried to build Psi4 with the nvc++ compiler. My first thought is to try a newer gcc, since we usually require 7.0 psi4/custom_cxxstandard.cmake at master · psi4/psi4 · GitHub and make use of the c++17 standard.