IBM ILOG CPLEX Optimization Studio
The IBM ILOG CPLEX Optimization Studio suite contains a full IDE and tools to develop decision optimization models.
Availability
Cluster | Module/Version |
---|---|
BOSE | cplex-studio/22.1.1 |
BGSC | Not Available |
Note: You can simply use module load cplex-studio
to activate the most recently installed version of this software.
Environment Variables
The following environment variables are available to use in your scripts.
Variable | Purpose |
---|---|
$CPLEX_HOME | Points to installation location of the CPLEX files such as examples and header files. |
Executables
The following list are the most common executables one may use for running CPLEX-based optimizations.
Executable | Purpose |
---|---|
oplrun | Execute an OPL model from the command line |
oplide | Start up the visual IDE (use with Desktop Mode) |
Command Line
Interactive Mode
To see results of the oplrun
command in real time, you can use interactive mode to log into a compute node and run the commands manually.
sinteract # Start Interactive Mode
module load cplex-studio/22.1.1 # Load CPLEX Studio
oplrun X.mod X.dat # Run the OPL model
When you are done with running CPLEX, you can leave the compute node and end your session by typing:
exit
Batch Mode using Slurm
Below is an example of running the oplrun
command using Slurm, which is the preferred way to use the cluster if you don't need to stay connected to the cluster while the program runs.
#!/bin/bash
# -- SLURM SETTINGS -- #
# [..] other settings here [..]
# The following settings are for the overall request to Slurm
#SBATCH --ntasks-per-node=32 # How many CPU cores do you want to request
#SBATCH --nodes=1 # How many nodes do you want to request
# -- SCRIPT COMMANDS -- #
# Load the needed modules
module load cplex-studio/22.1.1 # Load CPLEX Studio
oplrun X.mod X.dat
Integrated Development Environment
CPLEX Studio comes with its own IDE, which allows you access to a variety of tools you can use as if it was a desktop program.
- Log into Open OnDemand - https://ondemand.hpc.uwec.edu
- Click "Desktop" on the dashboard, or by first clicking "Interactive Apps" in the top bar.
- Fill out your required resources to the best of your abilities. Unsure what to use?
- Wait for the job to start, then click "Launch Desktop"
- Start the terminal by clicking on the black square icon in the top bar, or by going to Applications --> System Tools --> MATE Terminal"
- Type:
module load cplex-studio/22.1.1
- Type:
oplide
Real Example
Has your research group used the IBM ILOG CPLEX Optimization Studio in a project? Contact the HPC Team and we'd be glad to feature your work.