Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hiop: new port in math #17393

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions math/hiop/Portfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# -*- 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 cmake 1.1
PortGroup github 1.0
PortGroup linear_algebra 1.0
PortGroup mpi 1.0

github.setup LLNL hiop 0.7.1 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 2b27489df8f388bc7de01a3ccc0bc2db6d4c413e \
sha256 5d2f3fecd233afe0984171f2a792d60b6e66b33d659d744d87da866476266a21 \
size 2539742

depends_lib-append path:include/eigen3: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
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
}

test.run yes
test.cmd-prepend DYLD_LIBRARY_PATH=${cmake.build_dir}/src