-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCRAY-XC40-intel-minimal.psmp
61 lines (53 loc) · 1.72 KB
/
CRAY-XC40-intel-minimal.psmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/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)
#
# Last update: 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 = -O2 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback
DFLAGS = -D__FFTW3
DFLAGS += -D__MAX_CONTR=4
DFLAGS += -D__MKL
DFLAGS += -D__parallel
FCFLAGS = $(CFLAGS) $(DFLAGS)
FCFLAGS += -diag-disable=8291
FCFLAGS += -diag-disable=8293
FCFLAGS += -fpp
FCFLAGS += -free
FCFLAGS += -I$(MKLROOT)/include
FCFLAGS += -I$(MKLROOT)/include/fftw
LDFLAGS = $(FCFLAGS)
LDFLAGS_C = -nofor-main
MKL_LIB = $(MKLROOT)/lib/intel64
LIBS = $(MKL_LIB)/libmkl_scalapack_lp64.a
LIBS += -Wl,--start-group
LIBS += $(MKL_LIB)/libmkl_intel_lp64.a
LIBS += $(MKL_LIB)/libmkl_sequential.a
LIBS += $(MKL_LIB)/libmkl_core.a
LIBS += $(MKL_LIB)/libmkl_blacs_intelmpi_lp64.a
LIBS += -Wl,--end-group
# Required due to memory leak that occurs if high optimisations are used
mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F
$(FC) -c $(subst O2,O0,$(FCFLAGS)) $<