Difference between revisions of "Running SUMO on UGent HPC"
Line 21: | Line 21: | ||
* Open the Makefile in the SUMO root directory and change MATLABDIR to ${SOFTROOTMATLAB} | * Open the Makefile in the SUMO root directory and change MATLABDIR to ${SOFTROOTMATLAB} | ||
MATLABDIR ?= ${SOFTROOTMATLAB} | MATLABDIR ?= ${SOFTROOTMATLAB} | ||
− | * In the terminal, change directory to the SUMO root directory and type in "make" to compile the toolbox for use | + | * In the terminal, change directory to the SUMO root directory and type in "make" to compile the toolbox for use (this will compile all the Java classes and other libraries needed by the SUMO Toolbox) |
+ | * Verify that this first compilation has worked by starting Matlab in the terminal and doing a test run (this will only work on the login node) | ||
* Edit the Makefile again and add the path to the example(s) you plan to run in the mcc line e.g.: | * Edit the Makefile again and add the path to the example(s) you plan to run in the mcc line e.g.: | ||
${MATLABDIR}/bin/mcc -m -v -a '''-pathToMyExample''' -a ./src/matlab/ -a ./configure.m -a ./startup.m -R '-nodesktop, -nosplash' -d './csumo' ./go.m | ${MATLABDIR}/bin/mcc -m -v -a '''-pathToMyExample''' -a ./src/matlab/ -a ./configure.m -a ./startup.m -R '-nodesktop, -nosplash' -d './csumo' ./go.m |
Revision as of 09:55, 7 February 2012
Introduction
This page provides instructions on how to use the HPC infracture of Ghent university only, although it might apply to other clusters as well. Make sure you have the latest nightly build version of the SUMO Toolbox which you can find here as these instructions are not supported by the SUMO Toolbox version 7.0.2. For more information about using the toolbox with distributed backends go here. Note though that many features of the toolbox are not yet tested :).
For more information about the UGent HPC infracture itself please visit their website. To learn how to run Matlab in general on the UGent HPC see this page.
Compiling a standalone copy of the SUMO Toolbox for use on the HPC
The SUMO Toolbox needs to be compiled because the worker nodes of the HPC cannot connect to license server and due to the limited number of Matlab licenses. By compiling the toolbox, you create a standalone program that does not need to connect to the license server. The compiled version of the toolbox will not have all functionality however and some functionalities such the GA algorithms and the matlab <SampleEvaluator> will not work. If you want to use m-files to evaluate your samples you need to use the matlabDirect <SampleEvaluator> instead of the matlab <SampleEvaluator>.
The process of compiling the toolbox is pretty straightforward. Copy the toolbox to your working directory on the server, then load the required modules for compilation. If the separate components of the toolbox still need to be compiled (such as the Java classes and some binary code for certain model types), do so using make. By default the examples directory is not included in the compiled version of the toolbox and you probably want to add your example to the mcc options. To make a standalone SUMO Toolbox version, type in make-csumo. The steps you need to follow are summarized below.
- Log on to the HPC
- Upload a copy of the toolbox if you haven't done so
- On the login node of the HPC, load the Matlab, ant and Java module using these commands (you may want to change the versions to suit your needs):
module load MATLAB/2011a-bis module load Java/1.6.0_26 module load ant export _JAVA_OPTIONS="-Xmx1024M -Xms512M" (use this option in case you need more heap space)
- Open the Makefile in the SUMO root directory and change MATLABDIR to ${SOFTROOTMATLAB}
MATLABDIR ?= ${SOFTROOTMATLAB}
- In the terminal, change directory to the SUMO root directory and type in "make" to compile the toolbox for use (this will compile all the Java classes and other libraries needed by the SUMO Toolbox)
- Verify that this first compilation has worked by starting Matlab in the terminal and doing a test run (this will only work on the login node)
- Edit the Makefile again and add the path to the example(s) you plan to run in the mcc line e.g.:
${MATLABDIR}/bin/mcc -m -v -a -pathToMyExample -a ./src/matlab/ -a ./configure.m -a ./startup.m -R '-nodesktop, -nosplash' -d './csumo' ./go.m
- Compile the SUMO Toolbox for standalone use by typing into terminal
make-csumo
Running an example on the HPC infracture
You can only run matlab code that was included in the mcc options. To run the standalone version of the toolbox, use the run_go.sh
bash script which takes two arguments the MCR root and your configuration file. Note: make sure you test your configuration file extensively both locally and on the debug queue of the HPC to avoid wasting your HPC resources as the infrastructure can be very busy at times.
- Log on to HPC and request for some worker nodes (see the HPC wiki for more information), for example this command will request the HPC for node in the debug queue:
qsub -I
- In the terminal, change directory to where the compiled SUMO Toolbox is located (by default this is SUMORoot/csumo)
- Set the MCRROOT environmental variable to point to the MCR root, e.g:
export MCRROOT=/apps/gent/gengar/harpertown/software/MATLAB/MCR_2011a/v715
- Run the a configuration xml-file using:
./run_go.sh $MCRROOT pathToYourConfig/yourConfig.xml