Running SUMO on UGent HPC

From SUMOwiki
Jump to navigationJump to search

Introduction

This page provides instructions on how to use the HPC infracture of Ghent university. For more information about the HPC infracture itself please visit their website. To learn how to run Matlab in general on the 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. 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 e.g.:
        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
  • 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