Makefile.config (3768B)
1 SHELL := /bin/bash 2 3 CC ?= mpic++ 4 # CC ?= g++ 5 6 config ?= release 7 bs ?= 16 8 align ?= 16 9 omp ?= 0 10 hdf ?= 1 11 cubismz ?= 0 12 prec ?= float 13 14 #compression stage-1 (floating point) 15 wavz ?= 1 16 fpc ?= 0 17 fpzip ?= 0 18 shuffle ?= 0 19 zerobits ?= 0 20 drain ?= 0 21 22 #compression stage-2 (encoding) 23 zlib ?= 1 24 lz4 ?= 0 25 lzf ?= 0 26 lzma ?= 0 27 zopfli ?=0 28 #fpc2 ?= 0 # this works but I do not know what we compress (mix below) 29 #fpzip2 ?= 0 # this does not seem to work when the stream is a mix of integers and floats 30 # 31 32 #fpc3 ?= 0 # for wavz + fpc 33 #fpzip3 ?= 0 # for wavz + fpz 34 shuffle3 ?= 0 # for wavz + shuffle3 35 36 INC = -Iinclude 37 INC += -Isrc 38 LIB = -Llib 39 40 CFLAGS = 41 CPPFLAGS = -std=c++11 42 43 ifeq "$(omp)" "1" 44 CFLAGS += -fopenmp 45 CPPFLAGS += -fopenmp -D_USE_OMP_ 46 endif 47 48 ifeq "$(hdf)" "1" 49 ifneq "$(findstring kilo,$(shell hostname))" "" 50 # INC += -I${HOME}/local/hdf5-1.8.17/build/include 51 # LIB += -L${HOME}/local/hdf5-1.8.17/build/lib -lhdf5 52 INC += -I${HOME}/local/hdf5-1.8.17/build-parallel/include 53 LIB += -L${HOME}/local/hdf5-1.8.17/build-parallel/lib -lhdf5 54 else 55 INC += -I/usr/local/include 56 LIB += -lhdf5 57 endif 58 CPPFLAGS += -D_USE_HDF_ 59 endif 60 61 ifeq "$(cubismz)" "1" 62 INC += -Ithird_party/CubismZ/CubismApps/Compressor/source 63 LIB += -lCubismZ 64 CPPFLAGS += -D_USE_CUBISMZ_ 65 endif 66 67 ifeq "$(prec)" "float" 68 CPPFLAGS += -D_FLOAT_PRECISION_ -D_SP_COMP_ 69 endif 70 71 ifneq "$(config)" "release" 72 CFLAGS += -g -O0 73 CPPFLAGS += -g -O0 74 else 75 CFLAGS += -O3 -DNDEBUG 76 CPPFLAGS += -O3 -DNDEBUG 77 endif 78 79 # Compression Options 80 ifeq "$(wavz)" "1" 81 CPPFLAGS += -D_USE_WAVZ_ 82 endif 83 84 ifeq "$(fpc)" "1" 85 CPPFLAGS += -D_USE_FPC_ 86 endif 87 88 ifeq "$(fpzip)" "1" 89 CPPFLAGS += -D_USE_FPZIP_ 90 endif 91 92 ifeq "$(drain)" "1" 93 CPPFLAGS += -D_USE_DRAIN_ 94 endif 95 96 ifeq "$(shuffle)" "1" 97 CPPFLAGS += -D_USE_SHUFFLE_ 98 endif 99 100 ifeq "$(zerobits)" "4" 101 CPPFLAGS += -D_USE_ZEROBITS_ 102 CPPFLAGS += -D_ZEROBITS_=4 103 endif 104 ifeq "$(zerobits)" "8" 105 CPPFLAGS += -D_USE_ZEROBITS_ 106 CPPFLAGS += -D_ZEROBITS_=8 107 endif 108 ifeq "$(zerobits)" "12" 109 CPPFLAGS += -D_USE_ZEROBITS_ 110 CPPFLAGS += -D_ZEROBITS_=12 111 endif 112 ifeq "$(zerobits)" "16" 113 CPPFLAGS += -D_USE_ZEROBITS_ 114 CPPFLAGS += -D_ZEROBITS_=16 115 endif 116 117 118 # Encoding Options 119 ifeq "$(zlib)" "1" 120 CPPFLAGS += -D_USE_ZLIB_ 121 LIB += -lz 122 endif 123 124 ifeq "$(lz4)" "1" 125 CPPFLAGS += -D_USE_LZ4_ 126 endif 127 128 ifeq "$(lzf)" "1" 129 CPPFLAGS += -D_USE_LZF_ 130 endif 131 132 ifeq "$(lzma)" "1" 133 CPPFLAGS += -D_USE_LZMA_ 134 endif 135 136 ifeq "$(zopfli)" "1" 137 CPPFLAGS += -D_USE_ZOPFLI_ 138 endif 139 140 ifeq "$(fpc2)" "1" 141 CPPFLAGS += -D_USE_FPC2_ 142 endif 143 144 ifeq "$(fpzip2)" "1" 145 CPPFLAGS += -D_USE_FPZIP2_ 146 endif 147 148 # Extensions to the Wavelet-based Compression (wavz) 149 150 #ifeq "$(fpc3)" "1" 151 # CPPFLAGS += -D_USE_FPC3_ -I../../../tools/fpc 152 # LIB += -L../../../tools/fpc -lfpc 153 #endif 154 #ifeq "$(fpzip3)" "1" 155 # CPPFLAGS += -D_USE_FPZIP3_ -I../../../tools/fpzip/inc 156 # LIB += -L../../../tools/fpzip/lib -lfpzip 157 #endif 158 ifeq "$(shuffle3)" "1" 159 CPPFLAGS += -D_USE_SHUFFLE3_ 160 endif 161 162 # various machines 163 ifneq "$(findstring mira,$(shell hostname))" "" 164 CPPFLAGS += -I${HOME}/usr/zlib/include 165 CFLAGS += -I${HOME}/usr/zlib/include 166 LIB += -L${HOME}/usr/zlib/lib 167 CPPFLAGS += -I/soft/libraries/hdf5/1.8.14/cnk-gcc/current/include 168 LIB += -L/soft/libraries/hdf5/1.8.14/cnk-gcc/current/lib 169 endif 170 171 ifneq "$(findstring cetus,$(shell hostname))" "" 172 CPPFLAGS += -I${HOME}/usr/zlib/include 173 CFLAGS += -I${HOME}/usr/zlib/include 174 LIB += -L${HOME}/usr/zlib/lib 175 CPPFLAGS += -I/soft/libraries/hdf5/1.8.14/cnk-gcc/current/include 176 LIB += -L/soft/libraries/hdf5/1.8.14/cnk-gcc/current/lib 177 endif 178 179 # CPPFLAGS += -Wall -Wextra -Wno-deprecated -D_ALIGNBYTES_=$(align) -D_BLOCKSIZE_=$(bs) 180 CPPFLAGS += -D_ALIGNBYTES_=$(align) -D_BLOCKSIZE_=$(bs)