From 41c22b0153be180f6b5613f8c7434e07754a16e3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 15 Feb 2019 09:38:28 -0500 Subject: [PATCH] Call fftwf_cleanup() from four2a to free all remaining fftw memory. --- lib/four2a.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/four2a.f90 b/lib/four2a.f90 index 57c7239e1..337ca15c3 100644 --- a/lib/four2a.f90 +++ b/lib/four2a.f90 @@ -19,6 +19,7 @@ subroutine four2a(a,nfft,ndim,isign,iform) ! This version of four2a makes calls to the FFTW library to do the ! actual computations. + use fftw3 parameter (NPMAX=2100) !Max numberf of stored plans parameter (NSMALL=16384) !Max size of "small" FFTs complex a(nfft) !Array to be transformed @@ -29,7 +30,6 @@ subroutine four2a(a,nfft,ndim,isign,iform) logical found_plan data nplan/0/ !Number of stored plans common/patience/npatience,nthreads !Patience and threads for FFTW plans - include 'fftw3.f90' !FFTW definitions save plan,nplan,nn,ns,nf,nl if(nfft.lt.0) go to 999 @@ -107,7 +107,7 @@ subroutine four2a(a,nfft,ndim,isign,iform) !$omp end critical(fftw) end if enddo - + call fftwf_cleanup() nplan=0 !$omp end critical(four2a)