Skip to content

Commit

Permalink
CI: Disable unsafe math optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Jun 8, 2024
1 parent a3aee54 commit 95263da
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 39 deletions.
6 changes: 3 additions & 3 deletions scripts/actions-cpu-real32.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ FPP_DEBUG_FLAGS = -DCARPET_DEBUG
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
14 changes: 8 additions & 6 deletions scripts/actions-cpu-real32.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
6 changes: 3 additions & 3 deletions scripts/actions-cpu-real64.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ FPP_DEBUG_FLAGS = -DCARPET_DEBUG
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
6 changes: 3 additions & 3 deletions scripts/actions-cuda-real32.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
14 changes: 8 additions & 6 deletions scripts/actions-cuda-real32.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
6 changes: 3 additions & 3 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
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
6 changes: 3 additions & 3 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
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

0 comments on commit 95263da

Please sign in to comment.