summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAsher Mancinelli <asher.mancinelli@pnnl.gov>2021-03-05 12:32:11 -0700
committerGitHub <noreply@github.com>2021-03-05 11:32:11 -0800
commitda69f6eda83e03290d0a7d6c5435f1f9cbc25286 (patch)
tree2ca39c15ce4c3655ebeb5145930443d207fac2d2 /var
parent4097a0c93f3804fb3f3e7b697a1741bbbd3ee88c (diff)
downloadspack-da69f6eda83e03290d0a7d6c5435f1f9cbc25286.tar.gz
spack-da69f6eda83e03290d0a7d6c5435f1f9cbc25286.tar.bz2
spack-da69f6eda83e03290d0a7d6c5435f1f9cbc25286.tar.xz
spack-da69f6eda83e03290d0a7d6c5435f1f9cbc25286.zip
Added support for disabling mumps in ipopt (#21592)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ipopt/package.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/ipopt/package.py b/var/spack/repos/builtin/packages/ipopt/package.py
index 9926bdd10f..c98c490185 100644
--- a/var/spack/repos/builtin/packages/ipopt/package.py
+++ b/var/spack/repos/builtin/packages/ipopt/package.py
@@ -30,14 +30,19 @@ class Ipopt(AutotoolsPackage):
description="Build with METIS partitioning support")
variant('debug', default=False,
description="Build debug instead of optimized version")
+ variant('mumps', default=True,
+ description='Build with support for linear solver MUMPS')
depends_on("blas")
depends_on("lapack")
depends_on("pkgconfig", type='build')
- depends_on("mumps+double~mpi")
+ depends_on("mumps+double~mpi", when='+mumps')
depends_on('coinhsl', when='+coinhsl')
depends_on('metis@4.0:', when='+metis')
+ # Must have at least one linear solver available!
+ conflicts('~mumps', when='~coinhsl')
+
patch('ipopt_ppc_build.patch', when='arch=ppc64le')
flag_handler = build_system_flags
@@ -51,20 +56,12 @@ class Ipopt(AutotoolsPackage):
# Dependency directories
blas_dir = spec['blas'].prefix
lapack_dir = spec['lapack'].prefix
- mumps_dir = spec['mumps'].prefix
-
- # Add directory with fake MPI headers in sequential MUMPS
- # install to header search path
- mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq"
- mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags
blas_lib = spec['blas'].libs.ld_flags
lapack_lib = spec['lapack'].libs.ld_flags
args = [
"--prefix=%s" % self.prefix,
- "--with-mumps-incdir=%s" % mumps_dir.include,
- "--with-mumps-lib=%s" % mumps_libcmd,
"--enable-shared",
"coin_skip_warn_cxxflags=yes",
"--with-blas-incdir=%s" % blas_dir.include,
@@ -73,6 +70,16 @@ class Ipopt(AutotoolsPackage):
"--with-lapack-lib=%s" % lapack_lib
]
+ if '+mumps' in spec:
+ # Add directory with fake MPI headers in sequential MUMPS
+ # install to header search path
+ mumps_dir = spec['mumps'].prefix
+ mumps_flags = "-ldmumps -lmumps_common -lpord -lmpiseq"
+ mumps_libcmd = "-L%s " % mumps_dir.lib + mumps_flags
+ args.extend([
+ "--with-mumps-incdir=%s" % mumps_dir.include,
+ "--with-mumps-lib=%s" % mumps_libcmd])
+
if 'coinhsl' in spec:
args.extend([
'--with-hsl-lib=%s' % spec['coinhsl'].libs.ld_flags,