Symlink trouble Gurobi and CPLEX

Hello,

I failed to link a commercial solver to ilastik following the installation guideline on the webpage.

I am on a MacOs 10.14.2 and use ilastik 1.3.2rc2-OSX. I installed&licenced both CPLEX and Gurobi and they seem to work independently of ilastik.
I installed Xcode and it seems to work:

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/

$ xcode-select --install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates

I located to the script location

$ cd Applications/ilastik-1.3.2rc2-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/scripts/

$ ls
pycache create-dev-env.bat install-cplex-shared-libs.sh
check-license.py create-dev-env.sh install-gurobi-symlinks.sh

But CPLEX cannot be installed

$ bash install-cplex-shared-libs.sh /Applications/CPLEX_Studio128/ /Applications/ilastik-1.3.2rc2-OSX.app

clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]

ld: library not found for -lstdc++

clang: error: linker command failed with exit code 1 (use -v to see invocation)

clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]

ld: library not found for -lstdc++

clang: error: linker command failed with exit code 1 (use -v to see invocation)

clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]

ld: library not found for -lcplex

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Done installing the CPLEX libraries into ilastik.

Neither I could link GRUOBI:
# the Gurobi location is here:

$ pwd

/Applications/Gurobi810.app/Contents/MacOS

# I try to run the script:

$ bash install-gurobi-symlinks.sh /Applications/Gurobi810.app/ /Applications/ilastik-1.3.2rc2-OSX.app

Error: /Applications/Gurobi810.app/ does not appear to be the Gurobi installation directory.

# Neither inside:

Error: /Applications/Gurobi810.app/Contents/MacOS/ does not appear to be the Gurobi installation directory.

I would really appreciate any help since the tracking without learning produces disappointing results…

Thanks a lot
Tina

Hi @tinaw,

thank you for bringing up these issues. For the cplex problem I can say that we are aware of it and will investigate it soon.

For gurobi the actual files are located at a different location:it should be something like /Library/gurobi810/mac64 for you.

One last question: What are you planning to use ilastik for? Most of the workflows work without the commercial solvers. In fact, the only part that requires one is learning the tracking parameters in tracking with learning.

Hi @k-dominik and thanks for your answer!

Indeed the path is via the library but it seems the needed files are not available/ labeled differently in the new Gurobi release 810 compared to the old 702!

$ bash install-gurobi-symlinks.sh /Library/gurobi810/mac64 /Applications/ilastik-1.3.2rc2-OSX.app

ls: /Library/gurobi810/mac64/lib/*.so: No such file or directory

Done installing the Gurobi library symlinks into ilastik.

the content of this lib folder is as follows:

$ ls gurobi810/mac64/lib/
gurobi-javadoc.jar libgurobi_c++.a
gurobi.jar libgurobi_g++4.2.a
gurobi.py libgurobi_stdc++.a
gurobi81.netstandard20.dll python2.7
gurobi81.netstandard20.xml python3.5
gurobipy python3.6
libGurobiJni81.jnilib python3.7
libgurobi81.dylib rootcert.pem
libgurobi81_light.dylib

So I downloaded the old Gurobi version 702 and successfully linked the libraries:

bash install-gurobi-symlinks.sh /Library/gurobi702/mac64 /Applications/ilastik-1.3.2rc2-OSX.app

Installing link to: /Library/gurobi702/mac64/lib/libaes70.so

Installing link to: /Library/gurobi702/mac64/lib/libgurobi70.so

Done installing the Gurobi library symlinks into ilastik.

The licence key I stored at the "standard"location which is my home directory.

–> License key saved to file ‘/Users/tina/gurobi.lic’.

I anyhow exported the key and run Ilastik like this:

set-up environment

export GRB_LICENSE_FILE=/Users/tina/gurobi.lic

run ilastik

cd …/…/Applications/ilastik-1.3.2rc2-OSX.app/Contents/MacOS
./ilastik

However the “learn tracking weights” in Ilastik is still disabled…
Any ideas?

To answer your last question: I am segmenting and tracking intracellular protein clusters that emerge and fuse over time and the automated tracking workflow is mostly doing fine but has some limitations which I hope to overcome by teaching some manual annotations where it fails…

Hope to solve the issues soon.
Would be useful if the installation webpage of Ilastik could be updated for the Mac version and stating which commercial solvers including the versions are currently working!

Cheers
Tina

Hi @tinaw again,

sorry for all the trouble this is causing - and mostly because of poor documentation on our side. So I checked and you need to download/install the 801 version of gurobi. Run the linking script again an it should work.

you can check the log (located in your homefolder ilastik_log.txt) after starting ilastik and then you should find a message as the following:

INFO 2019-01-31 14:42:07,677 structuredTrackingWorkflow 27963 4345271744 GUROBI found!

totally agree!

Thanks for the fast answer - it works now:

INFO 2019-01-31 16:25:55,412 structuredTrackingWorkflow 4453 4430353856 GUROBI found!

:grinning:

For the record here my actions:

  1. download gurobi 801

  2. get licence key from academic website
    https://user.gurobi.com/download/licenses/academic/

  3. activate licence as follows:

$ cd /Library/gurobi801/mac64/bin/

$ ./grbgetkey d47code

  1. Linking gurobi to ilastik:

$ cd Applications/ilastik-1.3.2rc2-OSX.app/Contents/ilastik-release/ilastik-meta/ilastik/scripts

$ bash install-gurobi-symlinks.sh /Library/gurobi801/mac64 /Applications/ilastik-1.3.2rc2-OSX.app

1 Like