Skip to content

Commit 653e657

Browse files
authored
Merge pull request #1857 from brada4/fc-1847
Add gfortran -frecursive option from upstream and #1847
2 parents 974a6a3 + 5f8f058 commit 653e657

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Makefile.rule

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ NO_AFFINITY = 1
192192
# Flags for POWER8 are defined in Makefile.power. Don't modify COMMON_OPT
193193
# COMMON_OPT = -O2
194194

195-
# gfortran option for LAPACK
196-
# enable this flag only on 64bit Linux and if you need a thread safe lapack library
195+
# gfortran option for LAPACK to improve thread-safety
196+
# It is enabled by default in Makefile.system for gfortran
197197
# Flags for POWER8 are defined in Makefile.power. Don't modify FCOMMON_OPT
198198
# FCOMMON_OPT = -frecursive
199199

Makefile.system

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ endif
725725
ifeq ($(F_COMPILER), GFORTRAN)
726726
CCOMMON_OPT += -DF_INTERFACE_GFORT
727727
FCOMMON_OPT += -Wall
728+
# make single-threaded LAPACK calls thread-safe #1847
729+
FCOMMON_OPT += -frecursive
728730
#Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
729731
ifneq ($(NO_LAPACK), 1)
730732
EXTRALIB += -lgfortran

cmake/fc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ endif ()
4444

4545
if (${F_COMPILER} STREQUAL "GFORTRAN")
4646
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_GFORT")
47-
set(FCOMMON_OPT "${FCOMMON_OPT} -Wall")
47+
set(FCOMMON_OPT "${FCOMMON_OPT} -Wall -frecursive")
4848
#Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
4949
if (NOT NO_LAPACK)
5050
set(EXTRALIB "{EXTRALIB} -lgfortran")

0 commit comments

Comments
 (0)