# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup active_variants 1.1 PortGroup cmake 1.1 PortGroup compiler_blacklist_versions 1.0 PortGroup github 1.0 PortGroup linear_algebra 1.0 PortGroup mpi 1.0 github.setup LLNL hiop 1.1.0 v revision 0 categories math science license BSD maintainers {@barracuda156 gmail.com:vital.had} openmaintainer description HPC solver for non-linear optimization problems long_description HiOp is an optimization solver for solving certain mathematical optimization problems \ expressed as non-linear programming problems. HiOp is a lightweight HPC solver \ that leverages application’s existing data parallelism to parallelize \ the optimization iterations by using specialized parallel linear algebra kernels. checksums rmd160 c7fe5727192429c78b96a9663f44c445bdb803a2 \ sha256 e1fe89605e528cdc7946f71355c22be4e9b807e75f9b3c91e8fac83451a396a5 \ size 2632151 github.tarball_from archive depends_lib-append path:share/pkgconfig/eigen3.pc:eigen3 if {${os.platform} eq "darwin" && ${os.arch} eq "powerpc"} { mpi.setup require require_fortran \ -gcc44 -gcc45 -gcc46 -gcc47 -gcc48 -gcc49 -gcc5 -gcc6 \ -clang -fortran } else { mpi.setup require require_fortran \ -gcc44 -gcc45 -gcc46 -gcc47 -gcc48 -gcc49 -gcc5 -gcc6 } compiler.cxx_standard 2014 # Xcode clang of 10.11 and earlier fail to build it. compiler.blacklist-append \ {clang < 900} compilers.setup require_fortran # Needed in order for correct version of BLAS to be picked: pre-configure { configure.args-append ${cmake_linalglib} if {[variant_isset openblas]} { configure.args-append \ -DBLAS_LIBRARIES=${prefix}/lib/libopenblas.dylib \ -DLAPACK_LIBRARIES=${prefix}/lib/libopenblas.dylib } } configure.args-append \ -DHIOP_BUILD_SHARED=ON \ -DHIOP_EIGEN_DIR=${prefix}/include/eigen3 \ -DHIOP_USE_EIGEN=ON \ -DHIOP_USE_MPI=ON \ -DHIOP_WITH_MAKETEST=ON \ -DHIOP_BUILD_DOCUMENTATION=OFF \ -DHIOP_BUILD_FORTRAN_EXAMPLE=OFF \ -DHIOP_DEEPCHECKS=OFF \ -DHIOP_DEVELOPER_MODE=OFF \ -DHIOP_SPARSE=OFF \ -DHIOP_USE_COINHSL=OFF \ -DHIOP_USE_GINKGO=OFF \ -DHIOP_USE_GPU=OFF \ -DHIOP_USE_PARDISO=OFF \ -DHIOP_USE_RAJA=OFF \ -DHIOP_USE_STRUMPACK=OFF \ -DHIOP_WITH_KRON_REDUCTION=OFF # ___atomic_fetch_add_8, ___atomic_load_8 if {${build_arch} in [list i386 ppc] && [string match *gcc* ${configure.compiler}]} { configure.ldflags-append -latomic } # TODO: add Raja support. Requires Umpire. # FIXME: Ginkgo backend does not build at the moment: # https://github.com/LLNL/hiop/issues/586 # https://github.com/ginkgo-project/ginkgo/issues/1258 variant ginkgo description "Build with Ginkgo backend" { depends_lib-append \ port:ginkgo configure.args-replace \ -DHIOP_USE_GINKGO=OFF -DHIOP_USE_GINKGO=ON if {![catch {set result [active_variants ginkgo mpi]}]} { if {$result} { if {![variant_isset mpi]} { return -code error "ginkgo has mpi enabled, please use the same variant." } } } if {![catch {set result [active_variants ginkgo openmpi]}]} { if {$result} { if {![variant_isset openmpi]} { return -code error "ginkgo has openmpi enabled, please use the same variant." } } } } # Strumpack backend works, but few tests fail: https://github.com/pghysels/STRUMPACK/issues/83 variant strumpack description "Build with STRUMPACK backend" { depends_lib-append \ port:bpack \ port:parmetis \ port:scotch \ port:strumpack \ port:zfp patchfiles-append \ patch-strumpack-includes.diff post-patch { reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/CMakeLists.txt } configure.args-replace \ -DHIOP_USE_STRUMPACK=OFF -DHIOP_USE_STRUMPACK=ON if {![catch {set result [active_variants strumpack mpi]}]} { if {$result} { if {![variant_isset mpi]} { return -code error "strumpack has mpi enabled, please use the same variant." } } } if {![catch {set result [active_variants strumpack openmpi]}]} { if {$result} { if {![variant_isset openmpi]} { return -code error "strumpack has openmpi enabled, please use the same variant." } } } } # Ginkgo will use these too, when enabled: if {[variant_isset strumpack] || [variant_isset ginkgo]} { depends_lib-append \ port:metis \ port:scalapack require_active_variants \ port:metis openmp configure.args-replace \ -DHIOP_SPARSE=OFF -DHIOP_SPARSE=ON if {![catch {set result [active_variants scalapack mpi]}]} { if {$result} { if {![variant_isset mpi]} { return -code error "scalapack has mpi enabled, please use the same variant." } } } if {![catch {set result [active_variants scalapack openmpi]}]} { if {$result} { if {![variant_isset openmpi]} { return -code error "scalapack has openmpi enabled, please use the same variant." } } } } test.run yes test.cmd-prepend DYLD_LIBRARY_PATH=${cmake.build_dir}/src