Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 63793a98 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

pkg-config: remove the cuda.pc and mpi.pc required dependencies, these files...

pkg-config: remove the cuda.pc and mpi.pc required dependencies, these files are not common and not installed usually
ChameleonPkgConfig.cmake: find the precise mpi .pc file to add in chameleon.pc required packages
parent f7b3e66a
No related branches found
No related tags found
1 merge request!501Update docker environment, use shared runners, and plafrim for cuda/rocm
......@@ -6,6 +6,11 @@ SCAN=""
# Configure with CMake
case $SYSTEM in
guix)
echo "build on guix"
cmake -B build-${VERSION} -S . -C cmake_modules/gitlab-ci-initial-cache.cmake $BUILD_OPTIONS
;;
linux)
echo "build on linux"
source .gitlab-ci-env.sh $CHAM_CI_ENV_ARG
......@@ -15,11 +20,6 @@ case $SYSTEM in
eval '${SCAN}cmake -B build-${VERSION} -S . -C cmake_modules/gitlab-ci-initial-cache.cmake $BUILD_OPTIONS'
;;
guix)
echo "build on guix"
cmake -B build-${VERSION} -S . -C cmake_modules/gitlab-ci-initial-cache.cmake $BUILD_OPTIONS
;;
macosx)
echo "build on macosx"
# check starpu is already installed and install it if necessary
......@@ -53,7 +53,7 @@ case $SYSTEM in
-DCHAMELEON_USE_MPI=OFF
;;
*)
echo "The SYSTEM environment variable is $SYSTEM. It is not one of : linux, guix, macosx, windows -> exit 1."
echo "The SYSTEM environment variable is $SYSTEM. It is not one of : guix, linux, macosx, windows -> exit 1."
exit 1
;;
esac
......@@ -79,7 +79,10 @@ fi
export FC=gfortran
# Set the path variables
if [[ "$SYSTEM" == "linux" ]]; then
if [[ "$SYSTEM" == "guix" ]]; then
export LIBRARY_PATH=$PWD/../../install-${VERSION}/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD/../../install-${VERSION}/lib:$LD_LIBRARY_PATH
elif [[ "$SYSTEM" == "linux" ]]; then
export LIBRARY_PATH=$PWD/../../install-${VERSION}/lib:$LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH=$PWD/../../install-${VERSION}/lib:$LD_LIBRARY_PATH:/usr/local/lib
elif [[ "$SYSTEM" == "macosx" ]]; then
......@@ -90,12 +93,10 @@ elif [[ "$SYSTEM" == "windows" ]]; then
export PATH=$PWD/../../install-${VERSION}/bin:$PATH
fi
#if [[ "$SYSTEM" != "guix" ]]; then
# 1) using cmake:
./link_cmake.sh $PWD/../../install-${VERSION}
# 2) using pkg-config:
./link_pkgconfig.sh $PWD/../../install-${VERSION}
#fi
# 1) using cmake:
./link_cmake.sh $PWD/../../install-${VERSION}
# 2) using pkg-config:
./link_pkgconfig.sh $PWD/../../install-${VERSION}
cd ../..
rm -r install-${VERSION}
......@@ -8,7 +8,7 @@
###
#
# @project Chameleon
# @version 1.2.0
# @version 1.3.0
# @author Mathieu Faverge
# @author Florent Pruvost
# @author Abel Calluaud
......@@ -93,7 +93,6 @@ macro(chameleon_generate_pkgconfig_files)
if(CHAMELEON_USE_CUDA)
list(APPEND GPUCUBLAS_PKGCONFIG_LIBS_PRIVATE ${CUDA_CUBLAS_LIBRARIES})
list(APPEND GPUCUBLAS_PKGCONFIG_REQUIRED "cuda")
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED "gpucublas")
endif()
......@@ -110,7 +109,28 @@ macro(chameleon_generate_pkgconfig_files)
)
if(CHAMELEON_USE_MPI)
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED "mpi")
if(${MPI_C_LIBRARIES} MATCHES "mpich")
set(MPI_NAME "mpich")
elseif(${MPI_C_LIBRARIES} MATCHES "mvapich2")
set(MPI_NAME "mvapich2")
elseif(${MPI_C_LIBRARIES} MATCHES "madmpi" OR ${MPI_C_LIBRARIES} MATCHES "nmad")
set(MPI_NAME "nmad")
elseif(${MPI_C_LIBRARIES} MATCHES "openmpi")
set(MPI_NAME "ompi")
else()
set(MPI_NAME "mpi")
endif()
find_file(MPIPC_PATH "${MPI_NAME}.pc"
HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}
ENV PKG_CONFIG_PATH
PATH_SUFFIXES pkgconfig
NO_CACHE)
if(MPIPC_PATH)
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED ${MPI_NAME})
else()
list(APPEND CHAMELEON_PKGCONFIG_INCS "${MPI_C_INCLUDE_DIRS}")
list(APPEND CHAMELEON_PKGCONFIG_LIBS "${MPI_C_LIBRARIES}")
endif()
endif()
generate_pkgconfig_files(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment