beagle-dev / beagle-lib

general purpose library for evaluating the likelihood of sequence evolution on trees
MIT License
125 stars 57 forks source link

BEAGLE3 fails to install on Pop_OS 22.04 (Ubuntu 22.04) #179

Closed cement-head closed 2 years ago

cement-head commented 2 years ago

Where (specifically, file) do I specific the C compiler override (as per the suggestion below)?

$ cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 11.2.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
-- Found JNI: /usr/lib/jvm/default-java/lib/libjawt.so  
-- JAVA_HOME=
-- JNI_INCLUDE_DIRS=/usr/lib/jvm/default-java/include;/usr/lib/jvm/default-java/include/linux;/usr/lib/jvm/default-java/include
-- JNI_LIBRARIES=/usr/lib/jvm/default-java/lib/libjawt.so;/usr/lib/jvm/default-java/lib/server/libjvm.so
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED - Success
-- Not using libtools for plugins
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - not found
-- Looking for CL_VERSION_1_1
-- Looking for CL_VERSION_1_1 - not found
-- Looking for CL_VERSION_1_0
-- Looking for CL_VERSION_1_0 - not found
-- Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR) 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found CUDA: /usr/lib/cuda-11.2 (found version "11.2") 
-- CUDA Includes: /usr/lib/cuda-11.2/include
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andor/Programs/beagle-lib/build
andor@pop-os:~/Programs/beagle-lib/build$ make install
[  4%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/beagle.cpp.o
[  8%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/benchmark/BeagleBenchmark.cpp.o
[ 12%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/benchmark/linalg.cpp.o
[ 16%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/plugin/Plugin.cpp.o
[ 20%] Building CXX object libhmsbeagle/CMakeFiles/hmsbeagle.dir/plugin/UnixSharedLibrary.cpp.o
[ 25%] Linking CXX shared library libhmsbeagle.so
[ 25%] Built target hmsbeagle
[ 29%] Building CXX object libhmsbeagle/CPU/CMakeFiles/hmsbeagle-cpu.dir/BeagleCPUPlugin.cpp.o
[ 33%] Linking CXX shared library libhmsbeagle-cpu.so
[ 33%] Built target hmsbeagle-cpu
[ 37%] Building CXX object libhmsbeagle/CPU/CMakeFiles/hmsbeagle-cpu-sse.dir/BeagleCPUSSEPlugin.cpp.o
In file included from /home/andor/Programs/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.h:338,
                 from /home/andor/Programs/beagle-lib/libhmsbeagle/CPU/BeagleCPUSSEPlugin.cpp:9:
/home/andor/Programs/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.hpp: In member function ‘virtual void beagle::cpu::BeagleCPU4StateSSEImpl<double, T_PAD, P_PAD>::calcCrossProductsPartials(const double*, const double*, const double*, const double*, double, double*, double*)’:
/home/andor/Programs/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.hpp:563:25: warning: ignoring attributes on template argument ‘V_Real’ {aka ‘__m128d’} [-Wignored-attributes]
  563 |     std::array<V_Real, 8> vAcrossPatterns;
      |                         ^
/home/andor/Programs/beagle-lib/libhmsbeagle/CPU/BeagleCPU4StateSSEImpl.hpp:566:25: warning: ignoring attributes on template argument ‘V_Real’ {aka ‘__m128d’} [-Wignored-attributes]
  566 |     std::array<V_Real, 8> vWithinPattern;
      |                         ^
[ 41%] Linking CXX shared library libhmsbeagle-cpu-sse.so
[ 41%] Built target hmsbeagle-cpu-sse
[ 45%] Building CUDA kernels
NVCC=/usr/lib/cuda-11.2/bin/nvcc
NVCCFLAGS=-O3 -Wno-deprecated-gpu-targets -ccbin /usr/bin/c++ -m64 -D_POSIX_C_SOURCE -std=c++11
INCLUDE_DIRS=-I/home/andor/Programs/beagle-lib
In file included from /usr/lib/cuda-11.2/bin/../targets/x86_64-linux/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/lib/cuda-11.2/bin/../targets/x86_64-linux/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~
[ 45%] Built target CudaKernels
[ 50%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/__/GPUImplHelper.cpp.o
[ 54%] Building CXX object libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/__/GPUInterfaceCUDA.cpp.o
In file included from /home/andor/Programs/beagle-lib/libhmsbeagle/GPU/GPUInterfaceCUDA.cpp:31:
/home/andor/Programs/beagle-lib/libhmsbeagle/GPU/GPUInterface.h:36:18: fatal error: libhmsbeagle/GPU/kernels/BeagleCUDA_kernels.h: No such file or directory
   36 |         #include "libhmsbeagle/GPU/kernels/BeagleCUDA_kernels.h"
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/build.make:90: libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/__/GPUInterfaceCUDA.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:293: libhmsbeagle/GPU/CMake_CUDA/CMakeFiles/hmsbeagle-cuda.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
cement-head commented 2 years ago

Setting the compiler to gcc/g++ 9 solves this

cement-head commented 2 years ago

$ cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 ..