Skip to content

Commit

Permalink
scripts: update files
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Aug 27, 2024
1 parent 36df398 commit 624eff2
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 37 deletions.
20 changes: 12 additions & 8 deletions scripts/actions-cpu-real64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ FPP = cpp
FC = gfortran
F90 = gfortran

CFLAGS = -pipe -g -std=gnu11
CXXFLAGS = -pipe -g -std=gnu++17
# Note: Use -fhardened for GCC14
# Note: GCC 13.2 with -ftrivial-auto-var-init=pattern mis-compiles (?) C++ lambdas

CFLAGS = -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -fPIE -fcf-protection=full -fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=pattern -g -march=x86-64-v3 -pie -pipe -std=gnu11
CXXFLAGS = -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -fPIE -fcf-protection=full -fstack-clash-protection -fstack-protector-strong -g -march=x86-64-v3 -pie -pipe -std=gnu++17
FPPFLAGS = -traditional
F90FLAGS = -pipe -g -fcray-pointer -ffixed-line-length-none
F90FLAGS = -fPIE -fcf-protection=full -fcray-pointer -ffixed-line-length-none -finit-character=65 -finit-integer=42424242 -finit-real=nan -fstack-clash-protection -fstack-protector-strong -g -march=x86-64-v3 -pie -pipe
LDFLAGS = -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/local/lib -Wl,-z,relro,-z,now

C_LINE_DIRECTIVES = yes
F_LINE_DIRECTIVES = yes
Expand All @@ -31,12 +35,12 @@ CPP_DEBUG_FLAGS = -DCARPET_DEBUG
C_DEBUG_FLAGS = -fbounds-check -fsanitize=undefined -fstack-protector-all -ftrapv
CXX_DEBUG_FLAGS = -fbounds-check -fsanitize=undefined -fstack-protector-all -ftrapv
FPP_DEBUG_FLAGS = -DCARPET_DEBUG
F90_DEBUG_FLAGS = -fcheck=bounds,do,mem,pointer,recursion -finit-character=65 -finit-integer=42424242 -finit-real=nan -fsanitize=undefined -fstack-protector-all -ftrapv
F90_DEBUG_FLAGS = -fcheck=bounds,do,mem,pointer,recursion -fsanitize=undefined -fstack-protector-all -ftrapv

OPTIMISE = yes
C_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
CXX_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
F90_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
C_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans
CXX_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans
F90_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans

OPENMP = yes
CPP_OPENMP_FLAGS = -fopenmp
Expand Down Expand Up @@ -85,7 +89,7 @@ PTHREADS_DIR = NO_BUILD
# REPRIMAND_LIBS = RePrimAnd
# RNPLETAL_DIR = /usr/local
SILO_DIR = /usr/local
# SIMULATIONIO_DIR = /usr/local
SIMULATIONIO_DIR = /usr/local
SSHT_DIR = /usr/local
YAML_CPP_DIR = /usr/local
ZLIB_DIR = /usr
3 changes: 3 additions & 0 deletions scripts/actions-cpu-real64.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ disabled-thorns = <<EOT
ExternalLibraries/LAPACK
ExternalLibraries/LORENE
ExternalLibraries/PAPI
# Builds too slowly
SpacetimeX/Weyl
SpacetimeX/SphericalHarmonics
EOT
enabled-thorns = <<EOT
CactusTest/TestAllTypes
Expand Down
14 changes: 8 additions & 6 deletions scripts/actions-cpu-real64.run
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ env | sort >SIMFACTORY/ENVIRONMENT
echo "Starting:"
export CACTUS_STARTTIME=$(date +%s)

time \
mpiexec \
-n @NUM_PROCS@ \
@EXECUTABLE@ -L 3 @PARFILE@ \
>stdout.txt \
2>stderr.txt
# time \
# mpiexec \
# -n @NUM_PROCS@ \
# @EXECUTABLE@ -L 3 @PARFILE@ \
# >stdout.txt \
# 2>stderr.txt

time mpiexec -n @NUM_PROCS@ @EXECUTABLE@ -L 3 @PARFILE@

echo "Stopping:"
date
Expand Down
8 changes: 4 additions & 4 deletions scripts/actions-cuda-real64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ FPP_DEBUG_FLAGS = -DCARPET_DEBUG
F90_DEBUG_FLAGS = -fcheck=bounds,do,mem,pointer,recursion -finit-character=65 -finit-integer=42424242 -finit-real=nan -fsanitize=undefined -fstack-protector-all -ftrapv

OPTIMISE = yes
C_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
CXX_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
F90_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
C_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans
CXX_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans
F90_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans

OPENMP = yes
CPP_OPENMP_FLAGS = -fopenmp
Expand Down Expand Up @@ -101,7 +101,7 @@ PTHREADS_DIR = NO_BUILD
# REPRIMAND_LIBS = RePrimAnd
# RNPLETAL_DIR = /usr/local
SILO_DIR = /usr/local
# SIMULATIONIO_DIR = /usr/local
SIMULATIONIO_DIR = /usr/local
SSHT_DIR = /usr/local
YAML_CPP_DIR = /usr/local
ZLIB_DIR = /usr
14 changes: 8 additions & 6 deletions scripts/actions-cuda-real64.run
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ env | sort >SIMFACTORY/ENVIRONMENT
echo "Starting:"
export CACTUS_STARTTIME=$(date +%s)

