diff --git a/DiFfRG/cmake/setup_build_system.cmake b/DiFfRG/cmake/setup_build_system.cmake index a05aa95..9ab712b 100644 --- a/DiFfRG/cmake/setup_build_system.cmake +++ b/DiFfRG/cmake/setup_build_system.cmake @@ -240,6 +240,9 @@ cpmaddpackage( "AUTODIFF_BUILD_PYTHON OFF" "Eigen3_DIR ${Eigen3_BINARY_DIR}") +# This is for spdlog usage. We need to hide the local spdlog installation, otherwise we will have problems with the linking process. +set(CMAKE_DISABLE_FIND_PACKAGE_spdlog TRUE) + if(USE_CUDA) cpmaddpackage(NAME CCCL GITHUB_REPOSITORY "nvidia/cccl" GIT_TAG "v2.7.0") @@ -257,7 +260,7 @@ if(USE_CUDA) endif() - cpmaddpackage( +cpmaddpackage( NAME spdlog GITHUB_REPOSITORY diff --git a/DiFfRG/documentation/getting_started/installation.md b/DiFfRG/documentation/getting_started/installation.md index 6bd6f1c..d5cb2af 100644 --- a/DiFfRG/documentation/getting_started/installation.md +++ b/DiFfRG/documentation/getting_started/installation.md @@ -22,9 +22,11 @@ The framework has been tested with the following systems: ```bash $ pacman -S git cmake gcc blas-openblas blas64-openblas paraview python doxygen cuda graphviz gsl ``` -A further installation of the `gcc12` package from the AUR is necessary for setups with CUDA; with your AUR helper of choice (here `yay`) this can be done with +In case you want to run with CUDA, as of January 2025 you have to have very specific versions of CUDA and gcc installed. Currently, the gcc13 compiler in the Arch package repository is incompatible with CUDA. To configure a system with a compatible CUDA+gcc configuration, them install directly from the Arch package archive ```bash -$ yay -S gcc12 +$ pacman -U https://archive.archlinux.org/packages/g/gcc12/gcc12-12.3.0-6-x86_64.pkg.tar.zst \ + https://archive.archlinux.org/packages/g/gcc12-libs/gcc12-libs-12.3.0-6-x86_64.pkg.tar.zst \ + https://archive.archlinux.org/packages/c/cuda/cuda-12.3.2-1-x86_64.pkg.tar.zst ``` #### Rocky Linux @@ -104,4 +106,4 @@ The `update_DiFfRG.sh` script takes the following optional arguments: - `-i ` Set the installation directory for the library. - `-j ` Set the number of threads passed to make and git fetch. - `-m` Install the Mathematica package locally. -- `--help` Display this information. \ No newline at end of file +- `--help` Display this information. diff --git a/README.md b/README.md index 737560f..7a24f72 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,13 @@ The framework has been tested with the following systems: #### Arch Linux ```bash -$ pacman -S git cmake gcc blas-openblas blas64-openblas paraview python doxygen cuda graphviz gsl +$ pacman -S git cmake gcc blas-openblas blas64-openblas paraview python doxygen graphviz gsl ``` -A further installation of the `gcc12` package from the AUR is necessary for setups with CUDA; with your AUR helper of choice (here `yay`) this can be done with +In case you want to run with CUDA, as of January 2025 you have to have very specific versions of CUDA and gcc installed. Currently, the gcc13 compiler in the Arch package repository is incompatible with CUDA. To configure a system with a compatible CUDA+gcc configuration, them install directly from the Arch package archive ```bash -$ yay -S gcc12 +$ pacman -U https://archive.archlinux.org/packages/g/gcc12/gcc12-12.3.0-6-x86_64.pkg.tar.zst \ + https://archive.archlinux.org/packages/g/gcc12-libs/gcc12-libs-12.3.0-6-x86_64.pkg.tar.zst \ + https://archive.archlinux.org/packages/c/cuda/cuda-12.3.2-1-x86_64.pkg.tar.zst ``` #### Rocky Linux diff --git a/config b/config index 35d6a0a..01bd74f 100644 --- a/config +++ b/config @@ -11,11 +11,11 @@ # export CXX_FLAGS="-march=core-avx2 -fPIC" # export C_FLAGS="-march=core-avx2 -fPIC" # export CUDA_FLAGS="-arch=sm_35" -export CXX_FLAGS="-march=native -fPIC" +export CXX_FLAGS="-march=native -fPIC -flto=auto" # -flto=auto" -export C_FLAGS="-march=native -fPIC" +export C_FLAGS="-march=native -fPIC -flto=auto" # -flto=auto" -export CUDA_FLAGS="-arch=all" +export CUDA_FLAGS="-arch=native -use_fast_math" # Configure linker flags for the current machine. By default, we use the gold linker export EXE_LINKER_FLAGS="-fuse-ld=gold" diff --git a/update_DiFfRG.sh b/update_DiFfRG.sh index 3d1e96c..6840097 100644 --- a/update_DiFfRG.sh +++ b/update_DiFfRG.sh @@ -144,8 +144,8 @@ if [[ ${option_install_library} != "n" ]] && [[ ${option_install_library} != "N" -DCMAKE_INSTALL_PREFIX=${idir} \ -DBUNDLED_DIR=${idir}/bundled \ ${CUDA_OPT} \ - -DCMAKE_CUDA_FLAGS=${CUDA_FLAGS} \ - -DCMAKE_CXX_FLAGS=${CXXFLAGS} \ + -DCMAKE_CUDA_FLAGS="${CUDA_FLAGS}" \ + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ -DDiFfRG_BUILD_TESTS=OFF \ -DDiFfRG_BUILD_DOCUMENTATION=ON \