Skip to content

Commit

Permalink
Release candidate for HTR-1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mariodirenzo committed Jun 23, 2021
1 parent 062c66a commit 8794571
Show file tree
Hide file tree
Showing 246 changed files with 57,151 additions and 8,748 deletions.
43 changes: 27 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# Global variables (will be set in every job):
variables:
MAX_DIM: "3"
LEGION_BRANCH: "control_replication"
# LEGION_BRANCH: "master"
LEGION_COMMIT: "e1ce6c67f58a0e6b70023c31d202eebc88efa265"
HTR_DIR: "$CI_PROJECT_DIR"
REALM_BACKTRACE: "1"
# TIMELIMIT: "600" # each test should take less than 10 minutes
Expand Down Expand Up @@ -63,6 +62,16 @@ variables:
.prof: &prof
USE_PROF: "1"

###
### Optional modules
###

.noelectricSolver: &noelectricSolver
ELECTRIC_FIELD: "0"

.electricSolver: &electricSolver
ELECTRIC_FIELD: "1"

###
### Setup
###
Expand All @@ -85,18 +94,10 @@ before_script:
- |
cd $LEGION_DIR/language
git fetch
git checkout $LEGION_BRANCH
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
if [ $LOCAL != $REMOTE ]; then
echo "Updating Legion"
git reset --hard $REMOTE
fi
scripts/setup_env.py --llvm-version 38
git checkout $LEGION_COMMIT
scripts/setup_env.py --llvm-version 90
cd $HTR_DIR
###
### Tags
###
Expand Down Expand Up @@ -146,20 +147,30 @@ before_script:
ctr-205-1_release_unitTests:
<<: [*ctr-205-1, *unitTests]
variables:
<<: [*release, *openmp, *hdf5]
<<: [*release, *openmp, *hdf5, *noelectricSolver]

ctr-205-1_release_solverTests:
<<: [*ctr-205-1, *solverTests]
variables:
<<: [*release, *openmp, *hdf5]
<<: [*release, *openmp, *hdf5, *noelectricSolver]

ctr-205-1_debug_unitTests:
<<: [*ctr-205-1, *unitTests]
variables:
<<: [*debug, *openmp, *hdf5]
<<: [*debug, *openmp, *hdf5, *noelectricSolver]

ctr-205-1_debug_quickSolverTests:
<<: [*ctr-205-1, *quickSolverTests]
variables:
<<: [*debug, *openmp, *hdf5]
<<: [*debug, *openmp, *hdf5, *noelectricSolver]

ctr-205-1_release_electricSolver_unitTests:
<<: [*ctr-205-1, *unitTests]
variables:
<<: [*release, *openmp, *hdf5, *electricSolver]

ctr-205-1_release_electricSolver_solverTests:
<<: [*ctr-205-1, *solverTests]
variables:
<<: [*release, *openmp, *hdf5, *electricSolver]

16 changes: 14 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
This file lists the major changes as they appear in the master branch.

Version 1.3.0 (February 28, 2021)
- normalization of the multicomponent mixture
- NSCBCInflow is now available for yLeft BC
- new switch to select numerical scheme in the input file (choices are SkewSymmetric, TENOA, and Hybrid for now)
- Lu and Law 30 species chemical scheme added to the solver with the name CH4_30SpMix
- Speelman et al. (2015) added to the testcases folder
- TENO-LAD (Peng et al. JCP 425 (2021)) implemented in the solver
- new FFT-based Poisson solver for bi-periodic problems
- new optional module for ion-wind effects
- (n,6,4) interaction theory implemented for charge-neutral species interactions
- FFCM-1 added as a mixture model for the solver
- Boivin added as a H2 mixture model for the solver

Version 1.2.0 (September 30, 2020)
- probe tools for the solver
- initial support for legion tracing
- new 1D average tools added as an option
- optimization of the 2D average tools
- unit test for the average tools
- new IncomingShock BC
- new RecycleRescaling BC
- new IncomingShock BC
- BC routines are now launched on relevant ispaces
- new RecycleRescaling boundary conditions
- new volume probes tools
Expand Down
196 changes: 196 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
# Required paths
ifndef LEGION_DIR
$(error LEGION_DIR is not set)
endif
ifndef HTR_DIR
$(error HTR_DIR is not set)
endif

