#24662 closed enhancement (fixed)

Upgrade scipoptsuite to 5.0.1

Reported by: moritz Owned by:
Priority: major Milestone: sage-8.2
Component: packages: experimental Keywords: IMA-PolyGeom
Cc: mkoeppe, jipilab, vklein Merged in:
Authors: Moritz Firsching, Matthias Koeppe Reviewers: Matthias Koeppe, Moritz Firsching, François Bissey
Report Upstream: N/A Work issues:
Branch: 2f08be1 (Commits) Commit: 2f08be1b08a492f7e48aea11e3e122f138ad7a9a
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

Before working on #21003, it might be a good idea to get the current version of the scipoptsuite running. This ticket should be very similar to #22557.

Upstream archive: ​http://scip.zib.de/download.php?fname=scipoptsuite-5.0.1.tgz (DO NOT put on sage servers -- we cannot redistribute this archive)

Attachments (1)

scipoptsuitelog.txt (812.6 KB) - added by moritz 14 months ago.

Download all attachments as: .zip

Change History (78)

comment:1 Changed 16 months ago by moritz

  • Branch set to u/moritz/scipoptsuite-5.0.0

comment:2 Changed 16 months ago by moritz

  • Commit set to 8f40f88bf0d864e97859bfa259d1f5318f3940bb

There is some more work to be done. First it doesn't find the patches (some of which might need to be modified, and then SoPlex? is not found)

OK, installing scipoptsuite-5.0.0 now...
[scipoptsuite-5.0.0] Using cached file /home/moritz/sage/upstream/scipoptsuite-5.0.0.tgz
[scipoptsuite-5.0.0] scipoptsuite-5.0.0
[scipoptsuite-5.0.0] ====================================================
[scipoptsuite-5.0.0] Setting up build directory for scipoptsuite-5.0.0
[scipoptsuite-5.0.0] Finished extraction
[scipoptsuite-5.0.0] No patch files found in ../patches
[scipoptsuite-5.0.0] ****************************************************
[scipoptsuite-5.0.0] Host system:
[scipoptsuite-5.0.0] Linux knoe 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64 GNU/Linux
[scipoptsuite-5.0.0] ****************************************************
[scipoptsuite-5.0.0] C compiler: gcc
[scipoptsuite-5.0.0] C compiler version:
[scipoptsuite-5.0.0] Using built-in specs.
[scipoptsuite-5.0.0] COLLECT_GCC=/usr/bin/gcc
[scipoptsuite-5.0.0] COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
[scipoptsuite-5.0.0] OFFLOAD_TARGET_NAMES=nvptx-none
[scipoptsuite-5.0.0] OFFLOAD_TARGET_DEFAULT=1
[scipoptsuite-5.0.0] Target: x86_64-linux-gnu
[scipoptsuite-5.0.0] Configured with: ../src/configure -v --with-pkgversion='Debian 7.3.0-1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
[scipoptsuite-5.0.0] Thread model: posix
[scipoptsuite-5.0.0] gcc version 7.3.0 (Debian 7.3.0-1) 
[scipoptsuite-5.0.0] ****************************************************
[scipoptsuite-5.0.0] Could not find SoPlex tarball in the scipoptsuite tarball.  Something is wrong.

New commits:

8f40f88updating version name and hashes

comment:3 Changed 15 months ago by mkoeppe

  • Description modified (diff)
  • Summary changed from Upgrade scipoptsuite to 5.0.0 to Upgrade scipoptsuite to 5.0.1

comment:4 Changed 14 months ago by git

  • Commit changed from 8f40f88bf0d864e97859bfa259d1f5318f3940bb to 966aeb9b9b0c8cf24acff7cb2c095ea4d99140fd

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

c455ee7updating version name and hashes
e9b48fdupdate version name and hashes to 5.0.1
966aeb9compiling with cmake

comment:5 Changed 14 months ago by moritz

  • Branch changed from u/moritz/scipoptsuite-5.0.0 to public/scipoptsuite

comment:6 Changed 14 months ago by moritz

  • Commit changed from 966aeb9b9b0c8cf24acff7cb2c095ea4d99140fd to 057a2c76d2c656c29a4d175c3b3470f135e3ca37

