Troubleshooting - nimwegenLab/moma GitHub Wiki

Table of contents

Introduction

This page explains errors that you may encounter during your usage of MoMA.

Gurobi errors

Gurobi license error

Description

When the MoMA version is expired you will get an error message like this

Gurobi version error

along with log-output like this:

Warning: Gurobi version mismatch between Java 8.1.0 and C library 8.1.1
gurobi.GRBException: License expired 2023-07-16 - license file '/home/micha//Documents/LicenseFiles/gurobi9.lic'
	at gurobi.GRBEnv.<init>(GRBEnv.java:47)
	at com.jug.intialization.SetupValidator.checkGurobiInstallation(SetupValidator.java:13)
	at com.jug.MoMA.main(MoMA.java:74)
	at com.jug.exploration.ExplorationTestHelpers.startMoma(ExplorationTestHelpers.java:69)
	at com.jug.feature.Feature__20230719_add_flag_to_disable_multithread.run_interactive(Feature__20230719_add_flag_to_disable_multithread.java:40)
	at com.jug.feature.Feature__20230719_add_flag_to_disable_multithread.main(Feature__20230719_add_flag_to_disable_multithread.java:27)

Solution

You need to update your Gurobi license file. See how to obtain a gurobi license for details.

Gurobi library version error

Description

When trying to execute MoMA 0.9.x (which depends on Gurobi version 8.1) from a script that sets the Gurobi path with Gurobi version 10, you will encounter:

Gurobi version error

with the following stack trace:

java.lang.UnsatisfiedLinkError: no GurobiJni81 in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
	at java.lang.Runtime.loadLibrary0(Runtime.java:843)
	at java.lang.System.loadLibrary(System.java:1136)
	at gurobi.GurobiJni.<clinit>(GurobiJni.java:261)
	at gurobi.GRBEnv.<init>(GRBEnv.java:43)
	at com.jug.intialization.SetupValidator.checkGurobiInstallation(SetupValidator.java:13)
	at com.jug.MoMA.main(MoMA.java:74)

Solution

The problem is caused by incorrect settings for the environment variables GUROBI_LIB_PATH and GUROBI_HOME, which need to be set correctly.

See Gurobi setup instructions how to set these variables correctly.

Furthermore, here are example script to launch MoMA on a local machine with the correct Gurobi environment variables settings (you will need to adapt them to your local setup as described in the Gurobi setup instructions):

Gurobi license error

Description

Gurobi 10 supports a the Web License Service (WLS). This allows Gurobi to run inside containers, such as Docker containers provided the host/container has internet access. Therefore MoMA switched to Gurobi 10 to enable containerization (>=v0.9.8 for the v0.9.x releases; >=v0.10.2 for the v0.10.x releases).

Gurobi 8 does not support WLS. If you accidentally start a MoMA version that uses Gurobi 8 with a WLS license, you will get the following error:

gurobi.GRBException: No HostID specified in license file - license file '/home/micha/Documents/LicenseFiles/gurobi_web_license.lic'
	at gurobi.GRBEnv.<init>(GRBEnv.java:47)
	at com.jug.intialization.SetupValidator.checkGurobiInstallation(SetupValidator.java:13)
	at com.jug.MoMA.main(MoMA.java:74)

Solution

Use a non-WLS license with MoMA versions that use Gurobi 8 (i.e. non-containerized versions of MoMA). Use the WLS only with the containerized versions of MoMA.

MMPreproc module cannot be found

Description

When trying to run the containerized preprocessing the following error is encountered:

Lmod has detected the following error: The following module(s) are unknown: "MMPreproc"

Please check the spelling or version number. Also try "module spider ..."
It is also possible your cache file is out-of-date; it may help to try:
$ module --ignore-cache load "MMPreproc"

Also make sure that all modulefiles written in TCL start with the string #%Module

./20230830__lis__process_positions.sh: line 38: mm_dispatch_preprocessing.sh: No such file or directory
./20230830__lis__process_positions.sh: line 39: mm_dispatch_preprocessing: command not found

Solution

This can be caused when the preprocessing script contains the following lines:

module purge 
module load MMPreproc

These lines are used in the preprocessing scripts, when using the non-containerized preprocessing versions. However, the module name of the containerized preprocessing was changed. Therefore this directive will purge the containerized preprocessing module, but not reload it.

The solution is to remove these lines from the preprocessing script, when using the containerized preprocessing module.

HostID mismatch

Description

You can get the following error:

gurobi.GRBException: HostID mismatch (licensed to 50df7412, hostid is c89b3cf8) - license file '/home/micha//Documents/LicenseFiles/gurobi9.lic'
	at gurobi.GRBEnv.<init>(GRBEnv.java:47)
	at com.jug.intialization.SetupValidator.checkGurobiInstallation(SetupValidator.java:13)
	at com.jug.MoMA.main(MoMA.java:74)
	at com.jug.exploration.ExplorationTestHelpers.startMoma(ExplorationTestHelpers.java:69)
	at com.jug.bugfix.Bugfix__20230807_fix_NullPointerException_in_ComponentForestDeserializer.run_export(Bugfix__20230807_fix_NullPointerException_in_ComponentForestDeserializer.java:56)
	at com.jug.bugfix.Bugfix__20230807_fix_NullPointerException_in_ComponentForestDeserializer.main(Bugfix__20230807_fix_NullPointerException_in_ComponentForestDeserializer.java:27)

Solution

This can occur when using a non-WLS, single-user Gurobi license, which is not expired. This license is bound to a specific machine through a HostID, which is stored inside the Gurobi license file.

The HostID will change, if Gurobi runs on a different machine or if you put the same machine on a different network (e.g. when working from home with the laptop home).

The license will then no longer be valid and you must request an additional license file for your new machine, or to work from home (see Gurobi setup instructions for details). Alternatively, you can use a WLS license, which is not bound to a specific machine or network (although I have not tested this personally).

⚠️ **GitHub.com Fallback** ⚠️