# OS-specific options
ifeq ($(shell uname),Darwin)
DYNLINK_PATH := DYLD_LIBRARY_PATH
else
DYNLINK_PATH := LD_LIBRARY_PATH
endif

# CUDA options
USE_CUDA ?= 1

# OpenMP options
USE_OPENMP ?= 1

# HDF options
export USE_HDF ?= 1
export HDF_HEADER ?= hdf5.h
HDF_LIBNAME ?= hdf5

# FFT options
export USE_FFTW ?= $(ELECTRIC_FIELD)
export FFTW_HEADER ?= fftw3.h
FFTW_LIBNAME ?= fftw3 -lfftw3_threads
CUFFT_LIBNAME ?= cufft

######################################################
# Baseline setup
######################################################
# C and CUDA compilers options:
# - Warnings
C_FLAGS += -Wall -Werror -fno-strict-aliasing
CXX_FLAGS += -Wall -Werror
# - define standard
CXX_FLAGS += -std=c++11
NVCC_FLAGS += -std=c++11
# - Include paths
C_FLAGS += -I$(LEGION_DIR)/runtime -I$(LEGION_DIR)/bindings/regent -I$(HTR_DIR)/src -I$(HTR_DIR)/src/Mixtures -I$(HTR_DIR)/src/Utils -I. -I$(HTR_DIR)/src/Poisson -I.
CXX_FLAGS += -I$(LEGION_DIR)/runtime -I$(LEGION_DIR)/bindings/regent -I$(HTR_DIR)/src -I$(HTR_DIR)/src/Mixtures -I$(HTR_DIR)/src/Utils -I. -I$(HTR_DIR)/src/Poisson -I.
NVCC_FLAGS += -I$(LEGION_DIR)/runtime -I$(LEGION_DIR)/bindings/regent -I$(HTR_DIR)/src -I$(HTR_DIR)/src/Mixtures -I$(HTR_DIR)/src/Utils -I. -I$(HTR_DIR)/src/Poisson -I.

# Regent options
export TERRA_PATH := ?.rg;$(HTR_DIR)/src/?.rg;$(HTR_DIR)/src/Mixtures/?.rg;$(HTR_DIR)/src/Utils/?.rg;$(HTR_DIR)/src/Poisson/?.rg
export INCLUDE_PATH := .;$(HTR_DIR)/src;$(HTR_DIR)/src/Mixtures;$(HTR_DIR)/src/Utils;$(HTR_DIR)/src/Poisson
REGENT := $(LEGION_DIR)/language/regent.py
REGENT_FLAGS := -fflow 0 -finner 1 -foffline 1

# Link flags
LINK_FLAGS += -L$(LEGION_DIR)/bindings/regent -lregent
LINK_FLAGS += -lm
ifdef CRAYPE_VERSION
LINK_FLAGS += -Bdynamic
LINK_FLAGS += $(CRAY_UGNI_POST_LINK_OPTS) -lugni
LINK_FLAGS += $(CRAY_UDREG_POST_LINK_OPTS) -ludreg
endif

######################################################
# If HDF5 is active
######################################################
ifeq ($(USE_HDF), 1)
ifdef HDF_ROOT
export INCLUDE_PATH := $(INCLUDE_PATH);$(HDF_ROOT)/include
export $(DYNLINK_PATH) := $($(DYNLINK_PATH)):$(HDF_ROOT)/lib
LINK_FLAGS += -L$(HDF_ROOT)/lib
endif
LINK_FLAGS += -l$(HDF_LIBNAME)
endif

######################################################
# If FFTW is active
######################################################
ifeq ($(USE_FFTW), 1)
ifdef FFTW_ROOT
export INCLUDE_PATH := $(INCLUDE_PATH);$(FFTW_ROOT)/include
export $(DYNLINK_PATH) := $($(DYNLINK_PATH)):$(FFTW_ROOT)/lib
C_FLAGS += -I$(FFTW_ROOT)/include
CXX_FLAGS += -I$(FFTW_ROOT)/include
NVCC_FLAGS += -I$(FFTW_ROOT)/include
LINK_FLAGS += -L$(FFTW_ROOT)/lib
endif
LINK_FLAGS += -l$(FFTW_LIBNAME)
ifeq ($(USE_CUDA), 1)
LINK_FLAGS += -L$(CUDA_HOME)/lib64/stubs -l$(CUFFT_LIBNAME)
endif
endif

