Skip to content

Commit

Permalink
Merge pull request easybuilders#19838 from boegel/20240212222145_new_…
Browse files Browse the repository at this point in the history
…pr_Gurobi1100

{math}[GCCcore/12.3.0] Gurobi v11.0.0
  • Loading branch information
Micket authored Feb 14, 2024
2 parents 7d8cc3d + b946855 commit 264fbbe
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
61 changes: 61 additions & 0 deletions easybuild/easyconfigs/g/Gurobi/Gurobi-11.0.0-GCCcore-12.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name = 'Gurobi'
version = '11.0.0'

homepage = 'https://www.gurobi.com'
description = """The Gurobi Optimizer is a state-of-the-art solver for mathematical programming.
The solvers in the Gurobi Optimizer were designed from the ground up to exploit modern
architectures and multi-core processors, using the most advanced implementations of the
latest algorithms."""

toolchain = {'name': 'GCCcore', 'version': '12.3.0'}

source_urls = ['https://packages.gurobi.com/%(version_major_minor)s/']
sources = ['gurobi%(version)s_linux64.tar.gz']
patches = ['Gurobi-11.0.0_use-eb-python-gurobi-shell.patch']
checksums = [
{'gurobi11.0.0_linux64.tar.gz': '6a1ec7499b230aea0542bc893bf0642ae8ce983dd5ef0c37cb3a253d827ce634'},
{'Gurobi-11.0.0_use-eb-python-gurobi-shell.patch':
'566473a3ba4e35b0e74595368f9f4133fc4a3c97cca84154c4b938645786e663'},
]

builddependencies = [
('binutils', '2.40'),
]

dependencies = [
('Python', '3.11.3'),
]

exts_defaultclass = 'PythonPackage'

exts_default_options = {
'source_urls': [PYPI_SOURCE],
'download_dep_fail': True,
'use_pip': True,
}

exts_list = [
('gurobipy', '11.0.0', {
'sources': ['gurobipy-%(version)s-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_%(arch)s.whl'],
'checksums': [{
'gurobipy-%(version)s-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_aarch64.whl':
'096f63ca02fbe810bae25311be598c9d8c5874362e85eac46ef0a4fdb3eaf96b',
'gurobipy-%(version)s-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl':
'a98abda1cb45f548fff17370eb30cc6e187d04edc5d9984a68d194491598a993',
}],
}),
]

# remove bundled Python interpreter in favour of the dependency in EB
postinstallcmds = ['rm %(installdir)s/bin/python*']

# license is mandatory for installation
# use EB_GUROBI_LICENSE_FILE environment variable, or
# uncomment and modify the following variable:
# license_file = '/path/to/my-license-file'

modloadmsg = """Gurobi shell based on Python %(pyver)s can be launched with command `gurobi.sh`
Gurobi Python Interface can be loaded in Python %(pyver)s with 'import gurobipy'
"""

moduleclass = 'math'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Use the Python environement from EB in the Guroby Python shell
author: Alex Domingo (Vrije Universiteit Brussel), ported to Gurobi 11.0.0 by Kenneth Hoste (HPC-UGent)
--- gurobi1100/linux64/bin/gurobi.sh.orig 2024-02-12 19:31:52.884375084 +0100
+++ gurobi1100/linux64/bin/gurobi.sh 2024-02-12 19:37:00.624272524 +0100
@@ -7,10 +7,6 @@
echo
fi

-PATH=$GUROBI_HOME/bin:$PATH;export PATH
-LD_LIBRARY_PATH=$GUROBI_HOME/lib:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH
-PYTHONHOME=$GUROBI_HOME;export PYTHONHOME
+PYTHONSTARTUP=$EBROOTGUROBI/lib/gurobi.py;export PYTHONSTARTUP

-PYTHONSTARTUP=$PYTHONHOME/lib/gurobi.py;export PYTHONSTARTUP
-
-$PYTHONHOME/bin/python3.11 "$@"
+$EBROOTPYTHON/bin/python "$@"

0 comments on commit 264fbbe

Please sign in to comment.