-
Notifications
You must be signed in to change notification settings - Fork 0
/
Eiger-gfortran.psmp
137 lines (116 loc) · 3.44 KB
/
Eiger-gfortran.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# === For the CSCS HPE Cray EX System Alps (Eiger) ====
# Uses only libraries provided by CSCS in the cpeGNU environment.
#
# USAGE:
# 1. source this arch file to load the required modules:
# source arch/Eiger-gfortran.psmp
# 2. follow the printed instructions
# 3. Optionally: use some of the options below to tune the installation
# 4. To run a calculation: no module has to be loaded
#
# \
module load cray/21.12 ; \
module load cpeGNU/21.12 ; \
module load \
cray-fftw \
ELPA/2021.11.001 \
libxsmm/1.17 \
libxc/5.1.7 \
Libint-CP2K/2.6.0 \
SIRIUS/7.3.1 \
spglib/1.16.3 \
libvori/210412 \
PLUMED/2.7.3 \
cray-mpich/8.1.12 \
; \
module list ; \
module save cp2k_gfortran_psmp ; \
echo "Please check the output above for error messages!" ; \
echo "If everything is OK, build CP2K with:" ; \
echo " make -j ARCH=Eiger-gfortran VERSION=psmp" ; \
echo "" ; \
echo "To load the required modules in your sbatch script, use:" ; \
echo " module restore cp2k_gfortran_psmp" ; \
/usr/bin/test _`echo is_csh 2>/dev/null` != _is_csh && exit ; \
return
# === OPTIONS ===
# To disable/enable them add them to the make call:
# ex.: make -j ARCH=Eiger-gfortran VERSION=psmp USE_ELPA=0
# NOTES:
# Current versions of ELPA, SIRIUS, LIBVORI and PLUMED provided by CSCS on Eiger are too old to run
# with the current development version of CP2K. The user should install these via the toolchain,
# in case they should need these libraries.
WITH_MKL=0
USE_ELPA=0
USE_LIBINT=1
USE_SIRIUS=0
USE_SPGLIB=1
USE_LIBVORI=0
USE_PLUMED=0
CHECKS=0
# === PRE-PROCESSOR FLAGS (base) ===
DFLAGS = -D__parallel \
-D__FFTW3 \
-D__LIBXSMM \
-D__LIBXC
# === LIBRARIES and MODULES ===
LIBS += -lfftw3 -lfftw3_omp
LIBS += -lxcf03 -lxc
INCS += -I$(EBROOTLIBXC)/include
LIBS += -lxsmmf -lxsmm -ldl
INCS += -I$(EBROOTLIBXSMM)/include
ifeq ($(USE_ELPA),1)
DFLAGS += -D__ELPA
LIBS += -lelpa_openmp
INCS += -I$(ELPA_INCLUDE_DIR)/modules
endif
ifeq ($(USE_LIBINT),1)
DFLAGS += -D__LIBINT -D__MAX_CONTR=4
LIBS += -lint2 -lstdc++
INCS += -I$(EBROOTLIBINTMINCP2K)/include
endif
ifeq ($(USE_SIRIUS),1)
DFLAGS += -D__SIRIUS
LIBS += -lsirius
INCS += -I$(EBROOTSIRIUS)/include/sirius
endif
ifeq ($(USE_SPGLIB),1)
DFLAGS += -D__SPGLIB
LIBS += -lsymspg
INCS += -I$(EBROOTSPGLIB)/include
endif
ifeq ($(USE_LIBVORI),1)
DFLAGS += -D__LIBVORI
LIBS += $(EBROOTLIBVORI)/lib/libvori.a
endif
ifeq ($(USE_PLUMED),1)
DFLAGS += -D__PLUMED2
LIBS += -lplumed
endif
ifeq ($(WITH_MKL),1)
LIBS += -L/opt/intel/mkl/lib/intel64 -Wl,-rpath=/opt/intel/mkl/lib/intel64 \
-lmkl_scalapack_lp64 \
-Wl,--start-group \
-lmkl_gf_lp64 \
-lmkl_sequential \
-lmkl_core \
-lmkl_blacs_intelmpi_lp64 \
-Wl,--end-group
INCS += -I/opt/intel/mkl/include
endif
# === BINARIES (COMPILER, LINKER, ...) ===
CC = cc
CXX = CC
FC = ftn
LD = ftn
AR = ar -r
# === COMPILER FLAGS ===
AFLAGS = $(DFLAGS) $(INCS) -g1 -fopenmp -O3 -funroll-loops
FCFLAGS = $(AFLAGS) -ffree-form -ffree-line-length-512 -fallow-argument-mismatch
CFLAGS = $(AFLAGS)
CXXFLAGS = $(AFLAGS)
LDFLAGS = $(FCFLAGS)
# -fallow-argument-mismatch: needed for (Cray-)MPICH and tightened interface requirements introduced in GCC-10
ifeq ($(CHECKS),1)
FCFLAGS += -g -fcheck=bounds,do,recursion,pointer -Wconversion -fbacktrace
endif