LLNL/Aluminum

Add note and CMake requirement for minimum CUDA version

mxmlnkn opened this issue · 1 comments

For reasons, I tried to compile with CUDA 7.0 but couldn't because:

[  8%] Building CUDA object src/CMakeFiles/Al.dir/mpi_cuda/cuda_kernels.cu.o
In file included from /opt/Aluminum-0.2/src/mempool.hpp:35:0,
                 from /opt/Aluminum-0.2/src/mpi_impl.hpp:36,
                 from /opt/Aluminum-0.2/src/Al.hpp:826,
                 from /opt/Aluminum-0.2/src/cuda.cpp:30:
/opt/Aluminum-0.2/src/cuda.cpp: In function 'void Al::internal::cuda::init(int&, char**&)':
/opt/Aluminum-0.2/src/cuda.cpp:61:30: error: 'CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS' was not declared in this scope
                       &attr, CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS, dev));
                              ^
/opt/Aluminum-0.2/src/cuda.hpp:89:39: note: in definition of macro 'AL_FORCE_CHECK_CUDA_DRV_NOSYNC'
     CUresult status_CHECK_CUDA_DRV = (cuda_call);               \
                                       ^
/opt/Aluminum-0.2/src/cuda.cpp:60:3: note: in expansion of macro 'AL_CHECK_CUDA_DRV'
   AL_CHECK_CUDA_DRV(cuDeviceGetAttribute(
   ^
[ 10%] Building CUDA object src/CMakeFiles/Al.dir/helper_kernels.cu.o
make[2]: *** [src/CMakeFiles/Al.dir/cuda.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/opt/Aluminum-0.2/src/helper_kernels.cu(48): error: identifier "CU_STREAM_WAIT_VALUE_EQ" is undefined

/opt/Aluminum-0.2/src/helper_kernels.cu(48): error: identifier "cuStreamWaitValue32" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_0000260c_00000000-7_helper_kernels.cpp1.ii".
make[2]: *** [src/CMakeFiles/Al.dir/helper_kernels.cu.o] Error 2
make[1]: *** [src/CMakeFiles/Al.dir/all] Error 2
make: *** [all] Error 2

Looking at the docs, CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS was added in CUDA 9.0, and the othermissing defines seem to be mostly from CUDA 8.0. It seems that at least CUDA 9.0 is therefore required. The Readme.md does not mention any minimum version (even though it mentions that at least MPI 3.0 is required). Also, the CMakeLists.txt does not check against a minimum version. Imho, boht should be added. Maybe after some testing whether it really works with CUDA 9.0. I might test this with a singularity container.

Fixed. Thanks for the catch!