Skip to content

Commit

Permalink
Adjust preprocessor flags in arch files and toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederick Stein committed Jan 10, 2023
1 parent bb0794f commit 876a7e4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions arch/CRAY-XC40-cce.psmp
Expand Up @@ -10,8 +10,6 @@ FC = ftn
LD = ftn
AR = ar -r
DFLAGS = -D__FFTW3 -D__parallel -D__SCALAPACK -D__FORCE_USE_FAST_MATH
# CRAY does not provide the mpi_f08 module
DFLAGS += -D__NO_MPI_F08
# DFLAGS += -D__LIBXSMM
DFLAGS += -D__LIBINT -D__MAX_CONTR=4
DFLAGS += -D__LIBXC
Expand Down
2 changes: 0 additions & 2 deletions arch/CRAY-XC40-gnu.psmp
Expand Up @@ -94,8 +94,6 @@ CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g

DFLAGS := -D__parallel
DFLAGS += -D__SCALAPACK
# CRAY does not provide the mpi_f08 module
DFLAGS += -D__NO_MPI_F08
DFLAGS += -D__FFTW3
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))

Expand Down
2 changes: 0 additions & 2 deletions arch/CRAY-XC40-intel-minimal.psmp
Expand Up @@ -35,8 +35,6 @@ DFLAGS += -D__MAX_CONTR=4
DFLAGS += -D__MKL
DFLAGS += -D__parallel
DFLAGS += -D__SCALAPACK
# CRAY does not provide the mpi_f08 module
DFLAGS += -D__NO_MPI_F08

FCFLAGS = $(CFLAGS) $(DFLAGS)
FCFLAGS += -diag-disable=8291
Expand Down
2 changes: 0 additions & 2 deletions arch/CRAY-XC50-gnu.psmp
Expand Up @@ -102,8 +102,6 @@ CFLAGS := -O2 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g

DFLAGS := -D__parallel
DFLAGS += -D__SCALAPACK
# CRAY does not provide the mpi_f08 module
DFLAGS += -D__NO_MPI_F08
DFLAGS += -D__FFTW3
DFLAGS += -D__MAX_CONTR=$(strip $(MAX_CONTR))

Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/stage1/install_intelmpi.sh
Expand Up @@ -89,7 +89,7 @@ export INTELMPI_LIBS="${INTELMPI_LIBS}"
export MPI_CFLAGS="${INTELMPI_CFLAGS}"
export MPI_LDFLAGS="${INTELMPI_LDFLAGS}"
export MPI_LIBS="${INTELMPI_LIBS}"
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__parallel|)"
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__parallel -D__MPI_F08|)"
export CP_CFLAGS="\${CP_CFLAGS} IF_MPI(${INTELMPI_CFLAGS}|)"
export CP_LDFLAGS="\${CP_LDFLAGS} IF_MPI(${INTELMPI_LDFLAGS}|)"
export CP_LIBS="\${CP_LIBS} IF_MPI(${INTELMPI_LIBS}|)"
Expand Down
5 changes: 5 additions & 0 deletions tools/toolchain/scripts/stage1/install_openmpi.sh
Expand Up @@ -152,6 +152,11 @@ export MPI_CFLAGS="${OPENMPI_CFLAGS}"
export MPI_LDFLAGS="${OPENMPI_LDFLAGS}"
export MPI_LIBS="${OPENMPI_LIBS}"
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__parallel|)"
# For proper mpi_f08 support, we need at least GCC version 9 (asynchronous keyword)
# Other compilers should work
if ! [ "$(gfortran -dumpversion | cut -d. -f1)" -lt 9 ]; then
export CP_DFLAGS="\${CP_DFLAGS} IF_MPI(-D__MPI_F08|)"
fi
export CP_CFLAGS="\${CP_CFLAGS} IF_MPI(${OPENMPI_CFLAGS}|)"
export CP_LDFLAGS="\${CP_LDFLAGS} IF_MPI(${OPENMPI_LDFLAGS}|)"
export CP_LIBS="\${CP_LIBS} IF_MPI(${OPENMPI_LIBS}|)"
Expand Down

0 comments on commit 876a7e4

Please sign in to comment.