Skip to content

Commit

Permalink
Merge pull request #621 from fmihpc/dev
Browse files Browse the repository at this point in the history
Merge dev into master for Vlasiator 5.2 release.
  • Loading branch information
ursg authored Jun 9, 2022
2 parents 82a5bdf + 32a49cc commit 2e08c74
Show file tree
Hide file tree
Showing 147 changed files with 15,694 additions and 3,777 deletions.
123 changes: 123 additions & 0 deletions MAKE/Makefile.carrington_gcc_openmpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Makefile for the Carrington Cluster at UH.
#
# Recommended setup:
# * Compile on an interactive node with the below modules;
# See the It4Science wiki or the Vorna guide
# https://github.com/fmihpc/analysator/wiki/Vorna-guide
# for the current best practice.
# * Use mpirun to run (no need for the long command below it seems)
# * (this was used previously, kept for documentation purposes) mpirun -mca pml ucx --mca btl ^vader,tcp,openib -x UCX_NET_DEVICES=mlx5_0:1 -x UCX_TLS=rc,sm -x UCX_IB_ADDR_TYPE=ib_global $executable --run_config $configfile
#
# Required modules:
#
# module load gnu9/9.4.0
# module load openmpi4/4.1.1
# module load pmix/3.1.4
# Oneliner for command line:
# module purge ; module load gnu9/9.4.0 ; module load openmpi4/4.1.1 ; module load pmix/3.1.4
#
# NOTE in the job script, you have to load
#
# module purge
# module load GCC/10.2.0
# module load OpenMPI/4.0.5-GCC-10.2.0
#
# otherwise the VLSV output is broken.
#

CMP = mpicxx
LNK = mpicxx

#======== 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
else
#Double-precision
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)
#-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 =

#GNU flags:
CC_BRAND = gcc
CC_BRAND_VERSION = 9.4.0
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -mavx -march=znver2 #-flto
testpackage: CXXFLAGS = -O2 -fopenmp -funroll-loops -std=c++17 -mavx -march=znver2

MATHFLAGS = -ffast-math
LDFLAGS = -lrt -lgfortran -std=c++17 -lgomp
LIB_MPI = -lgomp -lmpi

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


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

MPT_BRAND = OpenMPI
MPT_VERSION = 4.1.1

JEMALLOC_VERSION = 5.2.1
LIBRARY_PREFIX = /proj/group/spacephysics/libraries

#compiled libraries mostly in modules
LIB_PROFILE = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/phiprof/lib -lphiprof -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/phiprof/lib
INC_PROFILE = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/phiprof/include

LIB_VLSV = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/vlsv -lvlsv -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/vlsv
INC_VLSV = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/vlsv

LIB_JEMALLOC = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/jemalloc/lib -ljemalloc -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/jemalloc/lib
INC_JEMALLOC = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/jemalloc/include

LIB_BOOST = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/boost/lib -lboost_program_options -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/boost/lib
INC_BOOST = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/boost/include

LIB_ZOLTAN = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/zoltan/lib -lzoltan -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/zoltan/lib
INC_ZOLTAN = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/zoltan/include

LIB_PAPI = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/papi/lib -lpapi -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/papi/lib
INC_PAPI = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/carrington/papi/include


#header libraries
INC_EIGEN = -I$(LIBRARY_PREFIX)/ -I$(LIBRARY_PREFIX)/Eigen/
INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid/
INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg/
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass/




6 changes: 4 additions & 2 deletions MAKE/Makefile.hawk_gcc_mpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ FLAGS =

#GNU flags:
CC_BRAND = gcc
CC_BRAND_VERSION = 9.2.0
CXXFLAGS += -g -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -Wall -Wpedantic -mfma -march=native -mavx2
CC_BRAND_VERSION = 9.2.0_bis
CXXFLAGS += -g -fopenmp -O3 -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -Wall -Wpedantic -mfma -march=native -mavx2
#CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -fabi-version=0 -mavx
not_parallel_tools: CXXFLAGS += -march=native -mno-avx2 -mavx
testpackage: CXXFLAGS = -g -O2 -fopenmp -funroll-loops -std=c++17 -fabi-version=0
Expand Down Expand Up @@ -88,6 +88,8 @@ LIB_JEMALLOC = -L$(LIBRARY_PREFIX)/$(MPI_BRAND)/$(MPI_VERSION)/$(CC_BRAND)/$(CC_

INC_VLSV = -I$(LIBRARY_PREFIX)/$(MPI_BRAND)/$(MPI_VERSION)/$(CC_BRAND)/$(CC_BRAND_VERSION)/vlsv
LIB_VLSV = -L$(LIBRARY_PREFIX)/$(MPI_BRAND)/$(MPI_VERSION)/$(CC_BRAND)/$(CC_BRAND_VERSION)/vlsv -lvlsv
#INC_VLSV = -I/zhome/academic/HLRS/pri/ipryakem/vlsv
#LIB_VLSV = -L/zhome/academic/HLRS/pri/ipryakem/vlsv -lvlsv

LIB_PROFILE = -L$(LIBRARY_PREFIX)/$(MPI_BRAND)/$(MPI_VERSION)/$(CC_BRAND)/$(CC_BRAND_VERSION)/phiprof/lib -lphiprof
INC_PROFILE = -I$(LIBRARY_PREFIX)/$(MPI_BRAND)/$(MPI_VERSION)/$(CC_BRAND)/$(CC_BRAND_VERSION)/phiprof/include
Expand Down
21 changes: 12 additions & 9 deletions MAKE/Makefile.mahti_gcc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CMP = mpic++
LNK = mpic++

# Modules loaded
# module load gcc boost jemalloc papi openmpi zoltan
# module load gcc boost jemalloc papi openmpi

#======== Vectorization ==========
#Set vector backend type for vlasov solvers, sets precision and length.
Expand Down Expand Up @@ -58,28 +58,31 @@ testpackage: CXXFLAGS += -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE

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


#compiled libraries
LIB_BOOST = -lboost_program_options

LIB_ZOLTAN = -lzoltan
INC_ZOLTAN = -I$(LIBRARY_PREFIX)/zoltan/include
LIB_ZOLTAN = -L$(LIBRARY_PREFIX)/zoltan/lib -lzoltan -Wl,-rpath=$(LIBRARY_PREFIX)/zoltan/lib


LIB_JEMALLOC = -ljemalloc

LIB_PAPI = -lpapi

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


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


#header libraries

INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid/
INC_EIGEN = -I$(LIBRARY_PREFIX)/eigen/
INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg/
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass/
INC_FSGRID = -I$(LIBRARY_PREFIX)../libraries/fsgrid/
INC_EIGEN = -I$(LIBRARY_PREFIX)/../libraries/eigen/
INC_DCCRG = -I$(LIBRARY_PREFIX)/../libraries/dccrg/
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/../libraries/vectorclass/
123 changes: 123 additions & 0 deletions MAKE/Makefile.ukko_gcc_openmpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Makefile for the ukko Cluster at UH.
#
# Recommended setup:
# * Compile on an interactive node with the below modules;
# See the It4Science wiki or the Vorna guide
# https://github.com/fmihpc/analysator/wiki/Vorna-guide
# for the current best practice.
# * Use mpirun to run (no need for the long command below it seems)
# * (this was used previously, kept for documentation purposes) mpirun -mca pml ucx --mca btl ^vader,tcp,openib -x UCX_NET_DEVICES=mlx5_0:1 -x UCX_TLS=rc,sm -x UCX_IB_ADDR_TYPE=ib_global $executable --run_config $configfile
#
# Required modules:
#
# module load gnu9/9.4.0
# module load openmpi4/4.1.1
# module load pmix/3.1.4
# Oneliner for command line:
# module purge ; module load gnu9/9.4.0 ; module load openmpi4/4.1.1 ; module load pmix/3.1.4
#
# NOTE in the job script, you have to load
#
# module purge
# module load GCC/10.2.0
# module load OpenMPI/4.0.5-GCC-10.2.0
#
# otherwise the VLSV output is broken.
#

CMP = mpicxx
LNK = mpicxx

#======== 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
else
#Double-precision
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)
#-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 =

#GNU flags:
CC_BRAND = gcc
CC_BRAND_VERSION = 9.4.0
CXXFLAGS += -O3 -fopenmp -funroll-loops -std=c++17 -W -Wall -Wno-unused -mavx -march=znver2 #-flto
testpackage: CXXFLAGS = -O2 -fopenmp -funroll-loops -std=c++17 -mavx -march=znver2

MATHFLAGS = -ffast-math
LDFLAGS = -lrt -lgfortran -std=c++17 -lgomp
LIB_MPI = -lgomp -lmpi

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


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

MPT_BRAND = OpenMPI
MPT_VERSION = 4.1.1

JEMALLOC_VERSION = 5.2.1
LIBRARY_PREFIX = /proj/group/spacephysics/libraries

#compiled libraries mostly in modules
LIB_PROFILE = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/phiprof/lib -lphiprof -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/phiprof/lib
INC_PROFILE = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/phiprof/include

LIB_VLSV = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/vlsv -lvlsv -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/vlsv
INC_VLSV = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/vlsv

LIB_JEMALLOC = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/jemalloc/lib -ljemalloc -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/jemalloc/lib
INC_JEMALLOC = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/jemalloc/include

LIB_BOOST = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/boost/lib -lboost_program_options -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/boost/lib
INC_BOOST = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/boost/include

LIB_ZOLTAN = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/zoltan/lib -lzoltan -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/zoltan/lib
INC_ZOLTAN = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/zoltan/include

LIB_PAPI = -L$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/papi/lib -lpapi -Wl,-rpath=$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/papi/lib
INC_PAPI = -I$(LIBRARY_PREFIX)/$(CC_BRAND)/$(CC_BRAND_VERSION)/$(MPT_BRAND)/$(MPT_VERSION)/ukko/papi/include


#header libraries
INC_EIGEN = -I$(LIBRARY_PREFIX)/ -I$(LIBRARY_PREFIX)/Eigen/
INC_FSGRID = -I$(LIBRARY_PREFIX)/fsgrid/
INC_DCCRG = -I$(LIBRARY_PREFIX)/dccrg/
INC_VECTORCLASS = -I$(LIBRARY_PREFIX)/vectorclass/




Loading

0 comments on commit 2e08c74

Please sign in to comment.