Skip to content

Commit

Permalink
Merge pull request #534 from ursg/makefileCleanup2
Browse files Browse the repository at this point in the history
Makefile cleanup part 2: Remove one more makefile, add VECTORCLASS path to two others.
  • Loading branch information
markusbattarbee authored Mar 10, 2021
2 parents cb59d89 + 0d0418f commit c87ab78
Show file tree
Hide file tree
Showing 16 changed files with 168 additions and 239 deletions.
44 changes: 19 additions & 25 deletions MAKE/Makefile.Freezer
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,6 @@ else
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/../vlasiator/vlasovsolver
endif

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


#======== Allocator =========
#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
#CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#======= 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

#-DNO_WRITE_AT_ALL: Define to disable write at all to
# avoid memleak (much slower IO)
#-DMPICH_IGNORE_CXX_SEEK: Ignores some multiple definition
# errors that come up when using
# mpi.h in c++ on Cray

#CXXFLAGS += -DMPICH_IGNORE_CXX_SEEK

#FLAGS = -ggdb

#GNU flags:
Expand All @@ -65,6 +40,25 @@ LDFLAGS =
#-g -ggdb
LIB_MPI = -lgomp -lgfortran -lpapi


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

#======== Allocator =========
#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
#CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
#testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#======= 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

# BOOST_VERSION = current trilinos version
# ZOLTAN_VERSION = current trilinos verson

Expand Down
23 changes: 13 additions & 10 deletions MAKE/Makefile.docker
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,27 @@ else
VECTORCLASS = VEC4D_AGNER
endif

FLAGS =

#GNU flags:
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx2
testpackage: CXXFLAGS = -O2 -fopenmp -funroll-loops -std=c++17 -fabi-version=0 -mavx

MATHFLAGS = -ffast-math
LDFLAGS = -g
LIB_MPI = -lgomp

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


#======== Allocator =========
#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
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#======= Compiler and compilation flags =========
Expand All @@ -42,16 +54,7 @@ CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
# mpi.h in c++ on Cray

CXXFLAGS += -DMPICH_IGNORE_CXX_SEEK

FLAGS =

#GNU flags:
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++11 -W -Wall -Wno-unused -fabi-version=0 -mavx2
testpackage: CXXFLAGS = -O2 -fopenmp -funroll-loops -std=c++0x -fabi-version=0 -mavx

MATHFLAGS = -ffast-math
LDFLAGS = -g
LIB_MPI = -lgomp
testpackage: CXXFLAGS += -DMPICH_IGNORE_CXX_SEEK

# BOOST_VERSION = current trilinos version
# ZOLTAN_VERSION = current trilinos verson
Expand Down
7 changes: 3 additions & 4 deletions MAKE/Makefile.hawk_gcc_mpt
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ LIBRARY_PREFIX = /zhome/academic/HLRS/pri/ipryakem/libraries
#======== PAPI ==========
#Add PAPI_MEM define to use papi to report memory consumption?
CXXFLAGS += -DPAPI_MEM

testpackage: CXXFLAGS += -DPAPI_MEM

#======== Allocator =========
#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
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#compiled libraries
Expand Down Expand Up @@ -99,7 +100,5 @@ LIB_PAPI = -L/opt/hlrs/spack/rev-004_2020-06-17/papi/c048e224f-gcc-9.2.0-hxfnx7k
INC_EIGEN = -I$(LIBRARY_PREFIX)/
INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg/
INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid/



INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass-version1

2 changes: 2 additions & 0 deletions MAKE/Makefile.hawk_gcc_openmpi
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ LIBRARY_PREFIX = /zhome/academic/HLRS/pri/ipryakem/libraries
#======== PAPI ==========
#Add PAPI_MEM define to use papi to report memory consumption?
CXXFLAGS += -DPAPI_MEM
testpackage: CXXFLAGS += -DPAPI_MEM


