add call to fftw_cleanup() before exiting to avoid bogus leak reports when compiling with FFTW v3.x
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@ -22,6 +22,10 @@
|
|||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef FFT_FFTW3
|
||||||
|
#include <fftw3.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -62,4 +66,10 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
MPI_Barrier(MPI_COMM_WORLD);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
|
|
||||||
|
#ifdef FFT_FFTW3
|
||||||
|
// tell fftw3 to delete its global memory pool
|
||||||
|
// and thus avoid bogus valgrind memory leak reports
|
||||||
|
fftw_cleanup();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user