Add -frecursive gfortran option by default
authorAndrew <16061801+brada4@users.noreply.github.com>
Tue, 6 Nov 2018 08:20:55 +0000 (08:20 +0000)
committerAndrew <16061801+brada4@users.noreply.github.com>
Tue, 6 Nov 2018 08:20:55 +0000 (08:20 +0000)
Makefile.rule
Makefile.system

index 6522b07..d97607f 100644 (file)
@@ -192,8 +192,8 @@ NO_AFFINITY = 1
 # Flags for POWER8 are defined in Makefile.power. Don't modify COMMON_OPT
 # COMMON_OPT = -O2
 
-# gfortran option for LAPACK
-# enable this flag only on 64bit Linux and if you need a thread safe lapack library
+# gfortran option for LAPACK to improve thread-safety
+# It is enabled by default in Makefile.system for gfortran
 # Flags for POWER8 are defined in Makefile.power. Don't modify FCOMMON_OPT
 # FCOMMON_OPT = -frecursive
 
index b4cd422..8de0b8f 100644 (file)
@@ -718,6 +718,8 @@ endif
 ifeq ($(F_COMPILER), GFORTRAN)
 CCOMMON_OPT += -DF_INTERFACE_GFORT
 FCOMMON_OPT += -Wall
+# make single-threaded LAPACK calls thread-safe #1847
+FCOMMON_OPT += -frecursive
 #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
 ifneq ($(NO_LAPACK), 1)
 EXTRALIB += -lgfortran