summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJim Edwards <jedwards@ucar.edu>2022-09-12 09:48:21 -0600
committerGitHub <noreply@github.com>2022-09-12 17:48:21 +0200
commit5dc1a9f2140013b72c57c00bcf3523ed1accb02b (patch)
tree1a75c0e0aa9714f55d0f5ceeedb12ebdc0ac82f4 /var
parent8dad29752603c4daa25276fe03a48d3d5afacd84 (diff)
downloadspack-5dc1a9f2140013b72c57c00bcf3523ed1accb02b.tar.gz
spack-5dc1a9f2140013b72c57c00bcf3523ed1accb02b.tar.bz2
spack-5dc1a9f2140013b72c57c00bcf3523ed1accb02b.tar.xz
spack-5dc1a9f2140013b72c57c00bcf3523ed1accb02b.zip
parallelio: make shared lib the default (#32432)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/parallelio/gfortran.patch23
-rw-r--r--var/spack/repos/builtin/packages/parallelio/package.py11
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/parallelio/gfortran.patch b/var/spack/repos/builtin/packages/parallelio/gfortran.patch
new file mode 100644
index 0000000000..c8878df78a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/parallelio/gfortran.patch
@@ -0,0 +1,23 @@
+--- old/CMakeLists.txt
++++ new/CMakeLists.txt
+@@ -4,7 +4,7 @@
+
+ # Jim Edwards
+
+-cmake_minimum_required (VERSION 3.5.2)
++cmake_minimum_required (VERSION 3.7)
+ project (PIO C)
+
+ # The project version number.
+@@ -243,6 +243,11 @@ if (PIO_ENABLE_COVERAGE)
+ endif ()
+ endif ()
+
++# Allow argument mismatch in gfortran versions > 10 for mpi library compatibility
++if ("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_GREATER_EQUAL 10)
++ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
++endif()
++
+ # Include this so we can check values in netcdf_meta.h.
+ INCLUDE(CheckCSourceCompiles)
+ INCLUDE(FindNetCDF)
diff --git a/var/spack/repos/builtin/packages/parallelio/package.py b/var/spack/repos/builtin/packages/parallelio/package.py
index 97f8f6fd6a..c97e3f1e61 100644
--- a/var/spack/repos/builtin/packages/parallelio/package.py
+++ b/var/spack/repos/builtin/packages/parallelio/package.py
@@ -13,6 +13,7 @@ class Parallelio(CMakePackage):
homepage = "https://ncar.github.io/ParallelIO/"
url = "https://github.com/NCAR/ParallelIO/archive/pio2_5_8.tar.gz"
+ git = "https://github.com/NCAR/ParallelIO.git"
maintainers = ["jedwards4b"]
@@ -33,6 +34,9 @@ class Parallelio(CMakePackage):
depends_on("netcdf-fortran", type="link", when="+fortran")
depends_on("parallel-netcdf", type="link", when="+pnetcdf")
+ # Allow argument mismatch in gfortran versions > 10 for mpi library compatibility
+ patch("gfortran.patch", when="+fortran %gcc@10:")
+
resource(name="genf90", git="https://github.com/PARALLELIO/genf90.git", tag="genf90_200608")
def cmake_args(self):
@@ -46,6 +50,8 @@ class Parallelio(CMakePackage):
define("NetCDF_C_PATH", spec["netcdf-c"].prefix),
define("USER_CMAKE_MODULE_PATH", join_path(src, "cmake")),
define("GENF90_PATH", join_path(src, "genf90")),
+ define("BUILD_SHARED_LIBS", True),
+ define("PIO_ENABLE_EXAMPLES", False),
]
if spec.satisfies("+pnetcdf"):
args.extend(
@@ -68,3 +74,8 @@ class Parallelio(CMakePackage):
]
)
return args
+
+ def url_for_version(self, version):
+ return "https://github.com/NCAR/ParallelIO/archive/pio{0}.tar.gz".format(
+ version.underscored
+ )