Skip to content

Commit

Permalink
Added +repro variant
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanheerdegen committed Feb 22, 2024
1 parent b72ae78 commit 41ca1b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/mom5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Mom5(MakefilePackage):
version("master", branch="master")

variant("deterministic", default=False, description="Deterministic build.")
variant("repro", default=False, description="Reproducible build.")
variant("optimisation_report", default=False, description="Generate optimisation reports.")

Check failure on line 23 in packages/mom5/package.py

View workflow job for this annotation

GitHub Actions / Check syntax

Ruff (E501)

packages/mom5/package.py:23:89: E501 Line too long (95 > 88 characters)

# Depend on virtual package "mpi".
Expand Down Expand Up @@ -60,6 +61,9 @@ def edit(self, spec, prefix):
if "+deterministic" in self.spec:
FFLAGS_OPT = "-g0 -O0 -xCORE-AVX2 -debug none -check none"
CFLAGS_OPT = "-O0 -debug none -xCORE-AVX2"
if "+repro" in self.spec:
FFLAGS_OPT += "-fp-model precise -fp-model source -align all"
CFLAGS_OPT += "-fp-model precise -fp-model source"

# Copied from bin/mkmf.template.ubuntu
config["gcc"] = f"""
Expand All @@ -84,7 +88,7 @@ def edit(self, spec, prefix):
#
FFLAGS_OPT = -O2
FFLAGS_REPRO =
FFLAGS_REPRO =
FFLAGS_DEBUG = -O0 -g -W -fbounds-check
FFLAGS_OPENMP = -fopenmp
FFLAGS_VERBOSE =
Expand All @@ -94,6 +98,7 @@ def edit(self, spec, prefix):
CFLAGS_OPT = -O2
CFLAGS_OPENMP = -fopenmp
CFLAGS_DEBUG = -O0 -g
CFLAGS_REPRO =
# Optional Testing compile flags. Mutually exclusive from DEBUG, REPRO, and OPT
# *_TEST will match the production if no new option(s) is(are) to be tested.
Expand Down

0 comments on commit 41ca1b9

Please sign in to comment.