Skip to content

Commit

Permalink
oasis3-mct: add a nodebuginfo variant
Browse files Browse the repository at this point in the history
  • Loading branch information
harshula committed Mar 14, 2023
1 parent 76bec91 commit aa3a089
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/oasis3-mct/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class Oasis3Mct(MakefilePackage):

version("spack-build", branch="spack-build")

variant("nodebuginfo", default=False, description="Remove all debuginfo.")

depends_on("[email protected]:")
# Depend on virtual package "mpi".
depends_on("mpi")
Expand Down Expand Up @@ -212,6 +214,17 @@ def edit(self, spec, prefix):
makeinc_path = join_path(SRCDIR, self.__makeinc)
config = {}

# TODO: Clean up the debug / non-debug mechanism once the compiler
# flag audit is finished.
# https://github.com/ACCESS-NRI/ACCESS-OM/issues/12
NCI_INTEL_FLAGS = "-r8 -i4 -traceback -fpe0 -convert big_endian -fno-alias -ip -check noarg_temp_created"
NCI_OPTIM_FLAGS = "-g3 -O2 -axCORE-AVX2 -debug all -check none -qopt-report=5 -qopt-report-annotate"
CFLAGS = ""
if "+nodebuginfo" in self.spec:
NCI_INTEL_FLAGS = "-r8 -i4 -fpe0 -convert big_endian -fno-alias -ip -check noarg_temp_created"
NCI_OPTIM_FLAGS = "-g0 -O0 -axCORE-AVX2 -debug none -check none -qopt-report=5 -qopt-report-annotate"
CFLAGS = "-g0"

config["pre"] = f"""
# CHAN : communication technique used in OASIS3 (MPI1/MPI2/NONE)
CHAN = MPI1
Expand Down

0 comments on commit aa3a089

Please sign in to comment.