time \
mpiexec \
-n @NUM_PROCS@ \
@EXECUTABLE@ -L 3 @PARFILE@ \
>stdout.txt \
2>stderr.txt
# time \
# mpiexec \
# -n @NUM_PROCS@ \
# @EXECUTABLE@ -L 3 @PARFILE@ \
# >stdout.txt \
# 2>stderr.txt

time mpiexec -n @NUM_PROCS@ @EXECUTABLE@ -L 3 @PARFILE@

echo "Stopping:"
date
Expand Down
8 changes: 4 additions & 4 deletions scripts/actions-rocm-real64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ FPP_DEBUG_FLAGS = -DCARPET_DEBUG
F90_DEBUG_FLAGS = -fcheck=bounds,do,mem,pointer,recursion -finit-character=65 -finit-integer=42424242 -finit-real=nan -ftrapv

OPTIMISE = yes
C_OPTIMISE_FLAGS = -O3 -ffp-contract=fast -fno-math-errno -fno-rounding-math -funsafe-math-optimizations
CXX_OPTIMISE_FLAGS = -O3 -ffp-contract=fast -fno-math-errno -fno-rounding-math -funsafe-math-optimizations
F90_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans -funsafe-math-optimizations
C_OPTIMISE_FLAGS = -O3 -ffp-contract=fast -fno-math-errno -fno-rounding-math
CXX_OPTIMISE_FLAGS = -O3 -ffp-contract=fast -fno-math-errno -fno-rounding-math
F90_OPTIMISE_FLAGS = -O3 -fcx-limited-range -fexcess-precision=fast -ffp-contract=fast -fno-math-errno -fno-rounding-math -fno-signaling-nans

# Clang segfaults with OpenMP enabled
OPENMP = no
Expand Down Expand Up @@ -97,7 +97,7 @@ PTHREADS_DIR = NO_BUILD
# REPRIMAND_LIBS = RePrimAnd
# RNPLETAL_DIR = /usr/local
SILO_DIR = /usr/local
# SIMULATIONIO_DIR = /usr/local
SIMULATIONIO_DIR = /usr/local
SSHT_DIR = /usr/local
YAML_CPP_DIR = /usr/local
ZLIB_DIR = /usr
14 changes: 8 additions & 6 deletions scripts/actions-rocm-real64.run
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ env | sort >SIMFACTORY/ENVIRONMENT
echo "Starting:"
export CACTUS_STARTTIME=$(date +%s)

time \
mpiexec \
-n @NUM_PROCS@ \
@EXECUTABLE@ -L 3 @PARFILE@ \
>stdout.txt \
2>stderr.txt
# time \
# mpiexec \
# -n @NUM_PROCS@ \
# @EXECUTABLE@ -L 3 @PARFILE@ \
# >stdout.txt \
# 2>stderr.txt

time mpiexec -n @NUM_PROCS@ @EXECUTABLE@ -L 3 @PARFILE@

echo "Stopping:"
date
Expand Down
33 changes: 30 additions & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,38 @@ TWOPROC_DIR="$(./simfactory/bin/sim --machine="actions-$ACCELERATOR-$REAL_PRECIS
# git add test_nums.csv
# git commit -m "Add new test result" && git push

TESTS_FAILED=False
# Show all log, output, and error files
echo 'All log files:'
echo '================================================================================'
for logfile in $(find "${ONEPROC_DIR}" "${TWOPROC_DIR}" -name '*.log' -print); do
echo "Log file $logfile:"
ls -l "$logfile"
cat "$logfile"
echo '================================================================================'
done
echo 'All output files:'
echo '================================================================================'
for outfile in $(find "${ONEPROC_DIR}/../.." "${TWOPROC_DIR}/../.." -name '*.out' -print); do
echo "Output file $outfile:"
ls -l "$outfile"
cat "$outfile"
echo '================================================================================'
done
echo 'All error files:'
echo '================================================================================'
for errfile in $(find "${ONEPROC_DIR}/../.." "${TWOPROC_DIR}/../.." -name '*.err' -print); do
echo "Error file $errfile:"
ls -l "$errfile"
cat "$errfile"
echo '================================================================================'
done

for test_dir in "${ONEPROC_DIR}" "${TWOPROC_DIR}"; do
log="${test_dir}/summary.log"
if ! grep -q '^ Number failed -> 0$' ${log}; then
TESTS_FAILED=True
echo 'FAILURE'
exit 1
fi
done
echo "TESTS_FAILED=${TESTS_FAILED}" >>"${GITHUB_ENV}"
echo 'SUCCESS'
exit 0

0 comments on commit 624eff2

Please sign in to comment.