From 449fa423b83bd4f3c0af330a9f32178c8d5a214f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Fri, 19 Dec 2025 13:25:19 +0100 Subject: [PATCH] Remove flag __FFTW3_UNALIGNED --- docs/technologies/libraries.md | 5 +---- src/pw/fft/fftw3_lib.F | 7 ------- tools/precommit/check_file_properties.py | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/technologies/libraries.md b/docs/technologies/libraries.md index 7c4ce1b286..fa8099a487 100644 --- a/docs/technologies/libraries.md +++ b/docs/technologies/libraries.md @@ -60,10 +60,7 @@ FFTW is also provided by MKL. 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 (e.g., `export F77=gfortran` before configure if you intend to use gfortran). -:warning: Note that FFTW configured for SIMD vectorization, requires buffers aligned to SIMD width. -If this cannot be ensured for the compiler used (e.g., NAG f95, Intel IA32/gfortran), one should -either configure FFTW without SIMD support or otherwise set the define `-D__FFTW3_UNALIGNED`. Since -CP2K is OpenMP parallelized, the FFTW3 threading library libfftw3_threads (or libfftw3_omp) is +Since CP2K is OpenMP parallelized, the FFTW3 threading library libfftw3_threads (or libfftw3_omp) is required. Pass `-DCP2K_ENABLE_FFTW3_THREADS_SUPPORT=ON` or `-DCP2K_ENABLE_FFTW3_OPENMP_SUPPORT=ON` respectivly to CMake. diff --git a/src/pw/fft/fftw3_lib.F b/src/pw/fft/fftw3_lib.F index bc38354ed0..59007dc551 100644 --- a/src/pw/fft/fftw3_lib.F +++ b/src/pw/fft/fftw3_lib.F @@ -686,10 +686,6 @@ CONTAINS CPABORT("fftw3_create_plan_3d") END SELECT -#if defined(__FFTW3_UNALIGNED) - fftw_plan_type = fftw_plan_type + FFTW_UNALIGNED -#endif - IF (plan%fsign == +1) THEN fft_direction = FFTW_FORWARD ELSE @@ -1020,9 +1016,6 @@ CONTAINS CPABORT("fftw3_create_plan_1dm") END SELECT -#if defined(__FFTW3_UNALIGNED) - fftw_plan_type = fftw_plan_type + FFTW_UNALIGNED -#endif num_threads = 1 plan%separated_plans = .FALSE. !$OMP PARALLEL DEFAULT(NONE), & diff --git a/tools/precommit/check_file_properties.py b/tools/precommit/check_file_properties.py index 05a6589bf0..b88365d56b 100755 --- a/tools/precommit/check_file_properties.py +++ b/tools/precommit/check_file_properties.py @@ -91,7 +91,6 @@ FLAG_EXCEPTIONS = ( r"__CRAY_PM_ENERGY", r"__STATM_RESIDENT", r"__STATM_TOTAL", - r"__FFTW3_UNALIGNED", ) FLAG_EXCEPTIONS_RE = re.compile(r"|".join(FLAG_EXCEPTIONS))