Skip to content

Commit a451acb

Browse files
committed
Update fftw
1 parent a36b729 commit a451acb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

bin/install-fftw.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This script installs FFTW locally. It may need to environment
44
# variables to work, like 'export CC=gcc' in ARCHER.
55

6-
FFTW=fftw-3.3.8
6+
FFTW=fftw-3.3.10
77

88
set -e
99

fidimag/common/dipolar/demag.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ void finalize_plan(fft_demag_plan *restrict plan) {
479479
fftw_free(plan->hy);
480480
fftw_free(plan->hz);
481481

482-
fftw_cleanup_threads();
482+
// Note: fftw_cleanup_threads() is a global cleanup function and should
483+
// NOT be called per-object. It should only be called once at program exit.
484+
// Calling it here causes crashes when multiple FFTDemag objects are used.
483485

484486
free(plan);
485487
}

0 commit comments

Comments
 (0)