Thanks Renato. Though for good or bad, Iām not able to reproduce the error on my system. While I see linker errors due to missing device routines, the compilation is fine.
What type of system are you using? What OS? Is your GNU 13.1 the system compiler or something you installed?
I might be able to find a system thatās similar enough to yours and try again in case the issue is system specific.
-Mat
% nvc++ -std=c++23 -stdpar=gpu common/c_print_results.cpp common/c_randdp.cpp common/wtime.cpp common/c_timers.cpp problem.cpp -o nvidia -gpu=cuda12.4 -V24.3 --gcc-toolchain=/home/sw/thirdparty/gcc/gcc-13.1.0/Linux_x86_64/ -Minfo
common/c_print_results.cpp:
common/c_randdp.cpp:
randlc(double&, double):
91, FMA (fused multiply-add) instruction(s) generated
102, FMA (fused multiply-add) instruction(s) generated
103, FMA (fused multiply-add) instruction(s) generated
105, FMA (fused multiply-add) instruction(s) generated
106, FMA (fused multiply-add) instruction(s) generated
108, FMA (fused multiply-add) instruction(s) generated
vranlc(int, double&, double, double*):
149, FMA (fused multiply-add) instruction(s) generated
167, FMA (fused multiply-add) instruction(s) generated
168, FMA (fused multiply-add) instruction(s) generated
170, FMA (fused multiply-add) instruction(s) generated
171, FMA (fused multiply-add) instruction(s) generated
173, FMA (fused multiply-add) instruction(s) generated
common/wtime.cpp:
common/c_timers.cpp:
__gnu_cxx::__enable_if<std::__is_scalar<double>::__value, void>::__type std::__fill_a1<double*, double>(double*, double*, double const&):
930, Recognized memory set idiom
problem.cpp:
main:
83, stdpar: Generating NVIDIA GPU code
83, std::transform_reduce with std::execution::par policy parallelized on GPU
__gnu_cxx::__enable_if<std::__is_scalar<int>::__value, void>::__type std::__fill_a1<int*, int>(int*, int*, int const&):
930, Recognized memory set idiom
__gnu_cxx::__enable_if<std::__is_scalar<double>::__value, void>::__type std::__fill_a1<double*, double>(double*, double*, double const&):
930, Recognized memory set idiom
nvlink error : Undefined reference to '_ZSt20__throw_length_errorPKc' in '/tmp/nvc++N-7Dm1SUMrCjd.o'
nvlink error : Undefined reference to '_Z6randlcRdd' in '/tmp/nvc++N-7Dm1SUMrCjd.o'
nvlink error : Undefined reference to '_Z10timer_stopi' in '/tmp/nvc++N-7Dm1SUMrCjd.o'
nvlink error : Undefined reference to '_Z6vranlciRddPd' in '/tmp/nvc++N-7Dm1SUMrCjd.o'
nvlink error : Undefined reference to '_Z11timer_starti' in '/tmp/nvc++N-7Dm1SUMrCjd.o'
pgacclnk: child process exit status 2: /proj/nv/Linux_x86_64/24.3/compilers/bin/tools/nvdd