Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Invalid Gurobi license" on HPC using machine-file option. #325

Closed
zxjroger opened this issue May 19, 2020 · 6 comments
Closed

Error "Invalid Gurobi license" on HPC using machine-file option. #325

zxjroger opened this issue May 19, 2020 · 6 comments

Comments

@zxjroger
Copy link

My Julia script calculates some linear programming problem using JuMP+Gurobi in parallel on HPC. When I start submit the slurm job using machine-file, I got the following error:

ERROR: LoadError: On worker 2:
Invalid Gurobi license
error at ./error.jl:33
Env at /home/xz49/.julia/packages/Gurobi/GeYlA/src/grb_env.jl:19
top-level scope at none:0
eval at ./boot.jl:331
#101 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:290
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:79
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:88
#94 at ./task.jl:358

...and 19 more exception(s).

Here, I use machine-file so that it will parallel on 2 nodes and 10 CPUs per node. When I do not use machine-file and instead use julia -p 20, i.e., parallel on 20 CPUs on the same node, there is no error.

@odow
Copy link
Member

odow commented May 19, 2020

This seems like a question for Gurobi support. What license do you have? It probably doesn't support running over multiple nodes.

@zxjroger
Copy link
Author

I am using the Gurobi installed on my university's HPC. I guess there shouldn't be a problem with Gurobi support. I tried to use ClusterManager to parallel on multiple nodes, and it works.

@odow
Copy link
Member

odow commented May 20, 2020

Glad you got it sorted.

@zxjroger
Copy link
Author

zxjroger commented May 21, 2020

For some reason, I still want to adopt the machine-file approach instead of ClusterManager to parallel on multiple nodes. I asked IT support, they told me "I'm not all that familiar with Julia and Gurobi but my guess is that the GRB_LICENSE_FILE environment variable is not being exported to the worker processes." It's weird that if I parallel across nodes using ClusterManager, it works fine. But it does not work for machine-file.

@odow
Copy link
Member

odow commented May 21, 2020

Check if the environment variable is being set in your Julia code? This isn't a Gurobi.jl issue. Broader questions like how to use machine_file are best asked on Discourse: https://discourse.julialang.org

@zxjroger
Copy link
Author

Ok, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants