Skip to content

Commit

Permalink
Merge pull request #528 from fmihpc/dev
Browse files Browse the repository at this point in the history
Merge dev into master, for Vlasiator 5.1 release
  • Loading branch information
ursg authored Mar 10, 2021
2 parents 5b9f2a4 + 4661a00 commit 82a5bdf
Show file tree
Hide file tree
Showing 157 changed files with 3,697 additions and 3,206 deletions.
14 changes: 14 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
BasedOnStyle: LLVM
UseTab: Never
IndentWidth: 3
TabWidth: 3
BreakBeforeBraces: Attach
PointerAlignment: Left
AlignAfterOpenBracket: true
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit: 120
AccessModifierOffset: -3
...

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
*.vlsv
*.silo
*.o
vscode/
.vscode/
version.cpp
\#*\#
*~
Expand Down
6 changes: 6 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set cindent
set shiftwidth=3
set tabstop=3
set expandtab

set equalprg=clang-format\ -style=file
106 changes: 106 additions & 0 deletions MAKE/Makefile.Freezer
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
CMP = mpic++
LNK = mpic++

# Markus' desktop computer

#======== Vectorization ==========
#Set vector backend type for vlasov solvers, sets precision and length.
#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 = VEC8F_AGNER
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass
# VECTORCLASS = VEC8F_FALLBACK
# INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/../vlasiator/vlasovsolver
else
#Double-precision
# VECTORCLASS = VEC4D_AGNER
# INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass
VECTORCLASS = VEC4D_FALLBACK
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/../vlasiator/vlasovsolver
endif

#FLAGS = -ggdb

#GNU flags:
CC_BRAND = gcc
CC_BRAND_VERSION = 6.2.0
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx2
#CXXFLAGS += -ggdb -O0 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx2
testpackage: CXXFLAGS = -g -ggdb -O2 -fopenmp -funroll-loops -std=c++17 -fabi-version=0 -mno-avx -mno-fma -fno-unsafe-math-optimizations

MATHFLAGS = -ffast-math
testpackage: MATHFLAGS = -fno-unsafe-math-optimizations

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

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

MPT_VERSION = 7.5.1
JEMALLOC_VERSION = 4.0.4
LIBRARY_PREFIX = /home/markusb/git/vlasiator-lib


#compiled libraries
# INC_BOOST = -I$(CRAY_TRILINOS_PREFIX_DIR)/include/boost
# LIB_BOOST = -L$(CRAY_TRILINOS_PREFIX_DIR)/lib -lboost_program_options

# INC_ZOLTAN = -I$(CRAY_TRILINOS_PREFIX_DIR)/include
# LIB_ZOLTAN = -I$(CRAY_TRILINOS_PREFIX_DIR)/lib -lzoltan

INC_BOOST = -I/usr/include/trilinos
LIB_BOOST = -L/usr/include/trilinos -lboost_program_options

INC_ZOLTAN = -I/usr/include/trilinos
#LIB_ZOLTAN = -I/usr/lib/x86_64-linux-gnu -ltrilinos_zoltan
LIB_ZOLTAN = -ltrilinos_zoltan
USE_TRILINOS=1

INC_JEMALLOC = -I$(LIBRARY_PREFIX)/jemalloc/include
LIB_JEMALLOC = -L$(LIBRARY_PREFIX)/jemalloc/lib -ljemalloc -Wl,-rpath=$(LIBRARY_PREFIX)/jemalloc/lib


INC_VLSV = -I$(LIBRARY_PREFIX)/vlsv
LIB_VLSV = -L$(LIBRARY_PREFIX)/vlsv -lvlsv -Wl,-rpath=$(LIBRARY_PREFIX)/vlsv/lib

LIB_PROFILE = -L$(LIBRARY_PREFIX)/phiprof/lib -lphiprof -Wl,-rpath=$(LIBRARY_PREFIX)/phiprof/lib
INC_PROFILE = -I$(LIBRARY_PREFIX)/phiprof/include

#header libraries

INC_EIGEN = -I$(LIBRARY_PREFIX)/eigen
#INC_EIGEN = -I$(LIBRARY_PREFIX)/eigen-eigen-07105f7124f9
INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg_new_neighbours
#INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg_master
INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid



62 changes: 0 additions & 62 deletions MAKE/Makefile.abel_gcc

This file was deleted.

36 changes: 0 additions & 36 deletions MAKE/Makefile.arto

This file was deleted.

36 changes: 0 additions & 36 deletions MAKE/Makefile.c2a_xlc

This file was deleted.

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
62 changes: 0 additions & 62 deletions MAKE/Makefile.fermi_gcc

This file was deleted.

Loading

0 comments on commit 82a5bdf

Please sign in to comment.