Skip to content

Commit

Permalink
Avoid using some gcc-specific flags with IBM xlf
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Sep 24, 2023
1 parent bb47183 commit 8012afc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile.power
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ FCOMMON_OPT += -O2 -qrecur -qnosave
else
FCOMMON_OPT += -O2 -frecursive -fno-fast-math
endif
ifeq ($(C_COMPILER), GCC)

ifeq ($(F_COMPILER), GFORTRAN)
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
FCOMMON_OPT += -mcpu=power8 -mtune=power8
else
FCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
FCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
FCOMMON_OPT += -O2 -Mrecursive
Expand Down Expand Up @@ -84,12 +83,16 @@ CCOMMON_OPT += -DUSE_OPENMP -fopenmp
else
CCOMMON_OPT += -DUSE_OPENMP -mp
endif
ifeq ($(F_COMPILER), IBM)
FCOMMON_OPT += -DUSE_OPENMP
else
ifneq ($(F_COMPILER), PGI)
FCOMMON_OPT += -DUSE_OPENMP -fopenmp
else
FCOMMON_OPT += -DUSE_OPENMP -mp
endif
endif
endif

# workaround for C->FORTRAN ABI violation in LAPACKE
ifeq ($(F_COMPILER), GFORTRAN)
Expand Down

0 comments on commit 8012afc

Please sign in to comment.