Skip to content

Commit

Permalink
Rename arch file and make it sourceable
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Feb 28, 2022
1 parent 887bb64 commit 22356be
Showing 1 changed file with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
# Tested with: Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.1.217 Build 20200306
# Author: Matthias Krack (matthias.krack@psi.ch, PSI, January 2021)

# Cray XC40 (Piz Daint, CSCS, multi-core partition)

# Program environments:
# module add daint-mc
# module rm PrgEnv-cray
# module add PrgEnv-intel
#!/bin/bash
#
# CP2K (Intel/MKL x86_64) minimal arch file for CRAY XC40
#
# Tested with: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.3.0
# on Cray XC40 (Piz Daint, CSCS, multi-core partition)

# Author: Matthias Krack (25.02.2022)
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
module add daint-mc; \
module rm PrgEnv-cray; \
module add PrgEnv-intel; \
module rm intel; \
module add intel-classic; \
module list; \
make -j ARCH=${this_file%%.*} VERSION=${this_file##*.} realclean; \
make -j ARCH=${this_file%%.*} VERSION=${this_file##*.}; \
return

CC = cc
FC = ftn
LD = ftn
AR = ar -r

CFLAGS = -O3 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback
CFLAGS = -O2 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback

DFLAGS = -D__FFTW3
DFLAGS += -D__MAX_CONTR=4
Expand All @@ -30,8 +45,8 @@ FCFLAGS += -free
FCFLAGS += -I$(MKLROOT)/include
FCFLAGS += -I$(MKLROOT)/include/fftw

LDFLAGS = $(FCFLAGS) -static-intel
LDFLAGS_C = -nofor_main
LDFLAGS = $(FCFLAGS)
LDFLAGS_C = -nofor-main

MKL_LIB = $(MKLROOT)/lib/intel64

Expand Down

0 comments on commit 22356be

Please sign in to comment.