Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile reordering, marconi makefile and "DO LB" command. #339

Merged
merged 9 commits into from
Aug 24, 2017
Prev Previous commit
Next Next commit
Moved allocator, papi and vectorization
Now these are in the architecture specific makefile, as they should. Only marconi one updated yet, other makefiles should also be taken care of
  • Loading branch information
galfthan authored and ursg committed Aug 23, 2017
commit 1d4e88ea1de4540779ce41f37f7436ae47ffd7f2
60 changes: 44 additions & 16 deletions MAKE/Makefile.marconi
Original file line number Diff line number Diff line change
@@ -1,32 +1,63 @@
CMP = mpicxx
LNK = mpicxx


FLAGS =

#MARCONI - KNL based cluster
#
#The following module commands should give you the correct environment for this makefile
#module purge
#module load env-knl
#module load profile/advanced
#module load intel
#module load intelmpi
#module load boost
#module swap intelmpi mvapich2/2.2--intel--pe-xe-2017--binary


#======== Vectorization ==========
#Set vector backend type for vlasov solvers, sets precision and length.
#NOTE this has to have the same precision as the distribution function define (DISTRIBUTION_FP_PRECISION)
#Options:
# AVX: VEC4D_AGNER, VEC4F_AGNER, VEC8F_AGNER
# AVX512: VEC8D_AGNER, VEC16F_AGNER
# Fallback: VEC4D_FALLBACK, VEC4F_FALLBACK, VEC8F_FALLBACK

ifeq ($(DISTRIBUTION_FP_PRECISION),SPF)
#Single-precision
VECTORCLASS = VEC16F_AGNER
else
#Double-precision
VECTORCLASS = VEC8D_AGNER
endif

#======== PAPI ==========
#Add PAPI_MEM define to use papi to report memory consumption?
CXXFLAGS += -DPAPI_MEM


#======== Allocator =========
#Use TBB malloc
LDFLAGS += -L$(TBBROOT)/lib/intel64/gcc4.7/ -ltbbmalloc_proxy -ltbbmalloc


#======= Compiler and compilation flags =========
# NOTES on compiler flags:
# CXXFLAGS is for compiler flags, they are always used
# MATHFLAGS are for special math etc. flags, these are only applied on solver functions
# LDFLAGS flags for linker

#GNU flags:
CC_BRAND = intel
CC_BRAND_VERSION = 17.0.1
#CXXFLAGS += -O2 -xAVX2 -std=c++11 -qopenmp -ansi-alias
CXXFLAGS += -O2 -g -DMAX_VECTOR_SIZE=512 -xMIC-AVX512 -std=c++11 -qopenmp -ansi-alias
testpackage: CXXFLAGS = -O2 -std=c++11 -qopenmp -ansi-alias


MATHFLAGS =
LDFLAGS = -qopenmp -lifcore -L$(TBBROOT)/lib/intel64/gcc4.7/ -ltbbmalloc_proxy -ltbbmalloc
LDFLAGS += -qopenmp -lifcore
CMP = mpicxx
LNK = mpicxx


#======== Libraries ===========

HEADER_LIBRARY_PREFIX = /marconi_work/Pra14_3521/libraries
LIBRARY_PREFIX = /marconi_work/Pra14_3521/libraries


#compiled libraries

INC_BOOST = -I$(BOOST_INC)
LIB_BOOST = -L$(BOOST_LIB) -lboost_program_options

Expand All @@ -51,6 +82,3 @@ INC_DCCRG = -I$(HEADER_LIBRARY_PREFIX)/dccrg/
INC_VECTORCLASS = -I$(HEADER_LIBRARY_PREFIX)/vectorclass





35 changes: 11 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
#set default architecture, can be overridden from the compile line
ARCH = ${VLASIATOR_ARCH}
include MAKE/Makefile.${ARCH}

#set FP precision to SP (single) or DP (double)
FP_PRECISION = DP

#Set floating point precision for distribution function to SPF (single) or DPF (double)
#NOTE this has to have the same precision as the vectorclass defined below (VECTORCLASS)
DISTRIBUTION_FP_PRECISION = SPF
#override flags if we are building testpackage:

testpackage: MATHFLAGS =
testpackage: FP_PRECISION = DP
testpackage: DISTRIBUTION_FP_PRECISION = DPF


include MAKE/Makefile.${ARCH}




#Set vector backend type for vlasov solvers, sets precision and length.
#NOTE this has to have the same precision as the distribution function define (DISTRIBUTION_FP_PRECISION).
#Options:
# Agners vectorclass:
# AVX: VEC4D_AGNER, VEC4F_AGNER, VEC8F_AGNER
# AVX512: VEC8D_AGNER, VEC16F_AGNER
# Fallback: VEC4D_FALLBACK, VEC4F_FALLBACK, VEC8F_FALLBACK
VECTORCLASS = VEC8F_AGNER

#set a default archive utility, can also be set in Makefile.arch
AR ?= ar
Expand All @@ -27,19 +26,7 @@ FIELDSOLVER ?= londrillo_delzanna
# COMPFLAGS += -DFS_1ST_ORDER_SPACE
# COMPFLAGS += -DFS_1ST_ORDER_TIME

#override flags if we are building testpackage:
testpackage: MATHFLAGS =
testpackage: FP_PRECISION = DP
testpackage: DISTRIBUTION_FP_PRECISION = DPF
testpackage: VECTORCLASS = VEC4D_AGNER

#also use papi to report memory consumption?
PAPI_FLAG ?= -DPAPI_MEM
COMPFLAGS +=${PAPI_FLAG}

#Use jemalloc instead of system malloc to reduce memory fragmentation? https://github.com/jemalloc/jemalloc
#Configure jemalloc with --with-jemalloc-prefix=je_ when installing it
COMPFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE

#is profiling on?
COMPFLAGS += -DPROFILE
Expand Down