Minimum required gcc 9.0 when compiling with nvcc?
Compiling with gcc 8.1.0 + nvcc 11.2.67 gives the following build error:
/RAJAPerf/src/basic/MAT_MAT_SHARED-Cuda.cpp: In instantiation of 'void rajaperf::basic::MAT_MAT_SHARED::runCudaVariantImpl(rajaperf::VariantID) [with long unsigned int block_size = 256]': /tmp/tmpxft_002d5158_00000000-6_MAT_MAT_SHARED-Cuda.cudafe1.stub.c:12:193: required from here RAJAPerf/src/basic/MAT_MAT_SHARED-Cuda.cpp:234:4: sorry, unimplemented: capture of variably-modified type 'double [tile_size][tile_size]' that is not an N3639 array of runtime bound MAT_MAT_SHARED_BODY_1(tile_size)
Fixed by compiling with gcc 9.2.0. Is that expected?
That seems odd because tile_size is declared constexpr here https://github.com/LLNL/RAJAPerf/blob/develop/src/basic/MAT_MAT_SHARED-Cuda.cpp#L67. I believe n3639 arrays (analogous to C99 VLA) came in C++14. Are you building with C++14; i.e., pass -DBLT_CXX_STD=c++14 option to CMake?
Should add something like: set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) To the top level RAJA Perf CMake files?
https://github.com/LLNL/RAJAPerf/blob/develop/CMakeLists.txt#L25
Dunno what's going on with the build issue.
Right. But I think what's happening is CMake is letting that get overridden by the compiler default. CMAKE_CXX_STANDARD_REQUIRED, I believe, should error out before getting there.
I’m pretty sure BLT sets both CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED.
On Thu, May 5, 2022 at 8:16 AM Corbin Robeck @.***> wrote:
Right. But I think what's happening is CMake is letting that get overridden by the compiler default. CMAKE_CXX_STANDARD_REQUIRED, I believe, should error out before getting there.
— Reply to this email directly, view it on GitHub https://github.com/LLNL/RAJAPerf/issues/244#issuecomment-1118682870, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQY6TJZ6VMLASOI6ABTWYDVIPQ5NANCNFSM5VDVSAPA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Can you post the output of make VERBOSE=1?
-std=c++14 is getting set:
cd /RAJAPerf/build_cuda/src/basic && /cm/shared/apps/cuda11.2/toolkit/11.2.0/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/opt/gcc/8.1.0/bin/c++ -DRUN_RAJA_SEQ -I/RAJAPerf/build_cuda/include -I/RAJAPerf/src/. -I/RAJAPerf/tpl/RAJA/include -I/RAJAPerf/build_cuda/tpl/RAJA/include -I/RAJAPerf/tpl/RAJA/tpl/camp/include -I/RAJAPerf/build_cuda/tpl/RAJA/tpl/camp/include -isystem=/cm/shared/apps/cuda11.2/toolkit/11.2.0/include -restrict -arch sm_70 --expt-extended-lambda --expt-relaxed-constexpr -O3 -DNDEBUG -Xcompiler=-fPIC -std=c++14 -x cu -c /RAJAPerf/src/basic/NESTED_INIT-OMP.cpp -o CMakeFiles/basic.dir/NESTED_INIT-OMP.cpp.o /RAJAPerf/src/basic/MAT_MAT_SHARED-Cuda.cpp: In instantiation of 'void rajaperf::basic::MAT_MAT_SHARED::runCudaVariantImpl(rajaperf::VariantID) [with long unsigned int block_size = 256]': /tmp/tmpxft_002f326c_00000000-6_MAT_MAT_SHARED-Cuda.cudafe1.stub.c:12:193: required from here /RAJAPerf/src/basic/MAT_MAT_SHARED-Cuda.cpp:234:4: sorry, unimplemented: capture of variably-modified type 'double [tile_size][tile_size]' that is not an N3639 array of runtime bound MAT_MAT_SHARED_BODY_1(tile_size)
Does the standard need to be set for CUDA also?
Isn't that this: https://github.com/LLNL/RAJAPerf/blob/develop/CMakeLists.txt#L116 @davidbeckingsale do you think we need REQUIRED here? set(CMAKE_CUDA_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_STANDARD_REQUIRED TRUE)