Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error at CMakeLists.txt:379 (include): include could not find requested file: .../magma/CMake.src.cuda #22

Open
jeffhammond opened this issue Dec 10, 2024 · 5 comments

Comments

@jeffhammond
Copy link

In response to #21, I am trying to build the git version (2716e3f), but it fails as follows.

~/magma/build$ git clean -dfx ; cmake .. -DCMAKE_CUDA_ARCHITECTURES=80
warning: failed to remove ./: Invalid argument
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- The Fortran compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- MAGMA requires one enabled backend!
-- Building CUDA backend
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Performing Test COMPILER_SUPPORTS_FPIC
-- Performing Test COMPILER_SUPPORTS_FPIC - Success
-- Performing Test COMPILER_SUPPORTS_C99
-- Performing Test COMPILER_SUPPORTS_C99 - Success
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found OpenMP
--     OpenMP_C_FLAGS   -fopenmp
--     OpenMP_CXX_FLAGS -fopenmp
-- The CUDA compiler identification is NVIDIA 12.6.85
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found CUDAToolkit: /usr/local/cuda/targets/x86_64-linux/include (found version "12.6.85")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found CUDA 
--     CUDA_CUDART_LIBRARY: CUDA::cudart
--     Compile for CMAKE_CUDA_ARCHITECTURES=80
-- Define -DMAGMA_HAVE_CUDA -DMAGMA_CUDA_ARCH_MIN=800
-- Searching for BLAS and LAPACK. To override, set LAPACK_LIBRARIES using ccmake.
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libopenblas.so
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- Found LAPACK: /usr/lib/x86_64-linux-gnu/libopenblas.so;-lm;-ldl
CMake Error at CMakeLists.txt:379 (include):
  include could not find requested file:

    ~/magma/CMake.src.cuda


-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
CMake Deprecation Warning at CMakeLists.txt:657 (cmake_policy):
  The OLD behavior for policy CMP0037 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- pkgconfig lib/pkgconfig/magma.pc
-- Flags
--     CMAKE_INSTALL_PREFIX:  /usr/local/magma
--     CFLAGS:                 -std=c99 -fopenmp -Wall -Wno-unused-function
--     CXXFLAGS:               -std=c++11 -fopenmp -Wall -Wno-unused-function
--     NVCCFLAGS:             
--     FFLAGS:                 -Dmagma_devptr_t="integer(kind=8)"
--     LIBS:                   /usr/lib/x86_64-linux-gnu/libopenblas.so -lm -ldl -L/usr/local/cuda/lib64 -lcudart -lcublas -lcusparse
--     blas_fix:                (MacOS Accelerate only)
--     LAPACK_LIBRARIES:      /usr/lib/x86_64-linux-gnu/libopenblas.so;-lm;-ldl
--     INCLUDE_DIRECTORIES:   -I/usr/local/cuda/targets/x86_64-linux/include -I~/magma/build/include -I~/magma/include -I~/magma/control -I~/magma/magmablas -I~/magma/sparse/include -I~/magma/sparse/control -I~/cuEST/magma/testing 
--     CUDA_CUDART_LIBRARY:   CUDA::cudart
--     CUDA_CUBLAS_LIBRARIES: CUDA::cublas
--     CUDA_cusparse_LIBRARY: CUDA::cusparse
--     Fortran modules:       
-- Configuring incomplete, errors occurred!
@jeffhammond
Copy link
Author

I don't know if CMake is supported, because I had to generate this file using the Makefile build system, which I thought was an alternative to CMake. Anyways, I am building the non-CMake way now.

@nbeams
Copy link
Contributor

nbeams commented Dec 10, 2024

The CMake support is indeed a bit weird -- you still have to do the code generation step first, as mentioned under Quick start (CMake) in the README. Did you do that and still see this error? (Edit: I didn't read your second comment closely enough. I see you did generate it!) Regardless, doing the Makefile build is probably just as easy for MAGMA.

@nbeams
Copy link
Contributor

nbeams commented Dec 10, 2024

So just to confirm, did you try the CMake configure again after the make generate step, or go straight to building with the Makefile?

@jeffhammond
Copy link
Author

i just used the Makefile. i dislike CMake but it seems to be the preferred way for a lot of projects, so i started there. i am very happy to avoid it and am glad that UTK still invests in pure Make.

@nbeams
Copy link
Contributor

nbeams commented Dec 10, 2024

We do generally recommend the Makefile build. I get the impression that the CMake option is more commonly used by other projects who use CMake and want to include MAGMA. But the non-standard CMake use is a bit of a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants