Skip to content

Commit

Permalink
fix: a spdlog incompatibility which may arise if spdlog and fmt are l…
Browse files Browse the repository at this point in the history
…ocally installed

doc: update Arch linux install description
  • Loading branch information
Franz R. Sattler committed Jan 14, 2025
1 parent 12db594 commit ffea927
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
5 changes: 4 additions & 1 deletion DiFfRG/cmake/setup_build_system.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -257,7 +260,7 @@ if(USE_CUDA)

endif()

cpmaddpackage(
cpmaddpackage(
NAME
spdlog
GITHUB_REPOSITORY
Expand Down
8 changes: 5 additions & 3 deletions DiFfRG/documentation/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -104,4 +106,4 @@ The `update_DiFfRG.sh` script takes the following optional arguments:
- `-i <directory>` Set the installation directory for the library.
- `-j <threads>` Set the number of threads passed to make and git fetch.
- `-m` Install the Mathematica package locally.
- `--help` Display this information.
- `--help` Display this information.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions update_DiFfRG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit ffea927

Please sign in to comment.