I changed this to using cmake. So this expects, that the user has cmake installed, but on the other hand otherwise it won't by possible to install PySCIPOpt later, which is what is needed for #21003. The Makefile system is not compatible with PySCIPOpt, see https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/INSTALL.rst.

Here are the cmake-instructions for scip: http://scip.zib.de/doc/html/CMAKE.php


New commits:

057a2c7add dependency info

comment:7 Changed 14 months ago by jipilab

Does compile on debian stretch with cmake.

comment:8 Changed 14 months ago by jipilab

  • Cc jipilab added

comment:9 Changed 14 months ago by fbissey

Please add -DCMAKE_VERBOSE_MAKEFILE=ON to the cmake invocation so that building is verbose by default.

comment:10 Changed 14 months ago by mkoeppe

Please add the dependency on cmake to the dependencies file...

comment:11 Changed 14 months ago by git

  • Commit changed from 057a2c76d2c656c29a4d175c3b3470f135e3ca37 to f4a061e1d1d7eeda8fd3350113c91db1e5afccc9

Branch pushed to git repo; I updated commit sha1. New commits:

f4a061euse cmake sage package; make output verbose

comment:12 Changed 14 months ago by git

  • Commit changed from f4a061e1d1d7eeda8fd3350113c91db1e5afccc9 to b86cf018dc631115a32baa89963252ad26e36970

Branch pushed to git repo; I updated commit sha1. New commits:

b86cf01scipoptsuite: Add patch for using libhistory (needed for Mac OS X)

comment:13 Changed 14 months ago by git

  • Commit changed from b86cf018dc631115a32baa89963252ad26e36970 to e94b94e5b29ffea617dc24042036dcc213946c64

Branch pushed to git repo; I updated commit sha1. New commits:

e94b94eimproving the check

comment:14 Changed 14 months ago by git

  • Commit changed from e94b94e5b29ffea617dc24042036dcc213946c64 to f4ad1086c88cda190231e368531a246066b72f60

Branch pushed to git repo; I updated commit sha1. New commits:

f4ad108put readline as depency

comment:15 follow-up: Changed 14 months ago by mkoeppe

Is this ready for reviewing?

comment:16 in reply to: ↑ 15 Changed 14 months ago by moritz

Replying to mkoeppe:

Is this ready for reviewing?

yes!

comment:17 Changed 14 months ago by moritz

  • Status changed from new to needs_review

comment:18 follow-up: Changed 14 months ago by mkoeppe

The /usr/local business that I saw on my computer may have come in because the cmake scripts look too creatively for libgmp or other libraries. Let's see if it's possible to prescribe looking in SAGE_LOCAL to make it more robust.

comment:19 in reply to: ↑ 18 Changed 14 months ago by moritz

Replying to mkoeppe:

The /usr/local business that I saw on my computer may have come in because the cmake scripts look too creatively for libgmp or other libraries. Let's see if it's possible to prescribe looking in SAGE_LOCAL to make it more robust.

That would be great!

comment:20 Changed 14 months ago by git

  • Commit changed from f4ad1086c88cda190231e368531a246066b72f60 to d49ff9491a4be6e699571b16c6b03489b1830837

Branch pushed to git repo; I updated commit sha1. New commits:

8b20290scipoptsuite: Update patch to remove cmake warning
f25f900scipoptsuite: Set GMP_DIR so that we do not catch /usr/local/include
d49ff94scipoptsuite: Add patch: ZIMPL cmake scripts: Put ZIMPL includes first to avoid clash of idxset.h with install soplex idxset.h

comment:21 Changed 14 months ago by mkoeppe

Please try if this still works for you with my patches.

There are still unrelated problems on Mac OS X:

[scipoptsuite-5.0.1] -- Installing: /Users/mkoeppe/s/sage/some-sage-install-prefix/bin/scip
[scipoptsuite-5.0.1] error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: for: /Users/mkoeppe/s/sage/some-sage-install-prefix/bin/scip (for architecture x86_64) option "-add_rpath /Users/mkoeppe/s/sage/some-sage-install-prefix/lib" would duplicate path, file already has LC_RPATH for: /Users/mkoeppe/s/sage/some-sage-install-prefix/lib

