From 12693ea88e645e1632c3bc8a74f8e77678ebcc93 Mon Sep 17 00:00:00 2001
From: Berenger Bramas <bbramas@mpcdf.mpg.de>
Date: Thu, 19 Jan 2017 16:09:40 +0100
Subject: [PATCH] clean fftw thread end of main

---
 bfps/_code.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bfps/_code.py b/bfps/_code.py
index 71e869a0..54640186 100644
--- a/bfps/_code.py
+++ b/bfps/_code.py
@@ -134,6 +134,10 @@ class _code(_base):
                     }
                     fftwf_mpi_cleanup();
                     fftw_mpi_cleanup();
+                    if (nbThreads > 1){
+                        fftw_cleanup_threads();
+                        fftwf_cleanup_threads();
+                    }
                     #ifdef USE_TIMINGOUTPUT
                     global_timer_manager.show(MPI_COMM_WORLD);
                     global_timer_manager.showMpi(MPI_COMM_WORLD);
-- 
GitLab