######################################################
# If DEBUG mode is active
######################################################
ifeq ($(DEBUG), 1)
REGENT_FLAGS += -g -fbounds-checks 1
C_FLAGS += -g -O0 -DLEGION_BOUNDS_CHECKS -DLEGION_PRIVILEGE_CHECKS
CXX_FLAGS += -g -O0 -DLEGION_BOUNDS_CHECKS -DLEGION_PRIVILEGE_CHECKS
NVCC_FLAGS += -g -O0 -DLEGION_BOUNDS_CHECKS -DLEGION_PRIVILEGE_CHECKS -G
LINK_FLAGS += -g
else
C_FLAGS += -O2
CXX_FLAGS += -O3
NVCC_FLAGS += -O3
endif

######################################################
# If DEBUG_OUTPUT mode is active
######################################################
ifneq ($(DEBUG_OUTPUT), 1)
C_FLAGS += -DCHECK_MIX
CXX_FLAGS += -DCHECK_MIX
NVCC_FLAGS += -DCHECK_MIX
endif

######################################################
# If OpenMP is active
######################################################
ifeq ($(USE_OPENMP), 1)
C_FLAGS += -fopenmp
CXX_FLAGS += -fopenmp
REGENT_FLAGS += -fopenmp 1
else
REGENT_FLAGS += -fopenmp 0
endif

######################################################
# If CUDA is active
######################################################
ifeq ($(USE_CUDA), 1)
NVCC ?= $(CUDA_HOME)/bin/nvcc
# Activate Regent's Cuda module only if we are not in debug mode
ifneq ($(DEBUG), 1)
REGENT_FLAGS += -fcuda 1
else
REGENT_FLAGS += -fcuda 0
endif
# Include thrust in C++
CXX_FLAGS += -I$(CUDA_HOME)/include
# Link libcudadevrt for separate compilation of CUDA files
LINK_FLAGS += -L$(CUDA_HOME)/lib64 -lcudadevrt
# CUDA arch variables
GPU_ARCH ?= auto
# translate legacy arch names into numbers
ifeq ($(strip $(GPU_ARCH)),fermi)
GPU_ARCH_N = 20
endif
ifeq ($(strip $(GPU_ARCH)),kepler)
GPU_ARCH_N = 30
endif
ifeq ($(strip $(GPU_ARCH)),k20)
GPU_ARCH_N = 35
endif
ifeq ($(strip $(GPU_ARCH)),k80)
GPU_ARCH_N = 37
endif
ifeq ($(strip $(GPU_ARCH)),maxwell)
GPU_ARCH_N = 52
endif
ifeq ($(strip $(GPU_ARCH)),pascal)
GPU_ARCH_N = 60
endif
ifeq ($(strip $(GPU_ARCH)),volta)
GPU_ARCH_N = 70
endif
ifeq ($(strip $(GPU_ARCH)),turing)
GPU_ARCH_N = 75
endif
ifeq ($(strip $(GPU_ARCH)),ampere)
GPU_ARCH_N = 80
endif
ifeq ($(strip $(GPU_ARCH)),auto)
# detect based on what nvcc supports
ALL_ARCHES = 20 30 32 35 37 50 52 53 60 61 62 70 72 75 80
GPU_ARCH_N = $(shell for X in $(ALL_ARCHES) ; do \
$(NVCC) -gencode arch=compute_$$X,code=sm_$$X -cuda -x c++ /dev/null -o /dev/null 2> /dev/null && echo $$X; \
done)
endif
# finally, convert space-or-comma separated list of architectures (e.g. 35,50)
# into nvcc -gencode arguments
COMMA=,
NVCC_FLAGS += $(foreach X,$(subst $(COMMA), ,$(GPU_ARCH_N)),-gencode arch=compute_$(X)$(COMMA)code=sm_$(X))
else
REGENT_FLAGS += -fcuda 0
endif

#######################################################
# Optional modules
#######################################################
ifeq ($(ELECTRIC_FIELD), 1)
C_FLAGS += -DELECTRIC_FIELD
CXX_FLAGS += -DELECTRIC_FIELD
NVCC_FLAGS += -DELECTRIC_FIELD
endif

Loading

0 comments on commit 8794571

Please sign in to comment.