Using CPLEX
Here are the steps to compile and run CPLEX 10.0 and 10.1 jobs at the CAC.
- Login to the login-node (e.g. nyx-login)
- Use the Unix command :
ormodule load cplex
(this sets up your CPLEX environment for compiling.)module load cplex/version
- Compile your code.
- Compiling 64-bit CPLEX
-
gcc -fPIC -I${CPLEXHOME}/include -o executable source.c -L${CPLEXHOME}/lib64 -lcplex -lm -lpthread
- Compiling 32-bit CPLEX
-
gcc -m32 -fPIC -I${CPLEXHOME}/include -o executable source.c -L${CPLEXHOME}/lib -lcplex -lm -lpthread
- Compiling 64-bit Concert/CPLEX
-
g++ -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I${CPLEXHOME}/include source.cpp -o executable -L${CPLEXHOME}/lib64 -lilocplex -lcplex -lconcert -lm -lpthread
- Compiling 32-bit Concert/CPLEX
-
g++ -m32 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I${CPLEXHOME}/include source.cpp -o executable -L${CPLEXHOME}/lib -lilocplex -lcplex -lconcert -lm -lpthread
- Create a PBS script . Here is an example PBS script to run
the imaginary CPLEX binary "lpex6" (located in your
imaginary "pbs/cplex" dir ):
You should replace the things in bold with values appropriate for you.#!/bin/csh
#PBS -N cplex-test
#PBS -l nodes=1,mem=1gb,walltime=1:00:00
#PBS -q route
#PBS -M uniqname@umich.edu
#PBS -m abe
#PBS -V
cd /home/uniqname/pbs/cplex
./lpex6 >&lpex6.out - Submit PBS script using "qsub" (
qsub mycplex.pbs
)



