Added support for disabling mumps in ipopt (#21592)
This commit is contained in:
parent
4097a0c93f
commit
da69f6eda8
@ -30,14 +30,19 @@ class Ipopt(AutotoolsPackage):
|
|||||||
description="Build with METIS partitioning support")
|
description="Build with METIS partitioning support")
|
||||||
variant('debug', default=False,
|
variant('debug', default=False,
|
||||||
description="Build debug instead of optimized version")
|
description="Build debug instead of optimized version")
|
||||||
|
variant('mumps', default=True,
|
||||||
|
description='Build with support for linear solver MUMPS')
|
||||||
|
|
||||||
depends_on("blas")
|
depends_on("blas")
|
||||||
depends_on("lapack")
|
depends_on("lapack")
|
||||||
depends_on("pkgconfig", type='build')
|
depends_on("pkgconfig", type='build')
|
||||||
depends_on("mumps+double~mpi")
|
depends_on("mumps+double~mpi", when='+mumps')
|
||||||
depends_on('coinhsl', when='+coinhsl')
|
depends_on('coinhsl', when='+coinhsl')
|
||||||
depends_on('metis@4.0:', when='+metis')
|
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')
|
patch('ipopt_ppc_build.patch', when='arch=ppc64le')
|
||||||
|
|
||||||
flag_handler = build_system_flags
|
flag_handler = build_system_flags
|
||||||
@ -51,20 +56,12 @@ def configure_args(self):
|
|||||||
# Dependency directories
|
# Dependency directories
|
||||||
blas_dir = spec['blas'].prefix
|
blas_dir = spec['blas'].prefix
|
||||||
lapack_dir = spec['lapack'].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
|
blas_lib = spec['blas'].libs.ld_flags
|
||||||
lapack_lib = spec['lapack'].libs.ld_flags
|
lapack_lib = spec['lapack'].libs.ld_flags
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
"--prefix=%s" % self.prefix,
|
"--prefix=%s" % self.prefix,
|
||||||
"--with-mumps-incdir=%s" % mumps_dir.include,
|
|
||||||
"--with-mumps-lib=%s" % mumps_libcmd,
|
|
||||||
"--enable-shared",
|
"--enable-shared",
|
||||||
"coin_skip_warn_cxxflags=yes",
|
"coin_skip_warn_cxxflags=yes",
|
||||||
"--with-blas-incdir=%s" % blas_dir.include,
|
"--with-blas-incdir=%s" % blas_dir.include,
|
||||||
@ -73,6 +70,16 @@ def configure_args(self):
|
|||||||
"--with-lapack-lib=%s" % lapack_lib
|
"--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:
|
if 'coinhsl' in spec:
|
||||||
args.extend([
|
args.extend([
|
||||||
'--with-hsl-lib=%s' % spec['coinhsl'].libs.ld_flags,
|
'--with-hsl-lib=%s' % spec['coinhsl'].libs.ld_flags,
|
||||||
|
Loading…
Reference in New Issue
Block a user