From a94b94b2eb1eb24d7afb847d55cfa145368088f4 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Sun, 17 May 2015 20:57:37 +0200
Subject: [PATCH] Removed static vars from lapack

It seems the lapack routine I took from gromacs are not threadsafe.
Indeed, routines slasq5 and dlasq5 contained static variables.
I removed all of them and everything seems to still work correctly.
This seems to solve the problem that @gtribello
found in his no-buffer branch.
---
 src/lapack/lapack.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lapack/lapack.cpp b/src/lapack/lapack.cpp
index de3707617..390172cf6 100644
--- a/src/lapack/lapack.cpp
+++ b/src/lapack/lapack.cpp
@@ -12206,9 +12206,9 @@ PLUMED_BLAS_F77_FUNC(dlasq5,DLASQ5)(int *i0,
     int i__1;
     double d__1, d__2;
 
-    static double d__;
-    static int j4, j4p2;
-    static double emin, temp;
+    double d__;
+    int j4, j4p2;
+    double emin, temp;
 
     --z__;
 
@@ -31035,9 +31035,9 @@ PLUMED_BLAS_F77_FUNC(slasq5,SLASQ5)(int *i0,
     int i__1;
     float d__1, d__2;
 
-    static float d__;
-    static int j4, j4p2;
-    static float emin, temp;
+    float d__;
+    int j4, j4p2;
+    float emin, temp;
 
     --z__;
 
-- 
GitLab