Installation (IbexOpt)

Note

Read how to install Ibex before installing this plugin.

The IbexOpt plugin relies on a LP solver that can either be Cplex, Soplex 1.7.x or CLP.

Because of licence compatibility, the LP solver installed by default is CLP. However, the installation process with CLP is still unstable and fails on some platforms. Installation with Cplex is also experimental.

Only the installation with Soplex is currently stable so, if possible, we recommend to use Soplex.

Linux and MacOS

Fast install (experimental)

Uncompress the archive ibex-2.3.0.tar.gz in some Ibex folder:

~/Ibex/$ tar xvfz ibex-2.3.0.tar.gz

Uncompress the archive ibex-optim.tar.gz in the plugin folder:

~/Ibex/$ tar xvfz ibex-optim.tar.gz --directory=ibex-2.3.0/plugins

Add the following option to waf configure:

~/Ibex/ibex-2.3.0/$ ./waf configure [...] --with-optim

And then:

~/Ibex/ibex-2.3.0/$ sudo ./waf install

Note

The “fast” install automatically extracts and install CLP from the bundle. However, the compilation of CLP is not working on all platforms. If it fails, try to install the ubuntu package for CLP or try the procedure below with Soplex. The Linear Solver CLP from the project COIN-OR can be install from an official ubuntu package:

~$ sudo apt-get install -y coinor-libclp-dev

Standard install (stable)

Warning

The current release of Ibex is not compatible with Soplex 2.0.

  • Compile Soplex:

    ~$ cd soplex-1.7.x
    ~/soplex-1.7.x$ make ZLIB=false
    

    Note

    If Ibex is installed as a dynamic library (--enable-shared), Soplex must also be installed as a dynamic library. For this, add the option SHARED=true to the previous command.

  • Uncompress the archive ibex-2.3.0.tar.gz in some Ibex folder:

    ~/Ibex/$ tar xvfz ibex-2.3.0.tar.gz
    
  • Uncompress the archive ibex-optim.tar.gz in the plugin folder:

    ~/Ibex/$ tar xvfz ibex-optim.tar.gz --directory=ibex-2.3.0/plugins
    
  • Configure Ibex with the following option:

    ~/Ibex/ibex-2.3.0/$ ./waf configure [...] --with-optim --with-soplex=[soplex-path]
    

    where [soplex-path] is the absolute path where soplex is installed (don’t use a relative path like --with-soplex=../soplex-1.7.x).

  • Compile Ibex:

    ~/Ibex/ibex-2.3.0/$ sudo ./waf install
    

Compiling and running programs

To compile and run the default optimizer:

~/Ibex/ibex-2.3.0/$ cd plugins/optim/examples
~/Ibex/ibex-2.3.0/plugins/optim/$ export PKG_CONFIG_PATH=[ibex-path]/share/pkgconfig
~/Ibex/ibex-2.3.0/plugins/optim/$ make defaultsolver
~/Ibex/ibex-2.3.0/plugins/optim/$ ./defaultsolver ../benchs/cyclohexan3D.bch 1e-05 10

The PKG_CONFIG_PATH variable is only necessary if you have installed Ibex with --prefix.

The default solver solves the systems of equations in argument (cyclohexan3D) with a precision less than 1e-05 and within a time limit of 10 seconds.

Note

If Ibex is compiled as a dynamic library (with --enabled-shared) set the LD_LIBRARY_PATH accordingly:

~/Ibex/ibex-2.3.0/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/

Windows

We assume that C:\MinGW\msys\1.0\home\[user]\Ibex this folder is the root folder of ibex (cf. instructions for installing the core library).
  • Download Soplex 1.7.x and save the archive in C:\MinGW\msys\1.0\home\[user]\Ibex.

Warning

