Gurobi/Batch
From ScientificComputing
Depending on the interface that is used, job submission is slightly different. You can submit a job in batch mode with the following command:
Gurobi command line interface
sbatch [Slurm options] --wrap="gurobi_cl my_model_file.lp"
Python interface
sbatch [Slurm options] --wrap="python my_guroby_script.py"
Matlab interface
sbatch [Slurm options] --wrap="matlab -nodisplay -nojvm -singleCompThread -r my_gurobi_script"
R interface
sbatch [Slurm options] --wrap="R --vanilla --slave < my_gurobi_script.R > outputfile"
Here you need to replace [Slurm options] with Slurm parameters for the resource requirements of the job. Please find a documentation about the parameters of sbatch on the wiki page about the batch system.