forked from shedsaw/exciting-plus-rgvw-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.inc.summit.tau-pgi.cpu
118 lines (94 loc) · 4.36 KB
/
make.inc.summit.tau-pgi.cpu
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
#==============================================================================
# Exciting-Plus make.inc file for Summit (OLCF) with PGI compilers and TAU
# Last edited: May 6, 2020 (WYP)
#==============================================================================
MAKE = make
COMPILER = tau-pgi
# Compiler switch to turn on the preprocessor
CPP_OPTS = -Mpreprocess
# Add your custom preprocessor defines here
#CPP_OPTS +=
# Common compile time options
F90_OPTS = $(CPP_OPTS)
# Add your common compile time options here
F90_OPTS += -Minfo=ftn,loop,opt,mp,par,vect # Show optimizer log
#==============================================================================
# MPI
#==============================================================================
F90 = ${TAU_DIR}/bin/tau_f90.sh -optMpi
CXX = ${TAU_DIR}/bin/tau_cxx.sh -optMpi
CC = ${TAU_DIR}/bin/tau_cc.sh -optMpi
MPI_CPP_OPTS = -D_MPI_
CPP_OPTS += $(MPI_CPP_OPTS)
# Note: MPIMOD_PATH still needed after Mar 10 2020 stack upgrade
# TODO: resolve OLCF ticket #419691
# This is where mpi.mod resides
MPIMOD_PATH = ${OLCF_SPECTRUM_MPI_ROOT}/lib/PGI
F90_OPTS += -I${MPIMOD_PATH}
#==============================================================================
# OpenMP
#==============================================================================
# These are passed at compile time and link time
# Don't forget to `export OMP_STACKSIZE=2G` at runtime
OMP_OPTS = -mp
F90_OPTS += $(OMP_OPTS)
# Note: GCCOMP_PATH no longer needed after Mar 10 2020 stack upgrade
# IBM Spectrum MPI relies on libatomic and libpthreads
# from GCC's OpenMP libraries directory
# This path was extracted from the modules and stored as summit-gccpaths.sh
#GCCOMP_PATH = ${OLCF_GCC_ROOT}/lib64
#F90_LINK_OPTS += -L${GCCOMP_PATH}
#==============================================================================
# Compiler and linker options
#==============================================================================
# Profiling with equivalent options to '-O2'
# Note: don't use '-Mpfi', it is incompatible with '-mp' and '-fpic'
# Note: TAU automatically adds '-Minstrument'
#F90_OPTS += -O -Munroll -Mlre -Mvect=simd -Mflushz -Mcache_align -Mnoinline -Minform=warn
#F90_LINK_OPTS = $(F90_OPTS) -fpic
#EXE_SFX = prof
# Profiling with debug option to dump bmegqblh
CPP_OPTS += -D_DEBUG_bmegqblh_
F90_OPTS += -gopt -O -Munroll -Mlre -Mvect=simd -Mflushz -Mcache_align -Mnoinline -Minform=warn
F90_LINK_OPTS = $(F90_OPTS) -fpic
EXE_SFX = patch3-dumpvars
# Profiling with equivalent options to '-O2'
# Note: don't use '-Mpfi', it is incompatible with '-mp' and '-fpic'
# Note: TAU automatically adds '-Minstrument'
F90_OPTS += -O -Munroll -Mlre -Mvect=simd -Mflushz -Mcache_align -Mnoinline -Minform=warn
F90_LINK_OPTS = $(F90_OPTS) -fpic
EXE_SFX = prof
# Profiling, fully optimized
# TODO: test with PGI 20.1
#F90_OPTS += -fast -Munroll -Mnoinline -Minform=warn
#F90_LINK_OPTS = $(F90_OPTS) -fpic
#EXE_SFX = fastprof
#==============================================================================
# BLAS and LAPACK
#==============================================================================
# Use PGI's bundled BLAS and LAPACK
# TODO: test performance vs ESSL
#LAPACK_LIB = -lblas -llapack
# Use IBM ESSL (depends on libxlf90_r)
# This path was extracted from the modules and stored as summit-xlpaths.sh
# Make sure to `source summit-xlpaths.sh` and `module load essl`
# Note: it used to be necessary to also load libxlf90_r path to LD_LIBRARY_PATH
# on run time; this was fixed with the Mar 10 2020 stack upgrade
ESSL_PATH = ${OLCF_ESSL_ROOT}/lib64
XLF_PATH = ${OLCF_XLF_ROOT}/lib
LAPACK_LIB = -L$(ESSL_PATH) -lessl -L$(XLF_PATH) -lxlf90_r
#==============================================================================
# HDF5
#==============================================================================
# To disable, comment these three lines
# Make sure to `module load hdf5`
HDF5_INC = -I${OLCF_HDF5_ROOT}/include
HDF5_LIB = -L${OLCF_HDF5_ROOT}/lib -lhdf5_fortran -lhdf5_cpp -lhdf5_hl -lhdf5 -ldl
HDF5_CPP_OPTS := -D_HDF5_
CPP_OPTS += $(HDF5_CPP_OPTS)
F90_OPTS += $(HDF5_INC)
#==============================================================================
# List all libraries to link
#==============================================================================
# Note: TAU variables are defined in the TAU makefile
LIBS = $(LAPACK_LIB) $(HDF5_LIB) $(TAU_MPI_FLIBS) $(TAU_LIBS) $(TAU_CXXLIBS)