The current release of Ibex is not compatible with Soplex 2.0.

  • Uncompress and compile Soplex in C:\MinGW\msys\1.0\home\[user]\Ibex (still in the shell of MinGW):

    ~$ cd Ibex
    ~/Ibex$ tar xvfz soplex-1.7.x.tgz
    ~/Ibex$ cd soplex-1.7.x
    ~/Ibex/soplex-1.7.x$ make ZLIB=false
    ~/Ibex/soplex-1.7.x$ cd ..
    

    Note

    If Ibex is installed as a dynamic library (--enable-shared), Soplex must also be installed as a dynamic library. For this, add the options SHARED=true SHAREDLIBEXT=dll to the previous command.

  • Uncompress the archive ibex-optim.tar.gz in the plugin folder:

    ~/Ibex/$ tar xvfz ibex-optim.tar.gz --directory=ibex-2.3.0/plugins
    
  • Configure Ibex with the following options:

    ~/Ibex/ibex-2.3.0/$ ./waf configure --prefix=C:\\MinGW\\msys\\1.0\\home\\[user]\\Ibex\\ibex-2.3.0 --with-optim --with-soplex=C:\\MinGW\\msys\\1.0\\home\\[user]\\Ibex\\soplex-1.7.x
    

    Note: Remember that the paths must be entered in Windows-style and with double backslash (“\”) as separator.

    Note: if you have any trouble to install a linear solver (Clp, Soplex or Cplex), you can install Ibex without linear solver by added the option --without-lp:

    ~/Ibex/ibex-2.3.0/$ ./waf configure --without-lp --prefix=C:\\MinGW\\msys\\1.0\\home\\[user]\\Ibex\\ibex-2.3.0
    
  • Install Ibex:

    ~/Ibex/ibex-2.3.0/$ ./waf install
    

Compiling and running examples

To compile the default optimizer, use the following instructions:

~/Ibex/ibex-2.3.0/$ cd plugins/optim/examples
~/Ibex/ibex-2.3.0/plugins/optim/examples$ export IBEX_PATH=C:/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.3.0
~/Ibex/ibex-2.3.0/plugins/optim/examples$ export SOPLEX_PATH=C:/MinGW/msys/1.0/home/[user]/Ibex/soplex-1.7.x
~/Ibex/ibex-2.3.0/plugins/optim/examples$ g++ -I$IBEX_PATH/include -I$IBEX_PATH/include/ibex -I$SOPLEX_PATH/src -L$SOPLEX_PATH/lib -L$IBEX_PATH/lib  -o defaultoptimizer defaultoptimizer.cpp -libex -lsoplex -lprim

You can run now the default optimizer on an example:

~/Ibex/ibex-2.3.0/plugins/optim/examples$ ./defaultoptimizer ../../../benchs/ex3_1_3bis.bch 0.0001 0.001 100

Note

If you have compiled Ibex with --enable--shared you can run the program from a command window. Just update the path to dynamically link against Ibex and Soplex:

> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.3.0
> set SOPLEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\soplex-1.7.x
> set PATH=%PATH%;%IBEX_PATH%\lib;%SOPLEX_PATH%\lib;C:\MinGW\bin
> cd %IBEX_PATH%\plugins\optim\examples
> defaultoptimizer.exe ../../../benchs/ex3_1_3bis.bch 0.0001 0.001 100

Configuration options

The IbexOpt plugin supports the following options (to be used with waf configure)

--with-optim Activate the IbexOpt plugin.
--with-soplex=SOPLEX_PATH
 

Look for Soplex at the given path instead of the parent directory.

Warning: The current release of Ibex is not compatible with Soplex 2.0.

--with-cplex=CPLEX_PATH
 Link Ibex with Cplex (instead of Soplex). Cplex is searched at the given path.
--without-lp

Compile Ibex without Linear Solver

You can use this option if you have some trouble to install Clp, Cplex or Soplex.

This option will disable the contractor CtcPolytopeHull.

Troubleshooting

Trouble to install a LP Solver

If you have any trouble to install a LP solver (CLP, Soplex or Cplex), you can install Ibex with the option --without-lp.

This option will disable the contractor CtcPolytopeHull.:

~/Ibex/ibex-2.3.0/$ ./waf configure  [...] --without-lp
~/Ibex/ibex-2.3.0/$ ./waf install

Linking problem with CoinOR

If the linker fails with undefined reference to dgetrf and dgetrs, it is probably because you have installed Lapack. You can either:

  • try to adapt the makefile to link with Lapack.
  • Remove Lapack, reinstall Ibex and reinstall Lapack (in this order).