Skip to content

Commit

Permalink
issm: Add the ISSM ice sheet model
Browse files Browse the repository at this point in the history
This is a fairly simple configuration of ISSM, but it demonstrates
building with Intel compilers and MKL to bring in the PETSc
dependency.
  • Loading branch information
angus-g committed Sep 29, 2023
1 parent 551256f commit d618d7b
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
53 changes: 53 additions & 0 deletions packages/issm/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2023 Angus Gibson
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class Issm(AutotoolsPackage):
"""Ice-sheet and Sea-Level System Model"""

homepage = "https://issm.jpl.nasa.gov/"
svn = "https://issm.ess.uci.edu/svn/issm/issm/trunk"

version("develop")

depends_on("autoconf", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")

depends_on("mpi")
depends_on("petsc+metis+mumps+scalapack")
depends_on("m1qn3")

def autoreconf(self, spec, prefix):
autoreconf("--install", "--verbose", "--force")

def configure_args(self):
args = [
"--with-wrappers=no",
"--enable-debugging",
"--enable-development",
"--enable-shared",
"--without-kriging",
]
args.append("--with-petsc-dir={0}".format(self.spec["petsc"].prefix))
args.append("--with-metis-dir={0}".format(self.spec["metis"].prefix))
args.append("--with-mumps-dir={0}".format(self.spec["mumps"].prefix))
args.append("--with-m1qn3-dir={0}".format(self.spec["m1qn3"].prefix.lib))

# Even though we set the MPI compilers manually, the build system
# wants us to explicitly request an MPI-enabled build by telling
# it the MPI include directory.
args.append("--with-mpi-include={0}".format(self.spec["mpi"].prefix.include))
args.append("CC=" + self.spec["mpi"].mpicc)
args.append("CXX=" + self.spec["mpi"].mpicxx)
args.append("FC=" + self.spec["mpi"].mpifc)
args.append("F77=" + self.spec["mpi"].mpif77)

return args
2 changes: 2 additions & 0 deletions packages/m1qn3/m1qn3.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Reproduced from externalpackages/m1qn3/patch/m1qn3.f.patch
# in ISSM Subversion trunk.
--- src/src/m1qn3.f 2009-10-20 06:39:35.000000000 -0400
+++ m1qn3.f 2021-08-13 14:44:30.276019165 -0400
@@ -802,7 +802,7 @@
Expand Down
2 changes: 2 additions & 0 deletions packages/m1qn3/package.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2023 Angus Gibson
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


Expand Down

0 comments on commit d618d7b

Please sign in to comment.