3.3.5 : Compilation
Comme toujours, on appelle cmake :
cmake .. -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda (found version "11.2") -- Found headers CUDA : /usr/local/cuda/include -- Found lib CUDA : /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so -- Configuring done -- Generating done -- Build files have been written to: XXX/HadamardProductCuda/build
Ensuite make :
make [ 20%] Building NVCC (Device) object src/CMakeFiles/hadamard_product_cuda.dir/hadamard_product_cuda_generated_hadamard_product_cuda.cu.o nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). Scanning dependencies of target hadamard_product_cuda [ 40%] Building C object src/CMakeFiles/hadamard_product_cuda.dir/phoenix_cuda_check.c.o [ 60%] Linking CXX shared library libhadamard_product_cuda.so [ 60%] Built target hadamard_product_cuda Scanning dependencies of target hadamard_product_gpu_cuda [ 80%] Building CXX object program/CMakeFiles/hadamard_product_gpu_cuda.dir/main.cpp.o [100%] Linking CXX executable hadamard_product_gpu_cuda [100%] Built target hadamard_product_gpu_cuda
Et voilà.