Skip to content

Commit

Permalink
mpiserial: rework installation (spack#40762)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b authored Dec 6, 2023
1 parent b0f1930 commit 84999b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 38 deletions.
34 changes: 0 additions & 34 deletions var/spack/repos/builtin/packages/mpi-serial/install.patch

This file was deleted.

18 changes: 14 additions & 4 deletions var/spack/repos/builtin/packages/mpi-serial/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import os

from spack.package import *


Expand Down Expand Up @@ -31,8 +33,6 @@ class MpiSerial(AutotoolsPackage):
description="Specify the size of Fortran double precision variables",
)

patch("install.patch")

provides("mpi")

def flag_handler(self, name, flags):
Expand All @@ -41,8 +41,7 @@ def flag_handler(self, name, flags):

if name == "cflags":
config_flags.append(self.compiler.cc_pic_flag)

if spec.compiler.name in ["oneapi"]:
if spec.satisfies("%oneapi"):
# OneAPI fails due to these standards checks
config_flags.append("-Wno-error=implicit-int")
config_flags.append("-Wno-error=implicit-function-declaration")
Expand All @@ -62,3 +61,14 @@ def configure_args(self):
args.extend(["--enable-fort-double={0}".format(doublesize)])

return args

def install(self, spec, prefix):
mkdir(prefix.lib)
mkdir(prefix.include)
install("libmpi-serial.a", prefix.lib)
install("mpi.h", prefix.include)
install("mpif.h", prefix.include)
if os.path.isfile("mpi.mod"):
install("mpi.mod", prefix.include)
if os.path.isfile("MPI.mod"):
install("MPI.mod", prefix.include)

0 comments on commit 84999b6

Please sign in to comment.