Skip to content
Snippets Groups Projects
Commit 97d7c16b authored by Takumi.Matsunobu's avatar Takumi.Matsunobu
Browse files

added version dependency of eccodes

parent 9b0f2171
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
from spack.package import *
import os
from urllib.parse import urlparse
from packaging import version
class DwdIconTools(Package):
"""DWD Icon Tools"""
......@@ -45,7 +45,10 @@ class DwdIconTools(Package):
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("eccodes+tools")
if version.parse(spack.spack_version) < version.parse("23.0.1"):
depends_on("eccodes+fortran")
else:
depends_on("eccodes+fortran+tools")
depends_on("libxml2")
#
......
......@@ -8,7 +8,7 @@ import os
from urllib.parse import urlparse
from spack.package import *
from packaging import version
class IconNwp(Package):
"""
......@@ -57,7 +57,10 @@ class IconNwp(Package):
depends_on("mpi")
depends_on("netcdf-c")
depends_on("netcdf-fortran")
depends_on("eccodes+fortran+tools")
if version.parse(spack.spack_version) < version.parse("23.0.1"):
depends_on("eccodes+fortran")
else:
depends_on("eccodes+fortran+tools")
depends_on("libxml2")
# If you using inwp_psp=2 (with non-divergent 3D flow), petsc is necessary
......@@ -137,11 +140,11 @@ class IconNwp(Package):
libs.append(f"-L{spec['petsc'].prefix.lib} -lpetsc")
if self.spec.satisfies("%gcc"):
FCFLAGS = "-std=legacy -fmodule-private -fimplicit-none -fmax-identifier-length=63 -Wall " \
FCFLAGS = "-std=gnu -fmodule-private -fimplicit-none -fmax-identifier-length=63 -Wall " \
"-Wcharacter-truncation -Wconversion -Wunderflow -Wunused-parameter " \
"-Wno-surprising -fall-intrinsics -g -mpc64 -w"
ARCH_FLAG = f"-mtune={mtune}"
ICON_FCFLAGS = "-std=f2008 -fallow-argument-mismatch -fmodule-private -fimplicit-none -Wall"
ICON_FCFLAGS = "-fallow-argument-mismatch -fmodule-private -fimplicit-none -Wall"
elif self.spec.satisfies("%intel"):
FCFLAGS = "-stand none -implicitnone -warn all -warn unused -fall-intrinsics -g -w"
ARCH_FLAG = f"-xHost"
......
......@@ -18,6 +18,8 @@ cd ${WORKDIR} || exit
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.externals%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%" "%spack.upstreams%"
SPACK_BUILD_ICON="%ICON.BUILD_CMD%"
SPACK_LOAD_ICON="%ICON.LOAD_CMD%"
if [ ! -z "$SPACK_BUILD_ICON" ]; then
echo "cmd=$SPACK_BUILD_ICON"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment