forked from cp2k/cp2k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CRAY-XC50_gnu.psmp
128 lines (105 loc) · 3.89 KB
/
CRAY-XC50_gnu.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
# Tested with: GFortran 8.3.0, MPICH 3.2.1, Cray-libsci 20.09.1, Cray-FFTW 3.3.8, Libint 2.6.0,
# LIBXC 5.1.5, LIBVORI 210412, LIBXSMM 1.16.1, ELPA 2021.05.001, PLUMED 2.7.2,
# SPGLIB 1.16.0, GSL 2.6, SIRIUS 7.2.5, COSMA 2.5.1
# Author: Matthias Krack ([email protected], PSI, July 2021)
# Cray XC50 (Piz Daint, CSCS, GPU partition)
# Program environments:
# module add daint-gpu
# module rm PrgEnv-cray
# module add PrgEnv-gnu
# module rm gcc/10.1.0
# module add gcc/8.3.0
# module add cray-fftw
# module add cudatoolkit
# source /store/psi/psi01/mkrack/daint/gpu/gnu/8.3.0/bin/init_gpu_gnu.sh
GNU_PATH = /store/psi/psi01/mkrack/daint/gpu/gnu/8.3.0
MPI_PATH = $(GNU_PATH)/mpich
GPUVER = P100
CC = cc
CXX = CC
OFFLOAD_CC = nvcc
FC = ftn
LD = ftn
AR = ar -r
include $(MPI_PATH)/plumed2/2.7.2/lib/plumed/src/lib/Plumed.inc.static
COSMA_INC = $(GNU_PATH)/COSMA/2.5.1/include
COSMA_LIB = $(GNU_PATH)/COSMA/2.5.1/lib
ELPA_VER = 2021.05.001
ELPA_INC = $(MPI_PATH)/elpa/$(ELPA_VER)/include/elpa-$(ELPA_VER)
ELPA_LIB = $(MPI_PATH)/elpa/$(ELPA_VER)/lib
GSL_INC = $(GNU_PATH)/gsl/2.6/include
GSL_LIB = $(GNU_PATH)/gsl/2.6/lib
LIBINT_INC = $(GNU_PATH)/libint/2.6.0-lmax-6/include
LIBINT_LIB = $(GNU_PATH)/libint/2.6.0-lmax-6/lib
LIBVORI_LIB = $(GNU_PATH)/libvori/210412/lib
LIBXC_INC = $(GNU_PATH)/libxc/5.1.5/include
LIBXC_LIB = $(GNU_PATH)/libxc/5.1.5/lib
LIBXSMM_INC = $(GNU_PATH)/libxsmm/1.16.1/include
LIBXSMM_LIB = $(GNU_PATH)/libxsmm/1.16.1/lib
SIRIUS_INC = $(GNU_PATH)/sirius/7.2.5/include
SIRIUS_LIB = $(GNU_PATH)/sirius/7.2.5/lib
SPGLIB_INC = $(GNU_PATH)/spglib/1.16.0/include
SPGLIB_LIB = $(GNU_PATH)/spglib/1.16.0/lib
# cc, CC, and ftn include already the proper -march flag
CFLAGS = -O3 -fopenmp -fopenmp-simd -ftree-vectorize -funroll-loops -g
DFLAGS = -D__COSMA
DFLAGS += -D__DBCSR_ACC
DFLAGS += -D__ELPA -D__ELPA_NVIDIA_GPU
DFLAGS += -D__FFTW3
DFLAGS += -D__GRID_CUDA
DFLAGS += -D__GSL
DFLAGS += -D__LIBINT
DFLAGS += -D__LIBVORI
DFLAGS += -D__LIBXC
DFLAGS += -D__LIBXSMM
DFLAGS += -D__MAX_CONTR=4
DFLAGS += -D__MPI_VERSION=3
DFLAGS += -D__PLUMED2
#DFLAGS += -D__PW_CUDA
DFLAGS += -D__SPGLIB
DFLAGS += -D__parallel
DFLAGS += -D__SCALAPACK
DFLAGS += -D__SIRIUS
#DFLAGS += -D__CHECK_DIAG
OFFLOAD_FLAGS = $(DFLAGS) -O3 -Xcompiler="-fopenmp" -arch sm_60 --std=c++11
CFLAGS += $(DFLAGS)
CFLAGS += -I$(COSMA_INC)
CFLAGS += -I$(ELPA_INC)/elpa -I$(ELPA_INC)/modules
CFLAGS += -I$(GSL_INC)
CFLAGS += -I$(LIBINT_INC)
CFLAGS += -I$(LIBXC_INC)
CFLAGS += -I$(LIBXSMM_INC)
CFLAGS += -I$(SIRIUS_INC)
CFLAGS += -I$(SPGLIB_INC)
CXXFLAGS = $(CFLAGS) -std=c++11
FCFLAGS = $(CFLAGS)
FCFLAGS += -fbacktrace
FCFLAGS += -ffree-form
FCFLAGS += -ffree-line-length-none
FCFLAGS += -fno-omit-frame-pointer
FCFLAGS += -std=f2008
LDFLAGS = $(FCFLAGS) # -static not possible with CUDA
LIBS = $(PLUMED_DEPENDENCIES)
LIBS += $(ELPA_LIB)/libelpa.a
LIBS += $(LIBVORI_LIB)/libvori.a
LIBS += $(LIBXC_LIB)/libxcf03.a
LIBS += $(LIBXC_LIB)/libxc.a
LIBS += $(LIBINT_LIB)/libint2.a
LIBS += $(SPGLIB_LIB)/libsymspg.a
LIBS += $(LIBXSMM_LIB)/libxsmmf.a
LIBS += $(LIBXSMM_LIB)/libxsmm.a
# Only needed for SIRIUS
LIBS += ${SIRIUS_LIB}/libsirius.a
LIBS += $(GNU_PATH)/SpFFT/1.0.4/lib/libspfft.a
LIBS += $(GNU_PATH)/SpLA/1.4.0/lib/libspla.a
LIBS += $(GNU_PATH)/hdf5/1.12.0/lib/libhdf5.a
# Only needed for COSMA
LIBS += $(COSMA_LIB)/libcosma_prefixed_pxgemm.a
LIBS += $(COSMA_LIB)/libcosma.a
LIBS += $(COSMA_LIB)/libcosta_prefixed_scalapack.a
LIBS += $(COSMA_LIB)/libcosta.a
#
LIBS += $(GSL_LIB)/libgsl.a
LIBS += $(GNU_PATH)/lib/libz.a
LIBS += -lcudart -lcublas -lcufft -lnvrtc -lrt
LIBS += -ldl -lstdc++