This is Lite Plone Theme
You are here: Home User guide Quick Start

Quick Start

Guide which covers procedures for applying for a new, or renewed account on COSMOS@DiRAC, logging in, and basic usage.

Applying for an Account on COSMOS@DiRAC

  1. Consult with your PI to determine if you are allowed to use their cpu-time allocation.
  2. Ask your PI for the DiRAC SAFE project code and project password: these will allow you to become a member of the project. For COSMOS Consortium and the COSMOS Pproject (project code dp002) users, see below.
  3. Reading Managing user accounts through the DiRAC SAFE; follow these instructions carefully
  4. Go to the DiRAC registration page to register as a DiRAC user (this "account" will be used to provide you your passwords to the actual computers, reset your password if necessary etc).
  5. Once you have the SAFE password, log in to SAFE and follow the remaining steps of the instructions: this will now apply for an actual account on one (or more) of the machines.
  6. Wait until you get your password and further instructions from SAFE and COSMOS Management.


Members of the COSMOS Consortium will also need to fill out the COSMOS Application form and send it to Prof. Paul Shellard (address in form) to request an account.

At the last step of the SAFE instructions, you are asked for the IP address range you will be connecting to COSMOS from. This will have to be an institutional address for security reasons. If connecting from within DAMTP, the IP range would normally be and does not need to be supplied. If you are applying for external access, IP addresses of your workstation(s) should be supplied; additional hosts can be added on request later by contacting cosmos-help.

Logging in

Once you have gained an account, you can log on to either cosmos2 or cosmic via SSH. To log on to cosmos2, use

$ ssh -X USERID'at'

and to log on to the others, replace "cosmos" with one of the other machine names. Note that from within the DAMTP (wired) network, it is sufficient to write:

$ ssh -X USERID'at'cosmos2

If you are running GUI applications over SSH using X then better performance maybe obtained from using the compression flag in SSH: -C

Compiling your Code

It is recommended you use Intel compilers wherever possible. That is: icc, ifort, icpc instead of gcc, gfortran, g++.

Recommended flags to create an efficient executable are:

CFLAGS = '-g -O3 -xHost -align -ansi-alias -mcmodel=medium -restrict'
FFLAGS = '-g -O3 -xHost -align -ansi-alias -mcmodel=medium -traceback'

For compiling pure OpenMP codes add -openmp to the compiler flags. The xHost flag will generate specific instructions for the machine architecture that you're compiling on. We have two different architectures here - Nahalem on COSMOS/UNIVERSE and Sandybridge on COSMOS2. To compile an executable with instruction sets valid on both machines replace xHost with:

-axAVX,SSE4.2 -msse4.2

For compiling MPI codes, don't use the compilers wrappers mpif90, mpicc, and mpicxx since these wrap around the GNU compilers, not the Intel ones. On COSMOS system we recommend you use SGI MPT, which is the vendor supplied implementation of MPI. This module is loaded automatically for all users. To compile, use the Intel compiler as you normally would, but in your make files add:

LDFLAGS += -lmpi

Or for C++:

LDFLAGS += -lmpi++ lmpi

- to link to the MPT libraries.

Running Jobs

Initially, interactive use is confined (transparently) on COSMOS or UNIVERSE to the first 12 CPUs, which are shared by all active users; there are special interactive queues designed to handle larger development/analysis jobs and also file management and code compilation on COSMOS2. See the page on file management and interactive sessions for more details of how to do this.

To submit a batch job, job submission scripts (jobscripts, for short) are used. Jobscripts contain the commands necessary request system resources and to start the job inside a simple file, called e.g. myjob.sub. Then, the job can be submitted for run, using this command:

$ msub myjob.sub

After submission the job status can be monitored via the command showq. Jobs can be killed before or during execution via the command canceljob.

Please see the page on submitting batch jobs for more details and sample job scripts.