Dhondtguido / PaStiX4CalculiX

Other
16 stars 7 forks source link

CUDA_LIBRARIES 'Threads::Threads' NOT FOUND on CentOS #11

Open hem-28 opened 3 years ago

hem-28 commented 3 years ago

Hello,

I have been trying to install the PaStix solver with CUDA and encounter the error described below. Since I do not have admin privileges on the cluster, I have to install all the packages in my user space (non default folders).

GNU - gcc (GCC) 8.2.0 CMAKE - 3.21.2 Intel - XE.2019 for MKL llibraries OS - CentOS Linux release 7.6.1810 (Core) Python - Python 2.7.5 CUDA version - 10.2 and 11.2 (I tried both)

My cmake command: _cmake \ -DHWLOC_DIR=/isi/w/jana/User_Softwares/PaStiX/hwloc_i8 \ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2/ \ -DCMAKE_INSTALL_PREFIX=/isi/w/jana/User_Softwares/PaStiX/pastix_cuda_i8 \ -DCMAKE_BUILD_TYPE=Release \ -DPASTIX_WITH_PARSEC=ON \ -DPARSEC_DIR=/isi/w/jana/User_Softwares/PaStiX/parsec_i8 \ -DSCOTCH_DIR=/isi/w/jana/User_Softwares/PaStiX/scotch_i8 \ -DPASTIX_WITH_CUDA=ON \ -DCUDA_DIR=/usr/local/cuda-10.2/ \ -DPASTIX_ORDERING_SCOTCH=ON \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_LIBRARY_PATH=/usr/local/cuda-10.2/lib64/stubs \ -DCMAKE_CFLAGS="-fopenmp -I/usr/local/cuda-10.2/include" \ ..

I installed hwloc-2.1.0, scotch-6.0.8 and parsec (https://bitbucket.org/mfaverge/parsec.git) as described in the calculix installation guide. With CUDA ON, I receive the following error during cmake CMake Error at cmake_modules/morse_cmake/modules/find/LibrariesAbsolutePath.cmake:59 (message): Dependency of CUDA_LIBRARIES 'Threads::Threads' NOT FOUND Call Stack (most recent call first): cmake_modules/morse_cmake/modules/find/FindPARSEC.cmake:211 (libraries_absolute_path) CMakeLists.txt:365 (find_package) cmake_pastix_withCuda_stderr.txt cmake_pastix_withCuda_stdout.txt

Any suggestion would be great.

Edit: Was able to resolve the issue without CUDA by just turning on MPI (I had to turn on MPI!). Not using MPI lead to conflicting functions between nompi.h of Pastix4Calculix and mpi.h in parsec. I could not compile parsec without MPI libraries.

feacluster commented 2 years ago

I was able to compile parsec without MPI with the following barebones makefile:


#!/bin/bash

# fixes

sed -i '/-1 == cpu/i return cpu;' parsec/bindthread.c

if ! [[ -d build ]]; then
    mkdir build
fi
cd build

INSTALLPATH="/home/feacluster/PaStiX/parsec_i8"

umask 022

cmake \
    -DCMAKE_INSTALL_PREFIX=${INSTALLPATH} \
    -DHWLOC_DIR=/home/guido/PaStiX/hwloc_i8 \
    ..

make -j2

rm -rf ${INSTALLPATH}
make install

This is what is suggested on pastix homepage:

https://solverstack.gitlabpages.inria.fr/pastix/md_docs_doxygen_chapters_Pastix_Runtime.html

Although I still ran into other errors down the road :-(