#======== Allocator =========
#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
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#compiled libraries
Expand Down
3 changes: 3 additions & 0 deletions MAKE/Makefile.hawk_intel_mpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ FLAGS =
#GNU flags:
CC_BRAND = intel
CC_BRAND_VERSION = 19.1.0
# note: std was not updated to c++17
CXXFLAGS += -traceback -g -O3 -qopenmp -std=c++14 -W -Wall -Wno-unused -march=core-avx2 -qopt-zmm-usage=high
testpackage: CXXFLAGS = -g -traceback -O2 -qopenmp -std=c++14 -W -Wno-unused -march=core-avx2
not_parallel_tools: CXXFLAGS += -march=native -mno-avx2 -mavx
Expand All @@ -47,12 +48,14 @@ LIBRARY_PREFIX = /zhome/academic/HLRS/pri/ipryakem/libraries
#======== PAPI ==========
#Add PAPI_MEM define to use papi to report memory consumption?
CXXFLAGS += -DPAPI_MEM
testpackage: CXXFLAGS += -DPAPI_MEM


#======== Allocator =========
#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
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#compiled libraries
Expand Down
3 changes: 3 additions & 0 deletions MAKE/Makefile.hawk_intel_openmpi
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ FLAGS =
#GNU flags:
CC_BRAND = intel
CC_BRAND_VERSION = 19.1.0
#note: std was not updated to c++17
CXXFLAGS += -traceback -g -O3 -qopenmp -std=c++14 -W -Wall -Wno-unused -march=core-avx2 -qopt-zmm-usage=high
testpackage: CXXFLAGS = -g -traceback -O2 -qopenmp -std=c++14 -W -Wno-unused -march=core-avx2
not_parallel_tools: CXXFLAGS += -march=native -mno-avx2 -mavx
Expand All @@ -49,12 +50,14 @@ LIBRARY_PREFIX = /zhome/academic/HLRS/pri/ipryakem/libraries
#======== PAPI ==========
#Add PAPI_MEM define to use papi to report memory consumption?
CXXFLAGS += -DPAPI_MEM
testpackage: CXXFLAGS += -DPAPI_MEM


#======== Allocator =========
#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
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE


#compiled libraries
Expand Down
10 changes: 6 additions & 4 deletions MAKE/Makefile.home
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ CMP = mpic++
LNK = mpic++

FLAGS =
CXXFLAGS = -I$(HOME)/include -I/usr/include -L$(HOME)/lib -L/usr/lib -O3 -funroll-loops -std=c++11 -W -Wall -pedantic -Wno-unused -Wno-unused-parameter -Wno-missing-braces -fopenmp
#CXXFLAGS = -I$(HOME)/include -L$(HOME)/lib -O0 -funroll-loops -std=c++11 -W -Wall -pedantic -Wno-unused -Wno-unused-parameter -Wno-missing-braces -g -fopenmp
# note: std was c++11
# note: testpackage settings missing
CXXFLAGS = -I$(HOME)/include -I/usr/include -L$(HOME)/lib -L/usr/lib -O3 -funroll-loops -std=c++17 -W -Wall -pedantic -Wno-unused -Wno-unused-parameter -Wno-missing-braces -fopenmp
#CXXFLAGS = -I$(HOME)/include -L$(HOME)/lib -O0 -funroll-loops -std=c++17 -W -Wall -pedantic -Wno-unused -Wno-unused-parameter -Wno-missing-braces -g -fopenmp
MATHFLAGS = -ffast-math
LDFLAGS = -L $(HOME)/lib
LIB_MPI = -lgomp
# LIB_MPI =

LIBRARY_PREFIX = $HOME
LIBRARY_PREFIX_B = $HOME
LIBRARY_PREFIX = $(HOME)
LIBRARY_PREFIX_B = $(HOME)

INC_BOOST = -I${HOME}/include
LIB_BOOST = -L${HOME}/lib -lboost_program_options
Expand Down
12 changes: 10 additions & 2 deletions MAKE/Makefile.kstppd
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ LNK = mpic++

