GFORTRAN_MARCH to set -march value (e.g. GFORTRAN_MARCH=znver3 sets -march=znver3)

This commit is contained in:
edoapra 2023-08-01 14:53:20 -07:00
parent c9d83e4ab2
commit 10729d0c32
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0
2 changed files with 11 additions and 7 deletions

View file

@ -1,8 +1,10 @@
#!/usr/bin/env bash
if [[ -z $1 ]]; then
if [[ ! -z $GFORTRAN_MARCH ]] ; then
exit=0
elif [[ -z $1 ]]; then
#undefined
exit=1
elif [[ $1 == "N" ]] || [[ $1 == "n" ]] || [[ $1 == "0" ]] ; then
elif [[ $1 == "N" ]] || [[ $1 == "n" ]] || [[ $1 == "0" ]] || [[ ! -z $GFORTRAN_MARCH ]] ; then
exit=0
else
exit=1

View file

@ -2534,7 +2534,7 @@ ifneq ($(TARGET),LINUX)
# FOPTIMIZE += -xHost
ifndef USE_IFX
# crazy simd options
ifeq ($(shell $(CNFDIR)/check_env.sh $(USE_HWOPT)),1)
# ifeq ($(shell $(CNFDIR)/check_env.sh $(USE_HWOPT)),1)
ifeq ($(_IFCV17), Y)
ifeq ($(_GOTAVX512F),Y)
FOPTIMIZE += -axCORE-AVX512
@ -2547,7 +2547,7 @@ ifneq ($(TARGET),LINUX)
else ifeq ($(_GOTSSE3),Y)
FOPTIMIZE += -axSSE3
endif
endif
# endif
endif
FOPTIONS += -finline-limit=250
endif
@ -2746,6 +2746,9 @@ ifneq ($(TARGET),LINUX)
ifeq ($(shell $(CNFDIR)/check_env.sh $(USE_HWOPT)),1)
FOPTIMIZE += -mtune=native
endif
ifdef GFORTRAN_MARCH
FOPTIMIZE += -march=$(GFORTRAN_MARCH)
endif
# causes slowdows in mp2/ccsd
# FOPTIONS += -finline-functions
endif
@ -3090,7 +3093,6 @@ ifneq ($(TARGET),LINUX)
# DEFINES +=-DUSE_F90_ALLOCATABLE -DUSE_OMP_TEAMS_DISTRIBUTE
endif
endif
ifeq ($(NWCHEM_TARGET),CATAMOUNT)
DEFINES += -DCATAMOUNT
@ -3576,10 +3578,10 @@ ifdef USE_MPI
endif
ifdef MPI_LIB
$(info ***warning MPI_LIB ignored since FORCE_MPI_ENV not set***)
endif
endif
ifdef MPI_INCLUDE
$(info ***warning MPI_INCLUDE ignored since FORCE_MPI_ENV not set***)
endif
endif
endif
endif
# check if mpif90 is present