![]() Make -f CMakeFiles/demo.dir/build.make CMakeFiles/demo.dir/dependĬd /home/dgadioli/projects/demo/build & /opt/cmake/cmake-3.19.7_gcc_native/bin/cmake -E cmake_depends “Unix Makefiles” /home/dgadioli/projects/demo /home/dgadioli/projects/demo /home/dgadioli/projects/demo/build /home/dgadioli/projects/demo/build /home/dgadioli/projects/demo/build/CMakeFiles/demo.dir/DependInfo.cmake -color=ĭependee “/home/dgadioli/projects/demo/build/CMakeFiles/demo.dir/DependInfo.cmake” is newer than depender “/home/dgadioli/projects/demo/build/CMakeFiles/demo.dir/depend.internal”.ĭependee “/home/dgadioli/projects/demo/build/CMakeFiles/CMakeDirectoryInformation.cmake” is newer than depender “/home/dgadioli/projects/demo/build/CMakeFiles/demo.dir/depend.internal”. Make: Entering directory ‘/home/dgadioli/projects/demo/build’ opt/cmake/cmake-3.19.7_gcc_native/bin/cmake -E cmake_progress_start /home/dgadioli/projects/demo/build/CMakeFiles /home/dgadioli/projects/demo/build//CMakeFiles/progress.marks opt/cmake/cmake-3.19.7_gcc_native/bin/cmake -S/home/dgadioli/projects/demo -B/home/dgadioli/projects/demo/build -check-build-system CMakeFiles/Makefile.cmake 0 – Build files have been written to: /home/dgadioli/projects/demo/build – Found MPI: TRUE (found version “3.1”) found components: C – Found MPI_C: /opt/mpich/3.3.2_native/lib/libmpi.so (found version “3.1”) – Check for working CUDA compiler: /usr/bin/nvcc - skipped – Detecting CUDA compiler ABI info - done – The CUDA compiler identification is NVIDIA 10.1.243 – Check for working CXX compiler: /usr/bin/c++ - skipped – Check for working C compiler: /usr/bin/cc - skipped – The CXX compiler identification is GNU 9.3.0 – The C compiler identification is GNU 9.3.0 Target_link_libraries(demo PRIVATE MPI::MPI_C) I will report here the CMakeLists.txt file and the output of configuration and building:Ĭmake_minimum_required(VERSION 3.19 FATAL_ERROR) Regarding the example, here ( ) you can download the whole example project. ![]() That’s why I assumed that generators were not allowed, but maybe I was using them wrong. So I tried to wrap them using the HOST_LINK or the COMPILE_LANGUAGE generators, but CMake complained about them. For this reason, I was willing to customize the FindMPI.cmake file to hide those flags from CUDA (since I don’t use MPI from CUDA sources). But I would like to stress the fact that I don’t think that the problem lies in CMake, but in how MPICH suggests compiler and linking flags that trick CMake. I am attaching to this reply a dummy application to trigger the behavior. Does someone have a better solution? I also tried something similar to the one proposed here: but it seems that i can’t use generators with INTERFACE_COMPILE_OPTIONS. However, i don’t really like this solution because eventually it will become obsolete. I solved the issue by setting the following CMake policy (which ignores all the link flags as far as i understood) : If i guess correctly what happens is that cmake correctly forward all flags that mpich provides as compiler flags to the compiler, however this cause the error. Gcc -I/opt/modules/binary/mpich/3.3.2/include -L/opt/modules/binary/mpich/3.3.2/lib -Wl,-rpath -Wl,/opt/modules/binary/mpich/3.3.2/lib -Wl,–enable-new-dtags -lmpi However, i believe that the actual culprit is MPICH, because when i ask mpicxx for compile and linking flags i get the following output: To work it must be either wrapped in quotes or used with Xlinker instead of Xcompiler. These errors are caused by the following flag passed on the nvcc command: -Xcompiler=-Wl,-rpath,-Wl,/opt/modules/binary/mpich/3.3.2/lib,-Wl,-enable-new-dtags. Gcc: error: unrecognized command line option ‘-Wl’ did you mean ‘-W’? Gcc: error: unrecognized command line option ‘-rpath’ ![]() In particular, when cmake is linking CUDA device code i get the following errors: gcc: error: unrecognized command line option ‘-Wl’ did you mean ‘-W’? bashrc, to no effect: export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.Hello, i am struggling for compiling a code that requires both CUDA and MPI (MPICH implementation). ![]() I've tried adding it as an environment variable to. Configuring incomplete, errors occurred! Detecting CXX compiler ABI info - doneĬMake Error at /usr/share/cmake/Modules/FindCUDA.cmake:488 (message): Check for working CXX compiler: /usr/bin/c++ - works Check for working CXX compiler: /usr/bin/c++ Check for working C compiler: /usr/bin/gcc - works Check for working C compiler: /usr/bin/gcc The CXX compiler identification is GNU 4.7.1 The C compiler identification is GNU 4.7.1 But the cmake script cannot find the CUDA installation on the system: cls ~/workspace/gpucluster/cluster/build $ cmake. I am trying to build this project, which has CUDA as a dependency.
0 Comments
Leave a Reply. |