Skip to content

Commit 82a5bdf

Browse files
authored
Merge pull request #528 from fmihpc/dev
Merge dev into master, for Vlasiator 5.1 release
2 parents 5b9f2a4 + 4661a00 commit 82a5bdf

File tree

157 files changed

+3697
-3206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+3697
-3206
lines changed

.clang-format

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
BasedOnStyle: LLVM
3+
UseTab: Never
4+
IndentWidth: 3
5+
TabWidth: 3
6+
BreakBeforeBraces: Attach
7+
PointerAlignment: Left
8+
AlignAfterOpenBracket: true
9+
AllowShortIfStatementsOnASingleLine: false
10+
IndentCaseLabels: false
11+
ColumnLimit: 120
12+
AccessModifierOffset: -3
13+
...
14+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
*.vlsv
33
*.silo
44
*.o
5+
vscode/
6+
.vscode/
57
version.cpp
68
\#*\#
79
*~

.vimrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set cindent
2+
set shiftwidth=3
3+
set tabstop=3
4+
set expandtab
5+
6+
set equalprg=clang-format\ -style=file

MAKE/Makefile.Freezer

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
CMP = mpic++
2+
LNK = mpic++
3+
4+
# Markus' desktop computer
5+
6+
#======== Vectorization ==========
7+
#Set vector backend type for vlasov solvers, sets precision and length.
8+
#Options:
9+
# AVX: VEC4D_AGNER, VEC4F_AGNER, VEC8F_AGNER
10+
# AVX512: VEC8D_AGNER, VEC16F_AGNER
11+
# Fallback: VEC4D_FALLBACK, VEC4F_FALLBACK, VEC8F_FALLBACK
12+
13+
ifeq ($(DISTRIBUTION_FP_PRECISION),SPF)
14+
#Single-precision
15+
VECTORCLASS = VEC8F_AGNER
16+
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass
17+
# VECTORCLASS = VEC8F_FALLBACK
18+
# INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/../vlasiator/vlasovsolver
19+
else
20+
#Double-precision
21+
# VECTORCLASS = VEC4D_AGNER
22+
# INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass
23+
VECTORCLASS = VEC4D_FALLBACK
24+
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/../vlasiator/vlasovsolver
25+
endif
26+
27+
#FLAGS = -ggdb
28+
29+
#GNU flags:
30+
CC_BRAND = gcc
31+
CC_BRAND_VERSION = 6.2.0
32+
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx2
33+
#CXXFLAGS += -ggdb -O0 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx2
34+
testpackage: CXXFLAGS = -g -ggdb -O2 -fopenmp -funroll-loops -std=c++17 -fabi-version=0 -mno-avx -mno-fma -fno-unsafe-math-optimizations
35+
36+
MATHFLAGS = -ffast-math
37+
testpackage: MATHFLAGS = -fno-unsafe-math-optimizations
38+
39+
LDFLAGS =
40+
#-g -ggdb
41+
LIB_MPI = -lgomp -lgfortran -lpapi
42+
43+
44+
#======== PAPI ==========
45+
#Add PAPI_MEM define to use papi to report memory consumption?
46+
#CXXFLAGS += -DPAPI_MEM
47+
#testpackage: CXXFLAGS += -DPAPI_MEM
48+
49+
#======== Allocator =========
50+
#Use jemalloc instead of system malloc to reduce memory fragmentation? https://github.com/jemalloc/jemalloc
51+
#Configure jemalloc with --with-jemalloc-prefix=je_ when installing it
52+
#CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
53+
#testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
54+
55+
56+
#======= Compiler and compilation flags =========
57+
# NOTES on compiler flags:
58+
# CXXFLAGS is for compiler flags, they are always used
59+
# MATHFLAGS are for special math etc. flags, these are only applied on solver functions
60+
# LDFLAGS flags for linker
61+
62+
# BOOST_VERSION = current trilinos version
63+
# ZOLTAN_VERSION = current trilinos verson
64+
65+
#======== Libraries ===========
66+
67+
MPT_VERSION = 7.5.1
68+
JEMALLOC_VERSION = 4.0.4
69+
LIBRARY_PREFIX = /home/markusb/git/vlasiator-lib
70+
71+
72+
#compiled libraries
73+
# INC_BOOST = -I$(CRAY_TRILINOS_PREFIX_DIR)/include/boost
74+
# LIB_BOOST = -L$(CRAY_TRILINOS_PREFIX_DIR)/lib -lboost_program_options
75+
76+
# INC_ZOLTAN = -I$(CRAY_TRILINOS_PREFIX_DIR)/include
77+
# LIB_ZOLTAN = -I$(CRAY_TRILINOS_PREFIX_DIR)/lib -lzoltan
78+
79+
INC_BOOST = -I/usr/include/trilinos
80+
LIB_BOOST = -L/usr/include/trilinos -lboost_program_options
81+
82+
INC_ZOLTAN = -I/usr/include/trilinos
83+
#LIB_ZOLTAN = -I/usr/lib/x86_64-linux-gnu -ltrilinos_zoltan
84+
LIB_ZOLTAN = -ltrilinos_zoltan
85+
USE_TRILINOS=1
86+
87+
INC_JEMALLOC = -I$(LIBRARY_PREFIX)/jemalloc/include
88+
LIB_JEMALLOC = -L$(LIBRARY_PREFIX)/jemalloc/lib -ljemalloc -Wl,-rpath=$(LIBRARY_PREFIX)/jemalloc/lib
89+
90+
91+
INC_VLSV = -I$(LIBRARY_PREFIX)/vlsv
92+
LIB_VLSV = -L$(LIBRARY_PREFIX)/vlsv -lvlsv -Wl,-rpath=$(LIBRARY_PREFIX)/vlsv/lib
93+
94+
LIB_PROFILE = -L$(LIBRARY_PREFIX)/phiprof/lib -lphiprof -Wl,-rpath=$(LIBRARY_PREFIX)/phiprof/lib
95+
INC_PROFILE = -I$(LIBRARY_PREFIX)/phiprof/include
96+
97+
#header libraries
98+
99+
INC_EIGEN = -I$(LIBRARY_PREFIX)/eigen
100+
#INC_EIGEN = -I$(LIBRARY_PREFIX)/eigen-eigen-07105f7124f9
101+
INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg_new_neighbours
102+
#INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg_master
103+
INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid
104+
105+
106+

MAKE/Makefile.abel_gcc

Lines changed: 0 additions & 62 deletions
This file was deleted.

MAKE/Makefile.arto

Lines changed: 0 additions & 36 deletions
This file was deleted.

MAKE/Makefile.c2a_xlc

Lines changed: 0 additions & 36 deletions
This file was deleted.

MAKE/Makefile.docker

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,27 @@ else
1818
VECTORCLASS = VEC4D_AGNER
1919
endif
2020

21+
FLAGS =
22+
23+
#GNU flags:
24+
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx2
25+
testpackage: CXXFLAGS = -O2 -fopenmp -funroll-loops -std=c++17 -fabi-version=0 -mavx
26+
27+
MATHFLAGS = -ffast-math
28+
LDFLAGS = -g
29+
LIB_MPI = -lgomp
30+
2131
#======== PAPI ==========
2232
#Add PAPI_MEM define to use papi to report memory consumption?
2333
CXXFLAGS += -DPAPI_MEM
34+
testpackage: CXXFLAGS += -DPAPI_MEM
2435

2536

2637
#======== Allocator =========
2738
#Use jemalloc instead of system malloc to reduce memory fragmentation? https://github.com/jemalloc/jemalloc
2839
#Configure jemalloc with --with-jemalloc-prefix=je_ when installing it
2940
CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
41+
testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
3042

3143

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

4456
CXXFLAGS += -DMPICH_IGNORE_CXX_SEEK
45-
46-
FLAGS =
47-
48-
#GNU flags:
49-
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++11 -W -Wall -Wno-unused -fabi-version=0 -mavx2
50-
testpackage: CXXFLAGS = -O2 -fopenmp -funroll-loops -std=c++0x -fabi-version=0 -mavx
51-
52-
MATHFLAGS = -ffast-math
53-
LDFLAGS = -g
54-
LIB_MPI = -lgomp
57+
testpackage: CXXFLAGS += -DMPICH_IGNORE_CXX_SEEK
5558

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

MAKE/Makefile.fermi_gcc

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)