Gurobi: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 76: Line 76:
This is an example job script for an optimization model written in the [https://www.gurobi.com/documentation/8.1/refman/lp_format.html LP format].
This is an example job script for an optimization model written in the [https://www.gurobi.com/documentation/8.1/refman/lp_format.html LP format].
{{File
{{File
   |name=script-coins.sh
   |name=script-lp_coins.sh
   |lang="sh"
   |lang="sh"
   |contents=
   |contents=
Line 101: Line 101:
This is an example jobscript for a model using [https://www.gurobi.com/documentation/8.1/refman/py_python_api_overview.html#sec:Python Gurobi-Python].
This is an example jobscript for a model using [https://www.gurobi.com/documentation/8.1/refman/py_python_api_overview.html#sec:Python Gurobi-Python].
{{File
{{File
   |name=gurobi-py_example.sh
   |name=script-py_facility.sh
   |lang="sh"
   |lang="sh"
   |contents=
   |contents=
#!/bin/bash
#!/bin/bash
#SBATCH --account=def-group  # some account
#SBATCH --account=def-group  # some account
#SBATCH --time=0-00:30        # time limit (D-HH:MM)
#SBATCH --time=0-00:30        # specify time limit (D-HH:MM)
#SBATCH --mem-per-cpu=1000    # memory per CPU (in MB)
#SBATCH --cpus-per-task=4    # specify number threads
#SBATCH --cpus-per-task=4    # number of CPUs (threads)
#SBATCH --mem=4G              # specify total memory
#SBATCH --nodes=1            # do not change


<!--T:83-->
<!--T:83-->
Line 117: Line 118:


<!--T:85-->
<!--T:85-->
# Create environment file in current directory to set the number of threads:
# Create environment file in current directory to set the number of threads
echo "Threads ${SLURM_CPUS_ON_NODE:-1}" > gurobi.env
echo "Threads ${SLURM_CPUS_ON_NODE:-1}" > gurobi.env


cc_staff
1,857

edits

Navigation menu