From f33b6cec0b8c0cff21a63d50a4577304fb32a751 Mon Sep 17 00:00:00 2001 From: atillack Date: Thu, 16 Sep 2021 14:29:25 -0400 Subject: [PATCH] Fixed memory freeing error when no filelist is used with more than one thread. --- host/src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/host/src/main.cpp b/host/src/main.cpp index 35a9915b..85d7ab05 100644 --- a/host/src/main.cpp +++ b/host/src/main.cpp @@ -477,6 +477,9 @@ int main(int argc, char* argv[]) if(mypars.resname) free(mypars.resname); } } // end of for loop +#ifdef USE_PIPELINE + #pragma omp single +#endif if(!filelist.used){ // Clean up memory dynamically allocated to not leak mypars.receptor_atoms.clear(); @@ -488,6 +491,7 @@ int main(int argc, char* argv[]) } } // end of parallel section if(initial_pars.xml2dlg && !initial_pars.dlg2stdout && (n_files>100)) printf("\n\n"); // finish progress bar + #ifndef _WIN32 // Total time measurement