|
| 1 | +CMP = mpicxx |
| 2 | +LNK = mpicxx |
| 3 | + |
| 4 | +#======== Vectorization ========== |
| 5 | +#Set vector backend type for vlasov solvers, sets precision and length. |
| 6 | +#Options: |
| 7 | +# AVX: VEC4D_AGNER, VEC4F_AGNER, VEC8F_AGNER |
| 8 | +# AVX512: VEC8D_AGNER, VEC16F_AGNER |
| 9 | +# Fallback: VEC4D_FALLBACK, VEC4F_FALLBACK, VEC8F_FALLBACK |
| 10 | + |
| 11 | +ifeq ($(DISTRIBUTION_FP_PRECISION),SPF) |
| 12 | +#Single-precision |
| 13 | + VECTORCLASS = VEC8F_AGNER |
| 14 | +else |
| 15 | +#Double-precision |
| 16 | + VECTORCLASS = VEC4D_AGNER |
| 17 | +endif |
| 18 | + |
| 19 | +#======== PAPI ========== |
| 20 | +#Add PAPI_MEM define to use papi to report memory consumption? |
| 21 | +#CXXFLAGS += -DPAPI_MEM |
| 22 | + |
| 23 | + |
| 24 | +#======== Allocator ========= |
| 25 | +#Use jemalloc instead of system malloc to reduce memory fragmentation? https://github.com/jemalloc/jemalloc |
| 26 | +#Configure jemalloc with --with-jemalloc-prefix=je_ when installing it |
| 27 | +CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE |
| 28 | + |
| 29 | + |
| 30 | +#======= Compiler and compilation flags ========= |
| 31 | +# NOTES on compiler flags: |
| 32 | +# CXXFLAGS is for compiler flags, they are always used |
| 33 | +# MATHFLAGS are for special math etc. flags, these are only applied on solver functions |
| 34 | +# LDFLAGS flags for linker |
| 35 | + |
| 36 | +#-DNO_WRITE_AT_ALL: Define to disable write at all to |
| 37 | +# avoid memleak (much slower IO) |
| 38 | +#-DMPICH_IGNORE_CXX_SEEK: Ignores some multiple definition |
| 39 | +# errors that come up when using |
| 40 | +# mpi.h in c++ on Cray |
| 41 | + |
| 42 | +CXXFLAGS += -DMPICH_IGNORE_CXX_SEEK |
| 43 | + |
| 44 | +FLAGS = |
| 45 | + |
| 46 | +#GNU flags: |
| 47 | +CC_BRAND = gcc |
| 48 | +CC_BRAND_VERSION = 7.3.0 |
| 49 | +CXXFLAGS += -g -O3 -qopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -mavx |
| 50 | +testpackage: CXXFLAGS += -g -O2 -qopenmp -funroll-loops -std=c++0x -mavx |
| 51 | + |
| 52 | +MATHFLAGS = -ffast-math |
| 53 | +LDFLAGS = -lrt -std=c++17 -liomp5 |
| 54 | +LIB_MPI = -lgomp |
| 55 | + |
| 56 | +# BOOST_VERSION = current trilinos version |
| 57 | +# ZOLTAN_VERSION = current trilinos verson |
| 58 | +# |
| 59 | +#======== Libraries =========== |
| 60 | + |
| 61 | +MPT_VERSION = 3.1.3 |
| 62 | +JEMALLOC_VERSION = 4.0.4 |
| 63 | +LIBRARY_PREFIX = /proj/uganse/libraries |
| 64 | + |
| 65 | + |
| 66 | +#compiled libraries |
| 67 | +INC_BOOST = |
| 68 | +LIB_BOOST = -lboost_program_options |
| 69 | + |
| 70 | +INC_ZOLTAN = -I$(LIBRARY_PREFIX)/intel/Zoltan_v3.8/include |
| 71 | +LIB_ZOLTAN = -L$(LIBRARY_PREFIX)/intel/Zoltan_v3.8/lib -lzoltan |
| 72 | + |
| 73 | +INC_JEMALLOC = -I$(LIBRARY_PREFIX)/intel/jemalloc/include |
| 74 | +LIB_JEMALLOC = -L$(LIBRARY_PREFIX)/intel/jemalloc/lib -ljemalloc |
| 75 | +LDFLAGS += -Wl,-rpath=$(LIBRARY_PREFIX)/intel/jemalloc/lib |
| 76 | + |
| 77 | +INC_VLSV = -I$(LIBRARY_PREFIX)/intel/vlsv |
| 78 | +LIB_VLSV = -L$(LIBRARY_PREFIX)/intel/vlsv -lvlsv |
| 79 | + |
| 80 | +LIB_PROFILE = -L$(LIBRARY_PREFIX)/intel/phiprof/lib -lphiprof |
| 81 | +INC_PROFILE = -I$(LIBRARY_PREFIX)/intel/phiprof/include |
| 82 | +LDFLAGS += -Wl,-rpath=$(LIBRARY_PREFIX)/intel/phiprof/lib |
| 83 | + |
| 84 | +#LIB_PAPI = -L$(LIBRARY_PREFIX)/taito/openmpi/$(MPT_VERSION)/$(CC_BRAND)/$(CC_BRAND_VERSION)/papi/5.5.0/lib -lpapi |
| 85 | +#INC_PAPI = -I$(LIBRARY_PREFIX)/taito/openmpi/$(MPT_VERSION)/$(CC_BRAND)/$(CC_BRAND_VERSION)/papi/5.5.0/include |
| 86 | + |
| 87 | +#header libraries |
| 88 | + |
| 89 | +INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid/ |
| 90 | +INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg/ |
| 91 | +INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
0 commit comments