From d31e8a02deeafa5a22a77d92a7294cd510f90e66 Mon Sep 17 00:00:00 2001
From: Frederick Stein <43850145+fstein93@users.noreply.github.com>
Date: Thu, 25 Jun 2026 15:17:07 +0200
Subject: [PATCH] Add the hint regarding FFTW to the description of libraries
(#5461)
---
CMakeLists.txt | 4 +++-
docs/technologies/libraries.md | 14 ++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f6e82f93e..b557a7a374 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1369,8 +1369,10 @@ if(NOT CP2K_USE_VORI)
endif()
if(NOT CP2K_USE_FFTW3)
+ message(" - FFTW3")
message(
- " - FFTW3: FFTW3 may become mandatory in future releases of CP2K. Please consider installing and enabling it. Some features of CP2K may not work properly without FFTW3."
+ WARNING
+ "FFTW3 may become mandatory in future releases of CP2K. Calculations requiring large grid sizes may not work properly without FFTW3. Please consider installing and enabling it."
)
endif()
diff --git a/docs/technologies/libraries.md b/docs/technologies/libraries.md
index 8ddc9f27bf..dcd706c4b5 100644
--- a/docs/technologies/libraries.md
+++ b/docs/technologies/libraries.md
@@ -32,12 +32,14 @@ incompatibilities between Accelerate and reference BLAS/LAPACK.
MPI (version 3 or later) and SCALAPACK are needed for parallel code. (Use the latest versions
available and download all patches!).
-:warning: Note that your MPI installation must match the used Fortran compiler. If your computing
+```{Warning}
+Note that your MPI installation must match the used Fortran compiler. If your computing
platform does not provide MPI, there are several freely available alternatives:
- MPICH MPI: (may require `-fallow-argument-mismatch` when building with
GCC 10)
- OpenMPI MPI:
+```
For more information of ScaLAPACK, see . ScaLAPACK can be part of
ACML (AMD) or cluster MKL (Intel); these libraries are recommended on the corresponding machines if
@@ -56,13 +58,21 @@ to install and use FFTW3. The current version of CP2K works with FFTW 3.X (pass
FFTW is also provided by MKL. If you have MKL but still want to use standalone FFTW3, pass
`-DCP2K_USE_FFTW3_WITH_MKL=ON` to CMake.
-:warning: Note that FFTW must know the Fortran compiler you will use in order to install properly
+```{Warning}
+Note that FFTW must know the Fortran compiler you will use in order to install properly
(e.g., `export F77=gfortran` before configure if you intend to use gfortran).
+```
Since CP2K is OpenMP parallelized, the FFTW3 threading library libfftw3_omp (or libfftw3_threads) is
required. Pass `-DCP2K_ENABLE_FFTW3_OPENMP_SUPPORT=ON` or `-DCP2K_ENABLE_FFTW3_THREADS_SUPPORT=ON`
respectivly to CMake.
+```{Warning}
+Support for FFTW is required for some features, especially systems with very large block sizes/grid
+sizes. A future release of CP2K may make FFTW a hard dependency. Please consider CP2K to be compiled
+with support for FFTW.
+```
+
## LIBINT (enables methods including HF exchange)
- Hartree-Fock exchange requires the LIBINT package to calculate ERI.