Difference between revisions of "Running SUMO on UGent HPC"

From SUMOwiki
Jump to navigationJump to search
Line 5: Line 5:
  
 
== Compiling a standalone copy of the SUMO Toolbox for use on the HPC ==
 
== 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>.
 +
 +
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
 
* Log on to the HPC
Line 13: Line 17:
 
         module load ant
 
         module load ant
 
         export _JAVA_OPTIONS="-Xmx1024M -Xms512M" (use this option in case you need more heap space)
 
         export _JAVA_OPTIONS="-Xmx1024M -Xms512M" (use this option in case you need more heap space)
* In the terminal, change directory to the SUMO root directory and type in "make" to compile the toolbox for use
 
 
* 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}
* Edit the Makefile and add the path to the example(s) you plan to run in the mcc line e.g.:
+
* 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
 
         ${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 into terminal make-csumo
 
* Compile the SUMO Toolbox for standalone use by into terminal make-csumo

Revision as of 17:06, 30 January 2012

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>.

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 into terminal make-csumo

Running an example on the HPC infracture

  • 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 like 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