Added support for disabling mumps in ipopt (#21592)
This commit is contained in:
parent
4097a0c93f
commit
da69f6eda8
1 changed files with 16 additions and 9 deletions
|
@ -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 @@ def configure_args(self):
|
|||
# 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 @@ def configure_args(self):
|
|||
"--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,
|
||||
|
|
Loading…
Reference in a new issue