Skip to content

Commit 2f51b24

Browse files
build: disable FPE by default
1 parent 971fa3c commit 2f51b24

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

docs/source/developing/build-system.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The build system exposes several options to control the build process. If you wa
2121
* **WITH_GYRE**: Whether to build GYRE and include support for GYRE in MESA. Defaults to ``yes`` (any other value will disable GYRE).
2222
* **WITH_ADIPLS**: Whether to build ADIPLS and include support for ADIPLS in MESA. Defaults to ``yes`` (any other value will disable ADIPLS).
2323
* **WITH_PGSTAR**: Whether to include support for showing and saving plots with pgplot. Defaults to ``yes`` (any other value will disable pgstar/pgplot).
24-
* **WITH_FPE_CHECKS**: Whether to enable FPE checks for NaNs, overflows, and division by zero. Defaults to ``yes`` (any other value will disable the checks). Is it recommended to keep this set to ``yes`` at all times, as crashes would indicate bugs in either MESA or user provided code through ``run_star_extras.f90``. This option is available for compatibility with older versions of MESA.
24+
* **WITH_FPE_CHECKS**: Whether to enable FPE checks for NaNs, overflows, and division by zero. Defaults to ``no`` (set to ``yes`` to enable).
2525

2626
Module build configuration
2727
==========================

kap/preprocessor/spline_OPLIB_tables.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def smooth_opac(table_path: Path):
7171
output.write(row)
7272
output.write("\n")
7373

74+
7475
opacity_file_dir = Path(sys.argv[1])
7576
output_file_dir = Path(sys.argv[2])
7677

make/compile-settings-gnu.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ FLAGS_CODE_SANITY := \
77
-fstack-clash-protection \
88
-fcheck=bounds \
99
-D_FORTIFY_SOURCE=2
10-
FFLAGS_FP_SANITY := -finit-real=snan -finit-derived
10+
FFLAGS_FP_SANITY := -finit-derived
1111
ifeq ($(WITH_FPE_CHECKS),yes)
12-
FFLAGS_FP_SANITY += -ffpe-trap=invalid,overflow,zero
12+
FFLAGS_FP_SANITY += -ffpe-trap=invalid,overflow,zero -finit-real=snan
13+
else
14+
FFLAGS_FP_SANITY += -finit-real=zero
1315
endif
1416
FFLAGS_FORTRAN_SANITY := -std=f2008 -ffree-line-length-none -ffixed-line-length-none -Wno-unused-dummy-argument -Wno-compare-reals -Wno-do-subscript
1517
FLAGS_REPRO := -ffp-contract=off

make/defaults-module.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ WITH_CRLIBM ?= yes
1515
WITH_GYRE ?= yes
1616
WITH_ADIPLS ?= yes
1717
WITH_PGSTAR ?= yes
18-
WITH_FPE_CHECKS ?= yes
18+
WITH_FPE_CHECKS ?= no
1919
PREFIX ?= $(MAKE_DIR)/..

0 commit comments

Comments
 (0)