OSCER
Quick & Dirty Introduction to Compiling and Running on schooner


Compiling

Compiling MPI Programs

If you're not sure what an MPI program is, then skip down to the next section.

Before compiling an MPI program, you need to set two environment variables:

A quick discussion of how to set environment variables is below.

MPIENV
This environment variable indicates which compiler family to use.
OSCER supports multiple compiler families on schooner: Intel and GNU.
Possible values you can set MPIENV to are: MPIDEV
This environment variable indicates how to send MPI messages between processors. Possible values you can set MPIDEV to are:

How to set these environment variables depends on which shell program you are using. If you're not sure which shell program you're using (or if you're not sure what a "shell" program is), then type this at the Unix prompt and then press the "Enter" key:

ps

The response will look something like this:

  PID TTY          TIME CMD
28826 pts/19   00:00:00 tcsh
30567 pts/19   00:00:00 ps

If your shell is tcsh then to set the environment variables, type this at the Unix prompt:

setenv MPIENV intel
setenv MPIDEV ib

If your shell is bash or ksh or zsh, then to set the environment variables, type this at the Unix prompt:

export MPIENV=intel
export MPIDEV=ib

If your shell is "sh" then to set the environment variables, type this at the Unix prompt:

MPIENV=intel
MPIDEV=ib
export MPIENV
export MPIDEV

To Compile an MPI Program:

Now, to compile your MPI program, you need only use only of the following compiler names, as follows:

Compiling Non-MPI Programs

To compile a non-MPI program, you need simply to invoke the name of the compiler, with appropriate options. The compiler names are listed above, in the section on MPIENV.

Recommended Compiler Options

Each family of compilers has its own unique compiler options; you can find complete lists both in their man pages and in their full manuals.

So, the following are merely the recommended options for reasonably vanilla source codes.

Running

Except for very small, very brief non-MPI runs on 1 or 2 CPUs within a single node, all runs should be performed using the LSF batch queue system.

To start, you'll want to get a copy of one of the following files:

Once you've identified which file to use, do this:

cp  ~hneeman/example_1node.bsub  whatever.bsub

where whatever.bsub is the name of the batch script file that you want to create -- typically, you'll replace whatever with the name of your executable or the experiment or something.

You should be able to modify this file to suit your needs. It contains detailed information about how to set up and run a job.

IMPORTANT NOTE!!!
You MUST use the absolute FULL PATH for your executable! DON'T use a relative path nor leave out the path!

Running a Non-MPI Program

To run a non-MPI program, do as above with example_1node.bsub.


For help, please contact Henry Neeman.