Skip to content

Commit

Permalink
Trac #34726: Optional package papilo (dependency of scip)
Browse files Browse the repository at this point in the history
https://github.com/scipopt/papilo/

https://github.com/scipopt/papilo/archive/refs/tags/v2.1.1.tar.gz

Not packaged anywhere - https://repology.org/projects/?search=papilo

scip uses papilo's header-only library, but papilo also likes to build
an executable that may depend on scip and other solvers at compile time.
- scipopt/papilo#21

New packages needed as dependencies:
- https://github.com/oneapi-src/oneTBB -
https://repology.org/project/onetbb/versions

URL: https://trac.sagemath.org/34726
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Dec 21, 2022
2 parents e5cf1c0 + 4b71c4a commit f84915f
Show file tree
Hide file tree
Showing 26 changed files with 145 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build/pkgs/onetbb/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
onetbb: oneAPI Threading Building Blocks
========================================

Description
-----------

C++ parallelization library


License
-------

Apache License, Version 2.0


Upstream Contact
----------------

https://github.com/oneapi-src/oneTBB
5 changes: 5 additions & 0 deletions build/pkgs/onetbb/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=onetbb-VERSION.tar.gz
sha1=e4be99dc35948052296105d2ae7da6d34e01ba2d
md5=68e617448f71df02d8688c84d53778f6
cksum=1573392748
upstream_url=https://github.com/oneapi-src/oneTBB/archive/refs/tags/vVERSION.tar.gz
1 change: 1 addition & 0 deletions build/pkgs/onetbb/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| cmake
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/alpine.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libtbb-dev
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
intel-oneapi-tbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libtbb-dev
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/fedora.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tbb-devel
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/freebsd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
devel/onetbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/gentoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dev-cpp/tbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/homebrew.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/macports.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
onetbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/nix.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tbb
1 change: 1 addition & 0 deletions build/pkgs/onetbb/distros/void.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tbb-devel
1 change: 1 addition & 0 deletions build/pkgs/onetbb/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2021.7.0
17 changes: 17 additions & 0 deletions build/pkgs/onetbb/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
SAGE_SPKG_CONFIGURE([onetbb], [dnl
AC_MSG_CHECKING([whether oneTBB >= 2018 is available])
rm -rf conftest_srcdir
mkdir conftest_srcdir
cat > conftest_srcdir/CMakeLists.txt <<EOF
cmake_minimum_required (VERSION 3.11.0)
project(dummy)
# from https://github.com/scipopt/papilo/blob/master/CMakeLists.txt
find_package(TBB 2018 COMPONENTS tbb tbbmalloc REQUIRED)
EOF
AS_IF([cmake -S conftest_srcdir -B conftest_srcdir/build >& ]AS_MESSAGE_LOG_FD[ 2>&1], [dnl
AC_MSG_RESULT([yes])
], [dnl
AC_MSG_RESULT([no])
AS_VAR_SET([sage_spkg_install_onetbb], [yes])
])
])
6 changes: 6 additions & 0 deletions build/pkgs/onetbb/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd src
mkdir build
cd build
sdh_cmake -DTBB_STRICT=off ..
sdh_make
sdh_make_install
1 change: 1 addition & 0 deletions build/pkgs/onetbb/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
22 changes: 22 additions & 0 deletions build/pkgs/papilo/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
papilo: Parallel presolve for integer and linear optimization
=============================================================

Description
-----------

parallel presolve routines for (mixed integer) linear programming
problems. The routines are implemented using templates which allows
switching to higher precision or rational arithmetic using the boost
multiprecision package.


License
-------

LGPL 3.0


Upstream Contact
----------------

https://github.com/scipopt/papilo/
5 changes: 5 additions & 0 deletions build/pkgs/papilo/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tarball=papilo-VERSION.tar.gz
sha1=85d599ac9936aa1ddf687e04273b995522909de5
md5=c41f5aa615ffc9914f8ca924947aa8cb
cksum=1535425476
upstream_url=https://github.com/scipopt/papilo/archive/refs/tags/vVERSION.tar.gz
1 change: 1 addition & 0 deletions build/pkgs/papilo/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(MP_LIBRARY) boost_cropped onetbb $(BLAS) gfortran | cmake
1 change: 1 addition & 0 deletions build/pkgs/papilo/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 1fc5aecb4eca500917407b008c8c8eb8637a9c27 Mon Sep 17 00:00:00 2001
From: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
Date: Sat, 19 Nov 2022 19:03:37 -0800
Subject: [PATCH] CMakeLists.txt: Do not require boost program_options for the
library

---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7256877..db905aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

-find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS program_options REQUIRED)
+find_package(Boost ${BOOST_MIN_VERSION} REQUIRED)

if(GMP)
find_package(GMP)
--
2.37.3

20 changes: 20 additions & 0 deletions build/pkgs/papilo/patches/import_memory_multiprecision.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
commit 855bd67a64c5c044080d790e5c9fb7e298a61ab7
Author: Matthias Koeppe <mkoeppe@math.ucdavis.edu>
Date: Thu Dec 8 18:10:29 2022 -0800

src/papilo/misc/MultiPrecision.hpp: Add #include <memory>

diff --git a/src/papilo/misc/MultiPrecision.hpp b/src/papilo/misc/MultiPrecision.hpp
index 669014c..44d3e63 100644
--- a/src/papilo/misc/MultiPrecision.hpp
+++ b/src/papilo/misc/MultiPrecision.hpp
@@ -26,6 +26,9 @@

#include "papilo/Config.hpp"

+// work around build failure with boost on Fedora 37
+#include <memory>
+
#include <boost/serialization/split_free.hpp>

#ifdef PAPILO_HAVE_FLOAT128
8 changes: 8 additions & 0 deletions build/pkgs/papilo/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cd src
mkdir build
cd build
sdh_cmake -DPAPILO_NO_BINARIES=1 \
-DBOOST_ROOT="$SAGE_LOCAL" \
..
sdh_make
sdh_make_install
1 change: 1 addition & 0 deletions build/pkgs/papilo/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional

0 comments on commit f84915f

Please sign in to comment.