Update pFunit, add gFTL, gFTL-Shared, fArgParse, pFlogger, yaFyaml (#34476)
* Add GFE packages, Update pFUnit * Remove citibeth as maintainer per her request * Version 3.3.0 is an odd duck. Needs a v Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
This commit is contained in:
parent
217b34825a
commit
ea2c61c683
36
var/spack/repos/builtin/packages/fargparse/package.py
Normal file
36
var/spack/repos/builtin/packages/fargparse/package.py
Normal file
@ -0,0 +1,36 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Fargparse(CMakePackage):
|
||||
"""Command line argument parsing for Fortran"""
|
||||
|
||||
homepage = "https://github.com/Goddard-Fortran-Ecosystem/fArgParse"
|
||||
url = "https://github.com/Goddard-Fortran-Ecosystem/fArgParse/archive/refs/tags/v1.4.1.tar.gz"
|
||||
git = "https://github.com/Goddard-Fortran-Ecosystem/fArgParse.git"
|
||||
|
||||
maintainers = ["mathomp4", "tclune"]
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("main", branch="main")
|
||||
|
||||
version("1.4.1", sha256="8f9b92a80f05b0a8ab2dd5cd309ad165041c7fcdd589b96bf75c7dd889b9b584")
|
||||
version("1.3.1", sha256="65d168696762b53f9a34fac8a82527fb602372f47be05018ebb382ec27b52c6c")
|
||||
version("1.3.0", sha256="08fde5fb1b739b69203ac336fe7b39915cfc7f52e068e564b9b6d905d79fc93d")
|
||||
version("1.2.0", sha256="4d14584d2bd5406267e3eacd35b50548dd9e408526465e89514690774217da70")
|
||||
version("1.1.2", sha256="89f63f181ccf183ca6212aee7ed7e39d510e3df938b0b16d487897ac9a61647f")
|
||||
|
||||
depends_on("gftl-shared")
|
||||
depends_on("gftl")
|
||||
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
45
var/spack/repos/builtin/packages/gftl-shared/package.py
Normal file
45
var/spack/repos/builtin/packages/gftl-shared/package.py
Normal file
@ -0,0 +1,45 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class GftlShared(CMakePackage):
|
||||
"""
|
||||
Provides common gFTL containers of Fortran intrinsic types that
|
||||
are encountered frequently.
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/Goddard-Fortran-Ecosystem/gFTL-shared"
|
||||
url = (
|
||||
"https://github.com/Goddard-Fortran-Ecosystem/gFTL-shared/archive/refs/tags/v1.5.0.tar.gz"
|
||||
)
|
||||
git = "https://github.com/Goddard-Fortran-Ecosystem/gFTL-shared.git"
|
||||
|
||||
maintainers = ["mathomp4", "tclune"]
|
||||
|
||||
version("main", branch="main")
|
||||
|
||||
version("1.5.0", sha256="c19b8197cc6956d4a51a16f98b38b63c7bc9f784f1fd38f8e3949be3ea792356")
|
||||
version("1.4.1", sha256="bb403f72e80aaac49ed5107f7c755ce5273c2e650bd5438a746228798eeced6c")
|
||||
version("1.4.0", sha256="83a2474ae943d81d797460b18106874de14c39093efd4e35abb3f1b6ec835171")
|
||||
version("1.3.6", sha256="d8cd1fc7b8c9a42fc44c8986f6b89e06589bef9b6718699e564dd506e101cf1f")
|
||||
version("1.3.5", sha256="5cb421cf79a0505d21da6c25961dc7f9f108a4ff68a2ee8b5db39b2926a1133f")
|
||||
version("1.3.4", sha256="02570edb08af379aa59d3a15296c0231701e114de273ce08804c718681555854")
|
||||
version("1.3.3", sha256="40822130fc4eec9d34ba71cc0ee0a00fb7410e5ce4d2841cb405f192fb12ab3b")
|
||||
version("1.3.2", sha256="142e94420986fa1bb3797bd4a0e61ca07cdd4d379465734bd25ec92032d769f0")
|
||||
version("1.3.1", sha256="a71e164108847f32f37da505f604fc2a50f392a4fcdf9a7cfe8eaf775bed64d4")
|
||||
version("1.3.0", sha256="979b00c4d531e701bf4346f662e3e4cc865124a97ca958637a53201d66d4ee43")
|
||||
|
||||
depends_on("m4", type=("build", "run"))
|
||||
depends_on("cmake", type="build")
|
||||
depends_on("gftl")
|
||||
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
59
var/spack/repos/builtin/packages/gftl/package.py
Normal file
59
var/spack/repos/builtin/packages/gftl/package.py
Normal file
@ -0,0 +1,59 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Gftl(CMakePackage):
|
||||
"""This package generates containers (Vector, Set, Map, ...) with
|
||||
Fortran interfaces. It is essentially a brute force analog of C++
|
||||
STL.
|
||||
|
||||
This package, gFTL, provides a mechanism to easily create robust
|
||||
containers and associated iterators which can be used within Fortran
|
||||
applications. The primary methods are intended to be as close
|
||||
to their C++ STL analogs as possible. We have found that these
|
||||
containers are a powerful productivity multiplier for certain types
|
||||
of software development, and hope that others find them to be just
|
||||
as useful.
|
||||
|
||||
Currently, the following three types of containers are provided.
|
||||
|
||||
* Vector (list)
|
||||
* Set
|
||||
* Map (associated array)
|
||||
|
||||
Contributions of additional containers are very much welcomed.
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/Goddard-Fortran-Ecosystem/gFTL"
|
||||
url = "https://github.com/Goddard-Fortran-Ecosystem/gFTL/archive/refs/tags/v1.5.5.tar.gz"
|
||||
git = "https://github.com/Goddard-Fortran-Ecosystem/gFTL.git"
|
||||
|
||||
maintainers = ["mathomp4", "tclune"]
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("main", branch="main")
|
||||
|
||||
version("1.8.1", sha256="b8171ea69b108325816472ee47068618d709a3f563959142bc58ff38908a7210")
|
||||
version("1.8.0", sha256="e99def0a9a1b3031ceff22c416bee75e70558cf6b91ce4be70b0ad752dda26c6")
|
||||
version("1.7.2", sha256="35a39a0dffb91969af5577b6dd7681379e1c16ca545f0cc2dae0b5192474d852")
|
||||
version("1.7.1", sha256="ee331ba7b30f81d4afd5b9cea69023b0c4643c2f588352bdbd82b60c7d0082dc")
|
||||
version("1.7.0", sha256="780ed951a01be932b79d3d7ecb522b70ba25dd45b1a3cc0d984897d606856e8a")
|
||||
version("1.6.1", sha256="2935d46e977ae331ba6b4f547d5ee8624f3ebb7da79475861c450b5013e89d40")
|
||||
version("1.6.0", sha256="303f459b8482cf5b323b67f2784111c9d333b6e9b253f3f78319383966ef5303")
|
||||
version("1.5.5", sha256="67ff8210f08e9f2ee6ba23c8c26336f948420db5db7fc054c3a662e9017f18a3")
|
||||
version("1.5.4", sha256="4c53e932ba8d82616b65500f403a33a14957b9266b5e931e2448f1f005990750")
|
||||
|
||||
depends_on("cmake", type="build")
|
||||
depends_on("m4", type="build")
|
||||
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
58
var/spack/repos/builtin/packages/pflogger/package.py
Normal file
58
var/spack/repos/builtin/packages/pflogger/package.py
Normal file
@ -0,0 +1,58 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Pflogger(CMakePackage):
|
||||
"""A parallel Fortran logger (based on the design of the Python logger)"""
|
||||
|
||||
homepage = "https://github.com/Goddard-Fortran-Ecosystem/pFlogger"
|
||||
url = "https://github.com/Goddard-Fortran-Ecosystem/pFlogger/archive/refs/tags/v1.6.1.tar.gz"
|
||||
git = "https://github.com/Goddard-Fortran-Ecosystem/pFlogger.git"
|
||||
|
||||
maintainers = ["mathomp4", "tclune"]
|
||||
|
||||
version("develop", branch="develop")
|
||||
version("main", branch="main")
|
||||
|
||||
version("1.9.1", sha256="918965f5a748a3a62e54751578f5935a820407b988b8455f7f25c266b5b7fe3c")
|
||||
version("1.9.0", sha256="aacd9b7e188bee3a54a4e681adde32e3bd95bb556cbbbd2c725c81aca5008003")
|
||||
version("1.8.0", sha256="28ce9ac8af374253b6dfd8f53f8fd271c787d432645ec9bc6a5a01601dc56e19")
|
||||
version("1.6.1", sha256="114a15daa7994ab7d4eea463c3a9b8fe7df3da7d07a0004b5c40cf155e374916")
|
||||
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
||||
|
||||
variant("mpi", default=False, description="Enable MPI")
|
||||
|
||||
# pFlogger needs careful versioning to build
|
||||
depends_on("gftl@:1.5", when="@:1.6")
|
||||
depends_on("gftl-shared@:1.3", when="@:1.6")
|
||||
depends_on("yafyaml@1.0-beta5", when="@:1.6")
|
||||
|
||||
depends_on("gftl@1.6:", when="@1.8:")
|
||||
depends_on("gftl-shared@1.4:", when="@1.8:")
|
||||
depends_on("yafyaml@1.0-beta8:", when="@1.8:")
|
||||
|
||||
depends_on("gftl@1.8.1:", when="@1.9:")
|
||||
depends_on("gftl-shared@1.5:", when="@1.9:")
|
||||
depends_on("yafyaml@1.0.4:", when="@1.9:")
|
||||
|
||||
depends_on("mpi", when="+mpi")
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
args = []
|
||||
|
||||
if spec.satisfies("+mpi"):
|
||||
args.extend(["-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc])
|
||||
|
||||
return args
|
@ -9,14 +9,30 @@
|
||||
|
||||
|
||||
class Pfunit(CMakePackage):
|
||||
"""pFUnit is a unit testing framework enabling JUnit-like testing of
|
||||
serial and MPI-parallel software written in Fortran."""
|
||||
"""
|
||||
pFUnit is a unit testing framework enabling JUnit-like testing of
|
||||
serial and MPI-parallel software written in Fortran.
|
||||
"""
|
||||
|
||||
homepage = "http://pfunit.sourceforge.net/"
|
||||
url = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit/releases/download/v4.1.10/pFUnit-4.1.10.tar"
|
||||
homepage = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit"
|
||||
url = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit/releases/download/v4.6.1/pFUnit-v4.6.1.tar"
|
||||
git = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git"
|
||||
|
||||
maintainers = ["citibeth"]
|
||||
maintainers = ["mathomp4", "tclune"]
|
||||
|
||||
version("4.6.1", sha256="19de22ff0542ca900aaf2957407f24d7dadaccd993ea210beaf22032d3095add")
|
||||
version("4.6.0", sha256="7c768ea3a2d16d8ef6229b25bd7756721c24a18db779c7422afde0e3e2248d72")
|
||||
version("4.5.0", sha256="ae0ed4541f2f4ec7b1d06eed532a49cb4c666394ab92b233911f92ce50f76743")
|
||||
version("4.4.1", sha256="6b5d5e19201f56e1ebc984f1cb30dffa0e9e1f14810aab601bd43e85fd3f18ab")
|
||||
version("4.4.0", sha256="e51e09b272e0f2598eb94cd1367158049deed1ac3a8779a7b30931e36f8c9752")
|
||||
version("4.3.0", sha256="a63d3ccda4a5e44b2afecbf3cc01275f80047602bd8587343a19f17db3e64b1d")
|
||||
version("4.2.7", sha256="1412134f812322b0aa5471007c9b7281fbe962e15b9efc9700cac24c9054bd84")
|
||||
version("4.2.6", sha256="9604d4c010a56bbb495eafcc9a2061a49572204dd211750b6f7209712c7c4a8a")
|
||||
version("4.2.5", sha256="a1f8edece98d6ffc3475465022828ccc9e26e2ecbd0374f4883bef626e33e549")
|
||||
version("4.2.3", sha256="9469a945a41649fd136bd75b3c5bae9895fe2d5f36046c24525b73d3d444d32f")
|
||||
version("4.2.2", sha256="f837b99585780c065e32249741926c61c8bf8b5b0b170ffc0fbcde105afbbb6a")
|
||||
version("4.2.1", sha256="977ac9de453da26700b7d4660f783e2850b6d4c9bbf36a4ffb721dbdeb8eb58c")
|
||||
version("4.2.0", sha256="33df62f80cf03827455508b67d53f820ddffa2ec0f1ba999790ff1f87592ce16")
|
||||
version("4.1.14", sha256="bada2be8d7e69ca1f16209ba92293fa1c06748b78534d71b24b2c825450a495f")
|
||||
version("4.1.13", sha256="f388e08c67c51cbfd9f3a3658baac912b5506d2fc651410cd34a21260c309630")
|
||||
version("4.1.12", sha256="7d71b0fb996497fe9a20eb818d02d596cd0d3cded1033a89a9081fbd925c68f2")
|
||||
@ -33,6 +49,8 @@ class Pfunit(CMakePackage):
|
||||
variant("mpi", default=False, description="Enable MPI")
|
||||
variant("use_comm_world", default=False, description="Enable MPI_COMM_WORLD for testing")
|
||||
variant("openmp", default=False, description="Enable OpenMP")
|
||||
variant("fhamcrest", default=False, description="Enable hamcrest support")
|
||||
variant("esmf", default=False, description="Enable esmf support")
|
||||
variant("docs", default=False, description="Build docs")
|
||||
|
||||
variant(
|
||||
@ -42,16 +60,25 @@ class Pfunit(CMakePackage):
|
||||
description="Max number of Fortran dimensions of array asserts",
|
||||
)
|
||||
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
||||
|
||||
depends_on("python@2.7:", type=("build", "run")) # python3 too!
|
||||
depends_on("mpi", when="+mpi")
|
||||
depends_on("esmf", when="+esmf")
|
||||
depends_on("m4", when="@4.1.5:", type="build")
|
||||
depends_on("fargparse")
|
||||
|
||||
conflicts(
|
||||
"%gcc@:8.3.9",
|
||||
when="@4.0.0:",
|
||||
msg="Older versions of GCC do "
|
||||
"not support the Fortran 2008 features required by new pFUnit.",
|
||||
msg="pFUnit requires GCC 8.4.0 or newer",
|
||||
)
|
||||
|
||||
# See https://github.com/Goddard-Fortran-Ecosystem/pFUnit/pull/179
|
||||
conflicts("+shared", when="@4.0.0:")
|
||||
conflicts("+use_comm_world", when="~mpi")
|
||||
@ -64,14 +91,20 @@ def patch(self):
|
||||
filter_file(r".*/mod($|[^\w].*)", "", file)
|
||||
|
||||
def url_for_version(self, version):
|
||||
# Version 4 uses a different URL syntax than previous versions
|
||||
url_base = "https://github.com/Goddard-Fortran-Ecosystem/pFUnit"
|
||||
if version >= Version("4"):
|
||||
# Version 4.2.3+ has a v...
|
||||
if version >= Version("4.2.3"):
|
||||
url = url_base + "/releases/download/v{0}/pFUnit-v{0}.tar"
|
||||
# Then version down to 4.0.0 does not
|
||||
elif version >= Version("4"):
|
||||
url = url_base + "/releases/download/v{0}/pFUnit-{0}.tar"
|
||||
# Version 3.3.0 has a v unlike all other 3 releases
|
||||
elif version == Version("3.3.0"):
|
||||
url = url_base + "/archive/v{0}.tar.gz"
|
||||
else:
|
||||
url = url_base + "/archive/{0}.tar.gz"
|
||||
|
||||
return url.format(version.dotted)
|
||||
return url.format(version)
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
@ -80,7 +113,7 @@ def cmake_args(self):
|
||||
self.define_from_variant("BUILD_SHARED", "shared"),
|
||||
"-DCMAKE_Fortran_MODULE_DIRECTORY=%s" % spec.prefix.include,
|
||||
self.define_from_variant("BUILD_DOCS", "docs"),
|
||||
"-DMAX_RANK=%s" % spec.variants["max_array_rank"].value,
|
||||
"-DMAX_ASSERT_RANK=%s" % spec.variants["max_array_rank"].value,
|
||||
]
|
||||
|
||||
if self.spec.satisfies("%gcc@10:"):
|
||||
@ -89,6 +122,8 @@ def cmake_args(self):
|
||||
if spec.satisfies("@4.0.0:"):
|
||||
args.append("-DSKIP_MPI=%s" % ("YES" if "~mpi" in spec else "NO"))
|
||||
args.append("-DSKIP_OPENMP=%s" % ("YES" if "~openmp" in spec else "NO"))
|
||||
args.append("-DSKIP_FHAMCREST=%s" % ("YES" if "~fhamcrest" in spec else "NO"))
|
||||
args.append("-DSKIP_ESMF=%s" % ("YES" if "~esmf" in spec else "NO"))
|
||||
else:
|
||||
args.append(self.define_from_variant("MPI", "mpi"))
|
||||
args.append(self.define_from_variant("OPENMP", "openmp"))
|
||||
|
49
var/spack/repos/builtin/packages/yafyaml/package.py
Normal file
49
var/spack/repos/builtin/packages/yafyaml/package.py
Normal file
@ -0,0 +1,49 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class Yafyaml(CMakePackage):
|
||||
"""
|
||||
yet another Fortran (implementation of) YAML
|
||||
|
||||
There is at least one other open source Fortran-based YAML parser.
|
||||
|
||||
The rationale for this one is simply to be compatible with the
|
||||
containers in gFTL. It is not intended to be a complete YAML
|
||||
parser, just the subset needed by my own projects.
|
||||
"""
|
||||
|
||||
homepage = "https://github.com/Goddard-Fortran-Ecosystem/yaFyaml"
|
||||
url = "https://github.com/Goddard-Fortran-Ecosystem/yaFyaml/archive/refs/tags/v1.0.4.tar.gz"
|
||||
git = "https://github.com/Goddard-Fortran-Ecosystem/yaFyaml.git"
|
||||
|
||||
maintainers = ["mathomp4", "tclune"]
|
||||
|
||||
version("main", branch="main")
|
||||
|
||||
version("1.0.4", sha256="93ba67c87cf96be7ebe479907ca5343251aa48072b2671b8630bd244540096d3")
|
||||
version("1.0.3", sha256="cfbc6b6db660c5688e37da56f9f0091e5cafeeaec395c2a038469066c83b0c65")
|
||||
version("1.0.2", sha256="1d08d093d0f4331e4019306a3b6cb0b230aed18998692b57931555d6805f3d94")
|
||||
version("1.0.1", sha256="706d77c43a9c3d2cbd1030c4bbf6b196ea2e0d84df72b3704035d1b52c408baf")
|
||||
version("1.0.0", sha256="19334e924d031445f159602a27a1e6778e8a1bd2ead219accdb397c25706f88e")
|
||||
version("1.0-beta8", sha256="0a2ae37f45abaca2e4d8dbc317117eeb08c5652d5d2524f51852d957fd719855")
|
||||
version("1.0-beta7", sha256="cf7992818cc2caa86346f6f24c251bcfd96bc68eaacc17da89d997260d9db867")
|
||||
version("1.0-beta6", sha256="9d90ffd78ae70e477ed58afa474e214822a3c1a0a86c067ba3e245550108a028")
|
||||
version("1.0-beta5", sha256="509487c544f199503b3724c170a6d6cd35c237e8ee23a34e94ee3c056b9e39ee")
|
||||
version("1.0-beta4", sha256="42bf9c8517d7867614cc24cc4267c70bbe6f8d62474e22d3552d9cc5aa4fc195")
|
||||
version("0.5.1", sha256="7019460314e388b2d556db75d5eb734237a18494f79b921613addb96b7b7ce2f")
|
||||
version("0.5.0", sha256="8ac5d41b1020e9311ac87f50dbd61b9f3e3188f3599ce463ad59650208fdb8ad")
|
||||
|
||||
depends_on("gftl-shared")
|
||||
depends_on("gftl")
|
||||
|
||||
variant(
|
||||
"build_type",
|
||||
default="Release",
|
||||
description="The build type to build",
|
||||
values=("Debug", "Release"),
|
||||
)
|
Loading…
Reference in New Issue
Block a user