$ otool -L /Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libscip.*
/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libscip.5.0.1.0.dylib:
	libscip.5.0.dylib (compatibility version 5.0.0, current version 5.0.1)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
	/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libhistory.6.dylib (compatibility version 6.0.0, current version 6.3.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libgmp.23.dylib (compatibility version 24.0.0, current version 24.3.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libgmpxx.8.dylib (compatibility version 13.0.0, current version 13.3.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libbliss.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.24.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

comment:22 follow-up: Changed 14 months ago by fbissey

On OS X it looks like using the rpath sets the install name so you have a complaint about doing something that's already been done. Could you run otool -L on the scip executable to see what's already there?

comment:23 Changed 14 months ago by moritz

It still works with the new patches on debian unstable.

Last edited 14 months ago by moritz (previous) (diff)

comment:24 in reply to: ↑ 22 Changed 14 months ago by mkoeppe

Replying to fbissey:

On OS X it looks like using the rpath sets the install name so you have a complaint about doing something that's already been done. Could you run otool -L on the scip executable to see what's already there?

Well, the scip executable is not even linked against the shared library libscip. But here you go:

$ otool -L /Users/mkoeppe/s/sage/some-sage-install-prefix/bin/scip 
/Users/mkoeppe/s/sage/some-sage-install-prefix/bin/scip:
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
	/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libhistory.6.dylib (compatibility version 6.0.0, current version 6.3.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libgmp.23.dylib (compatibility version 24.0.0, current version 24.3.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libgmpxx.8.dylib (compatibility version 13.0.0, current version 13.3.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libbliss.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.24.0)
	/Users/mkoeppe/s/sage/some-sage-install-prefix/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

comment:25 follow-up: Changed 14 months ago by fbissey

Well the complaint was never about libscip but about adding an rpath that was already set another way. I may have to look at the CMakeList.txt, something may be extra baggage in there.

comment:26 follow-up: Changed 14 months ago by moritz

@fbissey: can you install the package scipoptsuite using this ticket?

comment:27 in reply to: ↑ 25 Changed 14 months ago by mkoeppe

Replying to fbissey:

Well the complaint was never about libscip but about adding an rpath that was already set another way. I may have to look at the CMakeList.txt, something may be extra baggage in there.

I only showed you one of the errors, but there is also an identical one for the library.

comment:28 in reply to: ↑ 26 Changed 14 months ago by fbissey

Replying to moritz:

@fbissey: can you install the package scipoptsuite using this ticket?

Sorry, I haven't been testing the ticket, only providing technical input from my knowledge of OS X and cmake.

comment:29 follow-up: Changed 14 months ago by mkoeppe

#25109 upgrades cmake, perhaps this helps to fix these problems on Mac OS X.

comment:30 Changed 14 months ago by mkoeppe

  • Keywords IMA-PolyGeom added

comment:31 Changed 14 months ago by moritz

  • Authors set to Moritz Firsching

comment:32 Changed 14 months ago by jipilab

Installation works flawlessly on debian-stretch.

comment:33 Changed 14 months ago by vdelecroix

also fine on archlinux!

comment:34 Changed 14 months ago by vdelecroix

And I believe you want more dependencies like bliss and mpir/gmp.

comment:35 Changed 14 months ago by git

  • Commit changed from d49ff9491a4be6e699571b16c6b03489b1830837 to cc73f328f326e93dc4703c9bb53e402bd8ed5d6b

Branch pushed to git repo; I updated commit sha1. New commits:

3767ceatrac #25109: upgrade cmake to 3.11.0
519ffd9Merge branch 'u/vklein/upgrade_cmake_to_3_11_0' of git://trac.sagemath.org/sage into t/24662/public/scipoptsuite
cc73f32scipoptsuite: Fix install name for libscip on Mac

comment:36 Changed 14 months ago by git

  • Commit changed from cc73f328f326e93dc4703c9bb53e402bd8ed5d6b to d7e29d58ff8ae0631ecb8666bf3e9e260efdec1c

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d7e29d5scipoptsuite: Fix install name for libscip on Mac

comment:37 in reply to: ↑ 29 Changed 14 months ago by mkoeppe

Replying to mkoeppe:

#25109 upgrades cmake, perhaps this helps to fix these problems on Mac OS X.

I have put in a fix for the bad install name on Mac (but not the probably harmless warnings regarding the rpath). The upgrade of cmake is not necessary (I backed it out again).

comment:38 Changed 14 months ago by mkoeppe

  • Authors changed from Moritz Firsching to Moritz Firsching, Matthias Koeppe

comment:39 Changed 14 months ago by git

  • Commit changed from d7e29d58ff8ae0631ecb8666bf3e9e260efdec1c to 9be2119d7f61186fbe395f49404759145fe929f4

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

145a268add dependency info
43a7d02use cmake sage package; make output verbose
d944926scipoptsuite: Add patch for using libhistory (needed for Mac OS X)
d6138f0improving the check
7e1f0f5put readline as depency
72ccbecscipoptsuite: Update patch to remove cmake warning
1cc9570scipoptsuite: Set GMP_DIR so that we do not catch /usr/local/include
7139aa0scipoptsuite: Add patch: ZIMPL cmake scripts: Put ZIMPL includes first to avoid clash of idxset.h with install soplex idxset.h
fcda6a3scipoptsuite: Fix install name for libscip on Mac
9be2119add more dependencies: bliss, gmp, mpir

comment:40 Changed 14 months ago by moritz

  • Reviewers set to Moritz Firsching

I rebased and put the dependencies as suggested by Vincent.

Also, I reviewed the parts written by Matthias.

comment:41 Changed 14 months ago by mkoeppe

cmake should be an order-only dependency. See my commit 737e606 that I put by mistake only on the branch for #21003

comment:42 Changed 14 months ago by mkoeppe

  • Reviewers changed from Moritz Firsching to Matthias Koeppe, Moritz Firsching

comment:43 Changed 14 months ago by vdelecroix

For gmp/mpir you should use $(MP_LIBRARY) and not their names (that moreover do conflict: you can not install both gmp and mpir on a system).

comment:44 Changed 14 months ago by vdelecroix

  • Status changed from needs_review to needs_work

comment:45 Changed 14 months ago by git

  • Commit changed from 9be2119d7f61186fbe395f49404759145fe929f4 to e18fe9bd7d1382c24c3a97212182d907e43a82b2

Branch pushed to git repo; I updated commit sha1. New commits:

e18fe9bMake bliss and MP_LIBRARY dependencies, cmake order-only dependency

comment:46 Changed 14 months ago by moritz

  • Status changed from needs_work to needs_review

comment:47 Changed 14 months ago by moritz

  • Status changed from needs_review to needs_work

comment:48 follow-up: Changed 14 months ago by moritz

When I run the checks with ./sage -f scipoptsuite -c, it says:

44% tests passed, 23 tests failed out of 4.

I believe this is mainly due to the fact that IPOPT is not installed, but I am not sure.

comment:49 in reply to: ↑ 48 Changed 14 months ago by vdelecroix

Replying to moritz:

When I run the checks with ./sage -f scipoptsuite -c, it says:

44% tests passed, 23 tests failed out of 4.

I believe this is mainly due to the fact that IPOPT is not installed, but I am not sure.

Don't you have a full log? You should always run the testsuite with verbosity at maximum.

Changed 14 months ago by moritz

comment:50 Changed 14 months ago by moritz

I have a long full log.

comment:51 Changed 14 months ago by moritz

  • Status changed from needs_work to needs_review

I guess it is ok, at least scip is running. Perhaps we could do another automatic install of IPOPT in another ticket.

comment:52 Changed 14 months ago by fbissey

Looks fishy to me. We have segfault in free-ing pointers in several places. Some other fault may be due to something missing.

comment:53 Changed 14 months ago by moritz

  • Status changed from needs_review to needs_work

I will try to figure out what is going on and if the new dependencies are to blame.

comment:54 Changed 14 months ago by fbissey

We want to use zlib from sage rather than the system. Add -DZLIB_ROOT=$SAGE_LOCAL should do that trick. I am still investigating a few things.

comment:55 Changed 14 months ago by fbissey

1133/1133 Test #1133: applications-polyscip-tenfelde_podehl ............................................................   Passed    0.10 sec

100% tests passed, 0 tests failed out of 1133

this is a system install with pretty much the same stuff configured than you (optional: zlib, readline, gmp[real gmp not mpir] and bliss - no ipopt or criterion).

I note that I have more tests than you (???).

In your log, the zlib identified in the tests is the one from sage (1.2.11) while the one spotted at configuration time was the system one (1.2.8) - that certainly could spell trouble.

Running tests after install really hurts. In any case you shouldn't have to do anything special to use the installed version of scip unless the testsuite has been badly written. cmake know to have different runtime path for tests and install.

comment:56 Changed 14 months ago by fbissey

Your config.log also shows that bliss and readline from the system rather than sage have been detected by cmake. This needs fixing.

comment:57 follow-up: Changed 14 months ago by fbissey

For readline set -DReadline_ROOT_DIR=${SAGE_LOCAL}. For bliss try -DBLISS_DIR=${SAGE_ROOT}.

comment:58 Changed 14 months ago by fbissey

Not sure how you managed things, FindIPOPT.cmake doesn't fail gracefully in case of missing IPOPT. Is there another patch somewhere or is it cmake version dependent (3.9.6 here)? In my first test directly on the system I used ccmake and didn't pay much attention to that error that was easily overcome from the menu. I had to pass -DIPOPT=OFF for the configuration to succeed from plain cmake.

comment:59 in reply to: ↑ 57 Changed 14 months ago by fbissey

Replying to fbissey:

For readline set -DReadline_ROOT_DIR=${SAGE_LOCAL}. For bliss try -DBLISS_DIR=${SAGE_ROOT}.

Sorry SAGE_LOCAL not SAGE_ROOT!

comment:60 Changed 14 months ago by fbissey

So

(sage-sh) fbissey@moonloop:build$ cmake .. -DCMAKE_INSTALL_PREFIX="$SAGE_LOCAL"/ -DCMAKE_VERBOSE_MAKEFILE=ON -DGMP_DIR=${SAGE_LOCAL} -DZLIB_ROOT=${SAGE_LOCAL} -DReadline_ROOT_DIR=${SAGE_LOCAL} -DBLISS_DIR=${SAGE_LOCAL} -DIPOPT=OFF
-- The C compiler identification is Clang 5.0.1
-- The CXX compiler identification is Clang 5.0.1
-- Check for working C compiler: /usr/lib/llvm/5/bin/clang
-- Check for working C compiler: /usr/lib/llvm/5/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/llvm/5/bin/clang++
-- Check for working CXX compiler: /usr/lib/llvm/5/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BISON: /usr/bin/bison (found version "3.0.4") 
-- Found FLEX: /usr/bin/flex (found version "2.6.4") 
-- Found GMP: /home/fbissey/sandbox/git-fork/sage-clang5/local/include  
-- Build type: Release
-- Found ZLIB: /home/fbissey/sandbox/git-fork/sage-clang5/local/lib/libz.so (found version "1.2.11") 
-- Build shared libraries: ON
-- Build type: Release
-- LEGACY mode for old compilers: OFF
-- Found Readline: /home/fbissey/sandbox/git-fork/sage-clang5/local/include  
-- Found BLISS: /home/fbissey/sandbox/git-fork/sage-clang5/local/include  
-- Looking for FE_DOWNWARD
-- Looking for FE_DOWNWARD - found
-- Could NOT find CRITERION (missing: CRITERION_LIBRARY CRITERION_INCLUDE_DIR) 
-- The following OPTIONAL packages have been found:

 * ZLIB
 * Readline
 * GMP
 * BLISS

-- The following REQUIRED packages have been found:

 * BISON
 * FLEX
 * SOPLEX
 * SCIP

-- The following OPTIONAL packages have not been found:

 * Criterion

-- Configuring done
-- Generating done
-- Build files have been written to: /home/fbissey/sandbox/git-fork/sage-clang5/scipoptsuite-5.0.1/build
(sage-sh) fbissey@moonloop:build$ make -j8
...
(sage-sh) fbissey@moonloop:build$ make install
...
(sage-sh) fbissey@moonloop:build$ make -j8 test
...
1133/1133 Test #1133: applications-polyscip-tenfelde_podehl ............................................................   Passed    0.10 sec

100% tests passed, 0 tests failed out of 1133

Total Test time (real) = 512.79 sec

Note: with cmake, one does make test not make check (that's autotools). That probably explains why you had not not quite 500 tests and I have 1133. MAINFILE was not useful in any way. I believe a number of your error were mismatched between detected system libraries and sage libraries found by runpath. The IPOPT detection problem needs to be addressed.

comment:61 Changed 14 months ago by fbissey

This is bad. FindIPOPT.cmake never defines IPOPT_FOUND. scip/CMakeList.txt relies on it being not false to enable IPOPT.

if(IPOPT_FOUND)
    include_directories(${IPOPT_INCLUDE_DIRS})
    #on debian IPOPT package needs this definition to work
    add_definitions( -DHAVE_CSTDDEF )
    set(NLPI_LIBRARIES ${IPOPT_LIBRARIES})
    set(nlpi nlpi/nlpi_ipopt.cpp)
else()
    set(nlpi nlpi/nlpi_ipopt_dummy.c)
endif()

because IPOPT_FOUND is never set the behavior depends completely on camke implementation of unset variables. In its current state IPOPT detection is broken and can only work by luck or lack of it. This should be reported upstream.

Proposed patch

  • scip/cmake/Modules/FindIPOPT.cmake

    diff --git a/scip/cmake/Modules/FindIPOPT.cmake b/scip/cmake/Modules/FindIPOPT.cmake
    index 4d65120..00f4c34 100644
    a b  
    3535# (To distribute this file outside of YCM, substitute the full
    3636#  License text for the above reference.)
    3737
     38SET(IPOPT_FOUND FALSE)
    3839
    3940if(NOT WIN32)
    4041  # On non Windows systems we use PkgConfig to find IPOPT
    if(NOT WIN32) 
    6263                     PATHS ${_PC_IPOPT_LIBRARY_DIRS})
    6364        list(APPEND IPOPT_LIBRARIES ${${_LIBRARY}_PATH})
    6465      endforeach()
     66      set(IPOPT_FOUND TRUE)
    6567    else()
    6668      set(IPOPT_DEFINITIONS "")
    6769    endif()
    if(NOT WIN32) 
    114116          endif()
    115117          mark_as_advanced(IPOPT_SEARCH_FOR_${LIB})
    116118        endforeach()
     119        set(IPOPT_FOUND TRUE)
    117120      endif()
    118121    endif()
    119122
    else() 
    180183        endif()
    181184        mark_as_advanced(IPOPT_SEARCH_FOR_${LIB})
    182185      endforeach()
     186      set(IPOPT_FOUND TRUE)
    183187    endif()
    184188  endif()
    185189
    else() 
    188192endif()
    189193
    190194# parse the version number
    191 if(EXISTS ${IPOPT_INCLUDE_DIRS} )
    192   file(STRINGS ${IPOPT_INCLUDE_DIRS}/IpoptConfig.h CONFIGFILE)
    193 
    194   foreach(STR ${CONFIGFILE})
    195     if("${STR}" MATCHES "^#define IPOPT_VERSION ")
    196       string(REGEX REPLACE "#define IPOPT_VERSION " "" IPOPT_VERSION ${STR})
    197       string(REGEX REPLACE "\"" "" IPOPT_VERSION ${IPOPT_VERSION})
    198     endif()
    199   endforeach()
    200   # MESSAGE("found Ipopt ${IPOPT_VERSION}")
     195if(IPOPT_FOUND)
     196  if(EXISTS ${IPOPT_INCLUDE_DIRS} )
     197    file(STRINGS ${IPOPT_INCLUDE_DIRS}/IpoptConfig.h CONFIGFILE)
     198
     199    foreach(STR ${CONFIGFILE})
     200      if("${STR}" MATCHES "^#define IPOPT_VERSION ")
     201        string(REGEX REPLACE "#define IPOPT_VERSION " "" IPOPT_VERSION ${STR})
     202        string(REGEX REPLACE "\"" "" IPOPT_VERSION ${IPOPT_VERSION})
     203      endif()
     204    endforeach()
     205    # MESSAGE("found Ipopt ${IPOPT_VERSION}")
     206  endif()
    201207endif()
    202208
    203209mark_as_advanced(IPOPT_INCLUDE_DIRS

comment:62 Changed 13 months ago by vklein

  • Cc vklein added

comment:63 Changed 13 months ago by git

  • Commit changed from e18fe9bd7d1382c24c3a97212182d907e43a82b2 to 353fcc29c0943135192139dcedc5b1796d060bb3

Branch pushed to git repo; I updated commit sha1. New commits:

353fcc2changed to and added SAGE_LOCAL -D for zlib, readline and bliss

comment:64 Changed 13 months ago by moritz

This now works fine for me, with all 1133 tests passed!

However without IPOPT (I don't have it installed)

comment:65 Changed 13 months ago by moritz

If I have IPOPT installed if fails like this:

[scipoptsuite-5.0.1] gcc version 7.3.0 (Debian 7.3.0-16) 
[scipoptsuite-5.0.1] ****************************************************
[scipoptsuite-5.0.1] Building scipoptsuite with cmake
[scipoptsuite-5.0.1] -- The C compiler identification is GNU 7.3.0
[scipoptsuite-5.0.1] -- The CXX compiler identification is GNU 7.3.0
[scipoptsuite-5.0.1] -- Check for working C compiler: /home/moritz/sage/local/libexec/ccache/gcc
[scipoptsuite-5.0.1] -- Check for working C compiler: /home/moritz/sage/local/libexec/ccache/gcc -- works
[scipoptsuite-5.0.1] -- Detecting C compiler ABI info
[scipoptsuite-5.0.1] -- Detecting C compiler ABI info - done
[scipoptsuite-5.0.1] -- Detecting C compile features
[scipoptsuite-5.0.1] -- Detecting C compile features - done
[scipoptsuite-5.0.1] -- Check for working CXX compiler: /home/moritz/sage/local/libexec/ccache/g++
[scipoptsuite-5.0.1] -- Check for working CXX compiler: /home/moritz/sage/local/libexec/ccache/g++ -- works
[scipoptsuite-5.0.1] -- Detecting CXX compiler ABI info
[scipoptsuite-5.0.1] -- Detecting CXX compiler ABI info - done
[scipoptsuite-5.0.1] -- Detecting CXX compile features
[scipoptsuite-5.0.1] -- Detecting CXX compile features - done
[scipoptsuite-5.0.1] -- Found BISON: /usr/bin/bison (found version "3.0.4") 
[scipoptsuite-5.0.1] -- Found FLEX: /usr/bin/flex (found version "2.6.4") 
[scipoptsuite-5.0.1] -- Found GMP: /home/moritz/sage/local/include  
[scipoptsuite-5.0.1] -- Build type: Release
[scipoptsuite-5.0.1] -- Found ZLIB: /home/moritz/sage/local/lib/libz.so (found version "1.2.11") 
[scipoptsuite-5.0.1] -- Build shared libraries: ON
[scipoptsuite-5.0.1] -- Build type: Release
[scipoptsuite-5.0.1] -- LEGACY mode for old compilers: OFF
[scipoptsuite-5.0.1] -- Found Readline: /home/moritz/sage/local/include  
[scipoptsuite-5.0.1] -- Found BLISS: /home/moritz/sage/local/include  
[scipoptsuite-5.0.1] CMake Error at scip/cmake/Modules/FindIPOPT.cmake:191 (if):
[scipoptsuite-5.0.1]   if given arguments:
[scipoptsuite-5.0.1] 
[scipoptsuite-5.0.1]     "EXISTS" "/usr/local/include/coin" "/usr/local/include/coin/ThirdParty"
[scipoptsuite-5.0.1] 
[scipoptsuite-5.0.1]   Unknown arguments specified
[scipoptsuite-5.0.1] Call Stack (most recent call first):
[scipoptsuite-5.0.1]   scip/CMakeLists.txt:386 (find_package)

And this is also true with the patch suggested by fbissey (thanks for your efforts, by the way!) It works fine with the flag -DIPOPT=FALSE.

comment:66 Changed 13 months ago by git

  • Commit changed from 353fcc29c0943135192139dcedc5b1796d060bb3 to 8b9ce886e01fb6d4f17bf51568cea65cbb2fccd0

Branch pushed to git repo; I updated commit sha1. New commits:

8b9ce88ipopt cmake improvements

comment:67 Changed 13 months ago by fbissey

I did some test runs with ipopt installed or not after patching FindIPOPT.cmake. I tested no IPOPT, IPOTP-3.11.9 and 3.12.9. Detection worked as expected in all cases (no IPOTPT, version to low since 3.12.0 is minimum, and enabled with 3.12.9). But coinor packages can be messy so I am not sure all kinds of installs are properly supported. They may need hints like bliss, readline and zlib.

On a further note while it compiled all right with my install of IPOPT 3.12.9, numerous tests failed then. I am guessing my version was too high again.

Lastly the spkg-install on this branch is a bit messy we should standardise all the instances of SAGE_LOCAL in the cmake call to "${SAGE_LOCAL}" and not three different syntax.

comment:68 follow-up: Changed 13 months ago by moritz

Here is a suggestion: We simply pass -DIPOPT=FALSE and don't worry about including IPOPT. This can then be fixed as soon as a new scipoptsuite version comes out, where the detection of IPOPT with cmake is fixed.

comment:69 Changed 13 months ago by git

  • Commit changed from 8b9ce886e01fb6d4f17bf51568cea65cbb2fccd0 to 1a84ecccb9d9d6e0b114eda068a3683282cc8206

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

9206579getParam and setParam working
60b470fall methods implemented in backend; all doctests working
ccaae73one more patch
c0bc9d2pyscipopt: update to v1.4.3
04f33d1pyscipopt: update to v1.4.4
3816595scip-backend: added '# optional - pyscipopt'
563e0aaquicksum and modify doctests
59d8529remove all patches
8af6e7fchange 4 back to 9
1a84eccmake use of SAGE_LOCAL more consistent

comment:70 in reply to: ↑ 68 ; follow-up: Changed 13 months ago by fbissey

Replying to moritz:

Here is a suggestion: We simply pass -DIPOPT=FALSE and don't worry about including IPOPT. This can then be fixed as soon as a new scipoptsuite version comes out, where the detection of IPOPT with cmake is fixed.

I am fine with that. Your install in /usr/local cannot be processed properly by the current FindIPOPT.cmake. Something more sophisticated needs to be done. I have some ideas but that's getting involved.

comment:71 Changed 13 months ago by git

  • Commit changed from 1a84ecccb9d9d6e0b114eda068a3683282cc8206 to 2d6f547d63cece0f811705e7be53b7f9f621a515

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

2d6f547make use of SAGE_LOCAL more consistent

comment:72 Changed 13 months ago by moritz

I accidentally pushed changes from #21003 in between. Now it is back on the correct branch

comment:73 Changed 13 months ago by git

  • Commit changed from 2d6f547d63cece0f811705e7be53b7f9f621a515 to 2f08be1b08a492f7e48aea11e3e122f138ad7a9a

Branch pushed to git repo; I updated commit sha1. New commits:

2f08be1suppress checking for IPOPT

comment:74 in reply to: ↑ 70 Changed 13 months ago by moritz

Replying to fbissey:

Replying to moritz:

Here is a suggestion: We simply pass -DIPOPT=FALSE and don't worry about including IPOPT. This can then be fixed as soon as a new scipoptsuite version comes out, where the detection of IPOPT with cmake is fixed.

I am fine with that. Your install in /usr/local cannot be processed properly by the current FindIPOPT.cmake. Something more sophisticated needs to be done. I have some ideas but that's getting involved.

Ok, great! Thats what I did!


New commits:

2f08be1suppress checking for IPOPT

comment:75 Changed 13 months ago by moritz

  • Status changed from needs_work to needs_review

comment:76 Changed 13 months ago by fbissey

  • Reviewers changed from Matthias Koeppe, Moritz Firsching to Matthias Koeppe, Moritz Firsching, François Bissey
  • Status changed from needs_review to positive_review

I believe it is good to go.

comment:77 Changed 13 months ago by vbraun

  • Branch changed from public/scipoptsuite to 2f08be1b08a492f7e48aea11e3e122f138ad7a9a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.