Skip to content

Commit 8084b31

Browse files
authored
Merge pull request #423 from GEOS-ESM/feature/mathomp4/v4-ifx-flags
v4: Update ifx flags for avx2
2 parents e9490c3 + 331961a commit 8084b31

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ workflows:
1717
- docker-hub-creds
1818
matrix:
1919
parameters:
20-
compiler: [gfortran, ifort]
20+
compiler: [gfortran, ifort, ifx]
2121
#baselibs_version: *baselibs_version
2222
repo: GEOSgcm
2323
checkout_fixture: true
@@ -35,7 +35,7 @@ workflows:
3535
- docker-hub-creds
3636
matrix:
3737
parameters:
38-
compiler: [gfortran, ifort]
38+
compiler: [gfortran, ifort, ifx]
3939
requires:
4040
- build-GEOSgcm-on-<< matrix.compiler >>
4141
repo: GEOSgcm
@@ -49,7 +49,7 @@ workflows:
4949
- docker-hub-creds
5050
matrix:
5151
parameters:
52-
compiler: [ifort]
52+
compiler: [ifort, ifx]
5353
# There seems to be an issue with gfortran, mom6, and GNU
5454
requires:
5555
- build-GEOSgcm-on-<< matrix.compiler >>

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Changed
1919

20+
- Update Intel LLVM Fortran flags to use `-march=x86-64-v3` as `-march=core-avx2` is not (technically?) supported by `ifx`
2021
- Reworked FMS detection to better handle the different `FV_PRECISION` cases in `FindBaselibs.cmake`
2122
- Change f2py detection for the odd case where there might be multiple Python installations. For now, if the path to the Python executable does not match the path to the f2py executable, we issue a `WARNING`. We use a `WARNING` since some installations (e.g., Spack) will have the Python executable in a different location than the f2py executable.
2223
- Removed warning that Baselibs is not supported, to a STATUS message.

compiler/flags/IntelLLVM_Fortran.cmake

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,18 @@ set (NO_RANGE_CHECK "")
6363

6464
cmake_host_system_information(RESULT proc_description QUERY PROCESSOR_DESCRIPTION)
6565
if (${proc_description} MATCHES "EPYC")
66-
# AMD EPYC processors support AVX2, but only via the -march=core-avx2 flag
67-
set (COREAVX2_FLAG "-march=core-avx2")
66+
set (MARCH_FLAG "-march=x86-64-v3")
6867
elseif (${proc_description} MATCHES "Hygon")
69-
# Hygon processors support AVX2, but only via the -march=core-avx2 flag
70-
set (COREAVX2_FLAG "-march=core-avx2")
68+
set (MARCH_FLAG "-march=x86-64-v3")
7169
elseif (${proc_description} MATCHES "Intel")
7270
# All the Intel processors that GEOS runs on support AVX2, but to be
73-
# consistent with the AMD processors, we use the -march=core-avx2 flag
74-
set (COREAVX2_FLAG "-march=core-avx2")
75-
# Previous versions of GEOS used this flag, which was not portable
76-
# for AMD. Keeping here for a few versions for historical purposes.
77-
#set (COREAVX2_FLAG "-xCORE-AVX2")
71+
# consistent with the AMD processors, we use the -march=x86-64-v3 flag
72+
set (MARCH_FLAG "-march=x86-64-v3")
7873
elseif ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
7974
# This is a fallback for when the above doesn't work. It should work
8075
# for most x86_64 processors, but it is not guaranteed to be optimal.
8176
message(WARNING "Unknown processory type. Defaulting to a generic x86_64 processor. Performance may be suboptimal.")
82-
set (COREAVX2_FLAG "")
77+
set (MARCH_FLAG "x86-64")
8378
else ()
8479
message(FATAL_ERROR "Unknown processor. Please file an issue at https://github.com/GEOS-ESM/ESMA_cmake")
8580
endif ()
@@ -108,7 +103,7 @@ set (GEOS_Fortran_NoVect_FPE_Flags "${common_Fortran_fpe_flags} ${ARCH_CONSISTEN
108103

109104
# GEOS Vectorize
110105
# --------------
111-
set (GEOS_Fortran_Vect_Flags "${FOPT3} ${DEBINFO} ${COREAVX2_FLAG} -fma -qopt-report0 ${FTZ} ${ALIGN_ALL} ${NO_ALIAS} -align array32byte")
106+
set (GEOS_Fortran_Vect_Flags "${FOPT3} ${DEBINFO} ${MARCH_FLAG} -fma -qopt-report0 ${FTZ} ${ALIGN_ALL} ${NO_ALIAS} -align array32byte")
112107
set (GEOS_Fortran_Vect_FPE_Flags "${FPE3} ${FP_MODEL_CONSISTENT} ${NOOLD_MAXMINLOC}")
113108

114109
# GEOS Release
@@ -118,7 +113,7 @@ set (GEOS_Fortran_Release_FPE_Flags "${GEOS_Fortran_Vect_FPE_Flags}")
118113

119114
# GEOS Aggressive
120115
# ---------------
121-
set (GEOS_Fortran_Aggressive_Flags "${FOPT3} ${DEBINFO} ${COREAVX2_FLAG} -fma -qopt-report0 ${FTZ} ${ALIGN_ALL} ${NO_ALIAS} -align array32byte")
116+
set (GEOS_Fortran_Aggressive_Flags "${FOPT3} ${DEBINFO} ${MARCH_FLAG} -fma -qopt-report0 ${FTZ} ${ALIGN_ALL} ${NO_ALIAS} -align array32byte")
122117
#set (GEOS_Fortran_Aggressive_Flags "${FOPT3} ${DEBINFO} -xSKYLAKE-AVX512 -qopt-zmm-usage=high -fma -qopt-report0 ${FTZ} ${ALIGN_ALL} ${NO_ALIAS} -align array64byte")
123118
set (GEOS_Fortran_Aggressive_FPE_Flags "${FPE3} ${FP_MODEL_FAST2} ${USE_SVML} ${NOOLD_MAXMINLOC}")
124119

0 commit comments

Comments
 (0)