Run is an application that was written by Research Computing in order to simplify running jobs in the queue in order to eliminate the need to use shell-based submit scripts for most jobs. Several popular applications have already been integrated with this command and are being used in production on the cluster. This article aims to provide the information needed for you to integrate your own applications with Run in order to make life simple and avoid the unnecessary collection of submit scripts that often litter a user’s home directory.
Run is highly integrated with Modules — those things you load in your job script or your shell to give you access to applications, compilers, etc. So, in order to integrate your application, we’re going to go ahead and create a module file. Users can create their own module files and load them by making the following directory:
~/.modulefiles
and placing the module file in that location. You’ll want to name it something obvious or even create a namespace if you wish to create more modules. For instance:
~/.modulefiles
~/.modulefiles/apps
~/.modulefiles/mpi
~/.modulefiles/lib
Then you can create a module file, say “myprogram-1.1″ and place it in ~/.modulefiles/apps. Then you will load
apps/myprogram-1.1
to access the module.
In order to integrate your application with Run, you’ll need to create a module file that sets certain environment variables. In this case, we’ll provide a simple example:
# My module
module-whatis "adds myprogram to your environment"
set myprogram_ver 1.1
append-path PATH $env(HOME)/myprogram/$myprogram_ver
setenv PAR_MODE openmpi
setenv BATCH_MODE true
setenv EXEC "parallel_exec myprogram.exe"
module rm compilers mpi
module load compilers/intel/11.1.064 mpi/openmpi-1.4.2
The variables needed for integration with Run include PAR_MODE, BATCH_MODE, and EXEC. These provide important information on which parallel environments to use, whether the job should be a batch job (most should be), and what Run should do to actually execute your application. For parallel applications, we generally use “parallel_exec [binary]” for the EXEC line since it will include all of the necessary calls to mpirun, etc. to launch your parallel application. At the bottom of the module file, we generally remove any loaded MPI or Compiler modules and load only those that are necessary to execute your application. Since myprogram was compiled with Intel against OpenMPI 1.4.2, I’m loading those modules into the environment.
Once your module file is created, you will be able to launch your program with the run command like so:
[user@host ~]$ run -n 16 -t 1:00:00 myprogram-1.1
This will launch myprogram using 16 processors with a 1 hour time limit. Run is chock full of features, so you’ll want to review them by using
run --help
in order to figure out what they all do and how they can help you. We hope you’ll find this utility useful for making your job submissions easier.

