forked from cp2k/cp2k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Linux-intel-x86_64-minimal.psmp
58 lines (49 loc) · 1.67 KB
/
Linux-intel-x86_64-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
#!/bin/bash
#
# CP2K (Intel/MKL x86_64) minimal arch file for Linux clusters
#
# Tested with: Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.5.0
# Usage: Source this arch file after the module for Intel/MKL has been loaded if needed.
#
# Last update: 08.08.2022
#
# \
if [[ "${0}" == "${BASH_SOURCE}" ]]; then \
echo "ERROR: Script ${0##*/} must be sourced"; \
echo "Usage: source ${0##*/}"; \
exit 1; \
fi; \
this_file=${BASH_SOURCE##*/}; \
make -j ARCH=${this_file%.*} VERSION=${this_file##*.} realclean; \
make -j ARCH=${this_file%.*} VERSION=${this_file##*.}; \
return
CC = mpiicc
FC = mpiifort
LD = mpiifort
AR = ar -r
CFLAGS = -O2 -fopenmp -fp-model precise -funroll-loops -g -qopenmp-simd -traceback -xHost
DFLAGS = -D__FFTW3
DFLAGS += -D__MAX_CONTR=4
DFLAGS += -D__MKL
DFLAGS += -D__parallel
DFLAGS += -D__SCALAPACK
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) -static-intel -static_mpi
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)) $<