summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com>2023-01-23 13:29:06 -0800
committerGitHub <noreply@github.com>2023-01-23 22:29:06 +0100
commitbeba33b2d8276272443b0b1b33a4f5ec157541bf (patch)
tree1c01c87932ebc6e52d754c97645d5db9460869f1
parent0f2e0a01a97210b9c1380066ba362b7321e7a0e8 (diff)
downloadspack-beba33b2d8276272443b0b1b33a4f5ec157541bf.tar.gz
spack-beba33b2d8276272443b0b1b33a4f5ec157541bf.tar.bz2
spack-beba33b2d8276272443b0b1b33a4f5ec157541bf.tar.xz
spack-beba33b2d8276272443b0b1b33a4f5ec157541bf.zip
Update parallelio from NOAA-EMC fork (#34837)
-rw-r--r--var/spack/repos/builtin/packages/parallelio/package.py22
-rw-r--r--var/spack/repos/builtin/packages/parallelio/remove_redefinition_of_mpi_offset.patch35
2 files changed, 49 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/parallelio/package.py b/var/spack/repos/builtin/packages/parallelio/package.py
index 5e9c0e8755..f9eec3d4e2 100644
--- a/var/spack/repos/builtin/packages/parallelio/package.py
+++ b/var/spack/repos/builtin/packages/parallelio/package.py
@@ -18,19 +18,24 @@ class Parallelio(CMakePackage):
maintainers = ["jedwards4b"]
version("2.5.9", sha256="e5dbc153d8637111de3a51a9655660bf15367d55842de78240dcfc024380553d")
- version("2_5_8", sha256="f2584fb4310ff7da39d51efbe3f334efd0ac53ae2995e5fc157decccc0570a89")
- version("2_5_7", sha256="af8af04e41af17f98f2c90b996ef0d8bcd980377e0b35e57b38938c7fdc87cbd")
- version("2_5_4", sha256="e51dc71683da808a714deddc1a80c2650ce847110383e42f1710f3ba567e7a65")
- version("2_5_2", sha256="935bc120ef3bf4fe09fb8bfdf788d05fb201a125d7346bf6b09e27ac3b5f345c")
+ version("2.5.8", sha256="f2584fb4310ff7da39d51efbe3f334efd0ac53ae2995e5fc157decccc0570a89")
+ version("2.5.7", sha256="af8af04e41af17f98f2c90b996ef0d8bcd980377e0b35e57b38938c7fdc87cbd")
+ version("2.5.4", sha256="e51dc71683da808a714deddc1a80c2650ce847110383e42f1710f3ba567e7a65")
+ version("2.5.3", sha256="205a0a128fd5262700efc230b3380dc5ab10e74bc5d273ae05db76c9d95487ca")
+ version("2.5.2", sha256="935bc120ef3bf4fe09fb8bfdf788d05fb201a125d7346bf6b09e27ac3b5f345c")
variant("pnetcdf", default=False, description="enable pnetcdf")
variant("timing", default=False, description="enable GPTL timing")
+ variant("shared", default=True, description="Build shared libraries")
variant("logging", default=False, description="enable verbose logging")
variant(
"fortran", default=True, description="enable fortran interface (requires netcdf fortran)"
)
variant("mpi", default=True, description="Use mpi to build, otherwise use mpi-serial")
+ patch("remove_redefinition_of_mpi_offset.patch", when="@:2.5.6")
+
+ depends_on("cmake@3.7:", type="build")
depends_on("mpi", when="+mpi")
depends_on("mpi-serial", when="~mpi")
depends_on("netcdf-c +mpi", type="link", when="+mpi")
@@ -38,11 +43,11 @@ class Parallelio(CMakePackage):
depends_on("netcdf-fortran", type="link", when="+fortran")
depends_on("parallel-netcdf", type="link", when="+pnetcdf")
+ resource(name="genf90", git="https://github.com/PARALLELIO/genf90.git", tag="genf90_200608")
+
# Allow argument mismatch in gfortran versions > 10 for mpi library compatibility
patch("gfortran.patch", when="@:2.5.8 +fortran %gcc@10:")
- resource(name="genf90", git="https://github.com/PARALLELIO/genf90.git", tag="genf90_200608")
-
def cmake_args(self):
define = self.define
define_from_variant = self.define_from_variant
@@ -51,9 +56,10 @@ class Parallelio(CMakePackage):
args = [
define("NetCDF_C_PATH", spec["netcdf-c"].prefix),
- define("USER_CMAKE_MODULE_PATH", join_path(src, "cmake")),
+ define("NetCDF_Fortran_PATH", spec["netcdf-fortran"].prefix),
+ define("USER_CMAKE_MODULE_PATH", join_path(src, "CMake_Fortran_utils")),
define("GENF90_PATH", join_path(src, "genf90")),
- define("BUILD_SHARED_LIBS", True),
+ define_from_variant("BUILD_SHARED_LIBS", "shared"),
define("PIO_ENABLE_EXAMPLES", False),
]
if spec.satisfies("+pnetcdf"):
diff --git a/var/spack/repos/builtin/packages/parallelio/remove_redefinition_of_mpi_offset.patch b/var/spack/repos/builtin/packages/parallelio/remove_redefinition_of_mpi_offset.patch
new file mode 100644
index 0000000000..d415a93c39
--- /dev/null
+++ b/var/spack/repos/builtin/packages/parallelio/remove_redefinition_of_mpi_offset.patch
@@ -0,0 +1,35 @@
+--- a/src/clib/pio_internal.h
++++ b/src/clib/pio_internal.h
+@@ -30,12 +30,12 @@
+ #include <mpe.h>
+ #endif /* USE_MPE */
+
+-#ifndef MPI_OFFSET
++//#ifndef MPI_OFFSET
+ /** MPI_OFFSET is an integer type of size sufficient to represent the
+ * size (in bytes) of the largest file supported by MPI. In some MPI
+ * implementations MPI_OFFSET is not properly defined. */
+-#define MPI_OFFSET MPI_LONG_LONG
+-#endif
++//#define MPI_OFFSET MPI_LONG_LONG
++//#endif
+
+ /* These are the sizes of types in netCDF files. Do not replace these
+ * constants with sizeof() calls for C types. They are not the
+@@ -57,10 +57,10 @@
+ #define MPI_OFFSET OMPI_OFFSET_DATATYPE
+ #endif
+ #endif
+-#ifndef MPI_Offset
++//#ifndef MPI_Offset
+ /** This is the type used for PIO_Offset. */
+-#define MPI_Offset long long
+-#endif
++//#define MPI_Offset long long
++//#endif
+
+ /** Some MPI implementations do not allow passing MPI_DATATYPE_NULL to
+ * comm functions even though the send or recv length is 0, in these
+--
+2.34.1
+