ifeq ($(DISTRIBUTION_FP_PRECISION),SPF)
#Single-precision
VECTORCLASS = VEC4F_FALLBACK
VECTORCLASS = VEC8F_AGNER
else
#Double-precision
VECTORCLASS = VEC4D_FALLBACK
VECTORCLASS = VEC4D_AGNER
endif



#======== Flags =========

FLAGS =
Expand All @@ -47,6 +48,13 @@ testpackage: CXXFLAGS += -DPAPI_MEM
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE

#======== Allocator =========
#Use TBB malloc


PAPI_FLAG =


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

LIBRARY_PREFIX = $(HOME)
Expand Down
41 changes: 20 additions & 21 deletions MAKE/Makefile.mahti_gcc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ LNK = mpic++
# Modules loaded
# module load gcc boost jemalloc papi openmpi zoltan


#======== Vectorization ==========
#Set vector backend type for vlasov solvers, sets precision and length.
#Options:
Expand All @@ -20,16 +19,6 @@ else
VECTORCLASS = VEC4D_AGNER
endif


#======= 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

#-DNO_WRITE_AT_ALL: Define to disable write at all to
# avoid memleak (much slower IO)

FLAGS =

#GNU flags:
Expand All @@ -42,24 +31,34 @@ MATHFLAGS = -ffast-math
LDFLAGS = -lrt
LIB_MPI = -lgomp

# BOOST_VERSION = current trilinos version
# ZOLTAN_VERSION = current trilinos verson
#
#======== Libraries ===========

MPT_VERSION = 4.0.3
JEMALLOC_VERSION = 5.2.1
LIBRARY_PREFIX = /users/kempf/libraries

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

testpackage: CXXFLAGS += -DPAPI_MEM

#======== Allocator =========
#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
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE

#======= 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

#-DNO_WRITE_AT_ALL: Define to disable write at all to
# avoid memleak (much slower IO)

# BOOST_VERSION = current trilinos version
# ZOLTAN_VERSION = current trilinos verson
#
#======== Libraries ===========

MPT_VERSION = 4.0.3
JEMALLOC_VERSION = 5.2.1
LIBRARY_PREFIX = /users/kempf/libraries


#compiled libraries
Expand Down
23 changes: 13 additions & 10 deletions MAKE/Makefile.marconi
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,35 @@ else
VECTORCLASS = VEC8D_AGNER
endif

#GNU flags:
CC_BRAND = intel
CC_BRAND_VERSION = 17.0.1
# note: std was c++11
CXXFLAGS += -O2 -g -DMAX_VECTOR_SIZE=512 -xMIC-AVX512 -std=c++17 -qopenmp -ansi-alias
testpackage: CXXFLAGS = -O2 -g -DMAX_VECTOR_SIZE=512 -xMIC-AVX512 -std=c++17 -qopenmp -ansi-alias
MATHFLAGS =
LDFLAGS += -qopenmp -lifcore -Wl,-rpath,/cineca/prod/opt/libraries/boost/1.61.0/intelmpi--2017--binary/lib,-rpath,/marconi_work/Pra14_3521/libraries/phiprof/lib,-rpath,/marconi_work/Pra14_3521/libraries/papi/lib
CMP = mpicxx
LNK = mpicxx

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


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


#======= 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 -g -DMAX_VECTOR_SIZE=512 -xMIC-AVX512 -std=c++11 -qopenmp -ansi-alias
testpackage: CXXFLAGS = -O2 -g -DMAX_VECTOR_SIZE=512 -xMIC-AVX512 -std=c++11 -qopenmp -ansi-alias
MATHFLAGS =
LDFLAGS += -qopenmp -lifcore -Wl,-rpath,/cineca/prod/opt/libraries/boost/1.61.0/intelmpi--2017--binary/lib,-rpath,/marconi_work/Pra14_3521/libraries/phiprof/lib,-rpath,/marconi_work/Pra14_3521/libraries/papi/lib
CMP = mpicxx
LNK = mpicxx


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

Expand Down
Loading

0 comments on commit c87ab78

Please sign in to comment.