E io a lui: «S'esser puote, io vorrei che de lo smisurato Briareo esperienza avesser li occhi miei». (Dante, Canto XXXI v98)
| HARDWARE | SOFTWARE | ||||||||||||||||||||||||||||||||||
|
|
Before any login sessions can be initiated using ssh, a working SSH client (version 2) needs to be present in the local machine.
To initiate a ssh connection to a machine, type the following on the local workstation
Note that the <login-name> is only needed if the user name on remote machine differs from the user name on the workstation.
ssh <login-name>@briareo.sissa.it;
To change the password:
IMPORTANT:passwd
chage -l <USERNAME>
A basic default environment is already set up by means of system login
configuration files, this includes variables and paths for the
all the compilers and their MPICH implementation of the MPI standard, and
OpenPBS batch queuing system with the
MAUI scheduler.
Check your environment with the
env command. You should be careful modifying the
shell customization files (.cshrc .profile .login .bashrc), since
they could overwrite the default values altering the behaviour of the
compilers and of the batch queuing system.
Plase note that interactive login is only allowed on the master node. Computing nodes are accessed and use only using the PBS queue system.(See later)
There is another programming model (shared memory programming) that uses either a standard like OpenMP or explicit threaded implementation such as Pthreads.
With the state of the art operating systems, compilers and tools it should be better to use openMP on SMP based nodes with MPI across nodes in hybrid programming enviroment. However there is no sufficient evidence at this time to suggest that using OpenMp with MPI on cluster architecture would be of great benefit from the performance point of view.
| Vendor/Source | Compilers | Documentation |
|---|---|---|
| Intel | Fortran 77/90/95, C, C++ |
/usr/local/intel/compiler70/docs/[*] icc -help ifc -help icpc -help
/usr/local/intel/intel_fc_81/docs/[*] |
| Portland Group (PGI) | Fortran 77, Fortran 90, C, C++, HPF | http://www.pgroup.com/prodcdk.htm |
| GNU | Fortran 77, C, C++ | http://gcc.gnu.org/onlinedocs/ |
The following table show the name of the compilers:
| Vendor/Source | C compiler | C++ compiler | F77 compiler | F90/95 compiler |
| GNU | gcc | g++ | g77 | N/A |
| Portland Group(3.2.4) | pgcc | pgCC | pgf77 | pgf90 |
| Intel v7.1 | icc | icc | ifc | ifc |
| Intel v8.1 [*] | N/A | N/A | ifort | ifort |
source /usr/local/intel/intel_fc_81/bin/ifortvars.csh (tcsh users) source /usr/local/intel/intel_fc_81/bin/ifortvars.sh (bash users)
| C | icc|gcc|pgcc -o prog [options] prog.cc [linker options] |
| Fortran | ifc|g77|pgf90 -o prog [options] prog.f90 [linker options] |
Since the cluster nodes are two-way, each of the nodes can technically also act like Symmetric MultiProcessors using the Shared Memory Programming (SMP) paradigm. However because of the limited number of processors in each node, significant performance benefit using the node as an SMP over a node in message-passing model in a distributed memory computer with two processors, is not likely hence use of it in this manner is not recommended at this time. However users can always use the SMP model for program development or port an existing application using OpenMP and use the IA32 node in that manner. It is then straightforward to do so, by just adding appropriate compiler options to the chosen compiler ( Both Intel and PGi compiler support OpenMP standard)
| Suite | MPI C compiler | MPI C++ compiler | MPI F77 compiler | MPI F90/95 compiler |
| GNU | mpi_gcc | mpi_gcc | mpi_g77 | N/A |
| Portland Group(3.2.4) | mpi_pgcc | mpi_pgCC | mpi_pgf77 | mpi_pgf90 |
| Intel | mpi_icc | mpi_icc | mpi_ifc/mpi_ifort | mpi_ifc/mpi_ifort |
Suppose for instance you want to run your a test.x interactively on four processors then you could use the following sequence of commands:
qsub -l nodes=2:ppn=2,walltime=0:30:00 -I
at this point (if there are free resources) you will enter in the
batch interactive session, and you could run your test with:
cd testdir
mpiexec -n 4 -no-shmem test.x
Note that each node has two
processors, hence to run on 2N processors you have to ask only N
nodes. Remember that when you are in the batch environment the
only processors (resources in general) you could use, are those
allocated and displayed at the beginning of the session. You will stay
in a sort of cluster partition of your own, no other could enter
there.
Example of an interactive execution:
qsub -l nodes=2:ppn=2,walltime=0:30:00 -I
cd testdir
mpiexec -n 4 test.x
The Portable Batch System, PBS, is a workload management system for Linux clusters. It supplies command to submit, monitor, and delete jobs. It has the following components.
Below are the steps needed to run production code:
Below are some of the commonly used PBS options in a job script file. The options start with "#PBS."
(*) File staging can specify which files should be copied onto the execution host before the job starts and which files should be copied off the execution host when it completes. The file_list regardless of the direction of copy, is of the following form, where the name local_file is the name of the file on the system where the job executes, and the remote_file is the destination name on the host specified by hostname: local_file@hostname:remote_file.
Option Description #PBS -N myJob Assigns a job name. The default is the name of PBS job script. #PBS -l nodes=4:ppn=2 The number of nodes and processors per node. #PBS -l walltime=01:00:00 The maximum wall-clock time during which this job can run. #PBS -o mypath/my.out The path and file name for standard output. #PBS -e mypath/my.err The path and file name for standard error. #PBS -j oe Join option that merges the standard error stream with the standard output stream of the job. #PBS -W stagein=file_list Copies the file onto the execution host before the job starts. (*) #PBS -W stageout=file_list Copies the file from the execution host after the job completes. (*) #PBS -m b Sends mail to the user when the job begins. #PBS -m e Sends mail to the user when the job ends. #PBS -m a Sends mail to the user when job aborts (with an error). #PBS -m ba Allows a user to have more than one command with the same flag by grouping the messages together on one line, else only the last command gets executed. #PBS -r n Indicates that a job should not rerun if it fails. #PBS -V Exports all environment variables to the job.
stagein=my.input@frontend-0:/home/login_name/my.input
stageout=my.output@frontend-0:/home/login_name/my.output
Command Description showq Show a detailed list of submitted jobs showbf Show the free resources (time and processors available) at the moment checkjob job.ID show a detailed description of the job job.ID showstart job.ID gives an estimate of the expected started time of the job job.ID
There are a number of predefined environment variables. These include the following:
The following environment variables relate to the submission machine:
Option Description PBS_O_HOST The host machine on which the qsub command was run. PBS_O_LOGNAME The login name on the machine on which the qsub was run. PBS_O_HOME The home directory from which the qsub was run. PBS_O_WORKDIR The working directory from which the qsub was run.
The following variables relate to the environment where the job is executing:
Option Description PBS_ENVIRONMENT This is set to PBS_BATCH for batch jobs and to PBS_INTERACTIVE for interactive jobs. PBS_O_QUEUE The original queue to which the job was submitted. PBS_JOBID The identifier that PBS assigns to the job. PBS_JOBNAME The name of the job. PBS_NODEFILE The file containing the list of nodes assigned to a parallel job.
The following job script template should be modified for the need of the job.
#!/bin/csh
#PBS -N MY_JOB
#PBS -l nodes=4:ppn=2
#PBS -l walltime=01:00:00
#PBS -j oe
echo "MASTER HOST: $PBS_O_HOST is the master host"
echo "NODEFILE: $PBS_NODEFILE is the nodefile"
echo "PBS_O_WORKDIR: $PBS_O_WORKDIR"
cd $PBS_O_WORKDIR
mpiexec -n 8 ./a.out
Use the qsub command to submit the job.
qsub jobA
PBS assigns a job a unique job identifier once it is submitted (e.g. 123.briareo). After a job has been queued, it is selected for execution based on the time it has been in the queue, wall-clock time limit, and number of processors.
Below are commands for monitoring a job:
Command Function qstat -a check status of jobs, queues, and the PBS server qstat -f get all the information about a job, i.e. resources requested, resource limits, owner, source, destination, queue, etc. qdel job.ID delete a job from the queue qhold job.ID hold a job if it is in the queue qrls job.ID release a job from hold
At present the batch queues are defined as follows:
| QUEUE | N. CPU MAX | Time Limit per CPU (dd+hh:mm) |
Total Time Limit (dd+hh:mm) |
| dque | 64 | 0+>10:00 | - |
Suppose you want tu run the program hello.x on 16 processor for 1 hour, then if you want to specify the requests on the qsub command line you should write the jobscript file as follows:
#!/bin/sh
and you can submit it to the queuin system with the command:
qsub -l nodes=8:ppn=2,walltime=1:00:00 jobscript
If you prefer to include the requests in the jobscript, then the jobscript should be:
#!/bin/sh
#PBS -l nodes=8:ppn=2,walltime=1:00:00
cd workdir
mpiexec -n 16 hello.x
and you can submit it to the queuin system with the command:
qsub jobscript
lib<COMPILER><LIBNAME>An example for the fftw library is: libpgifftw, libifcfftw, libgnufftw, respectively for pgf77, ifc, g77 compilers.
High performance routines for real and complex Discrete Fourier Transforms. Includes serial, shared memory (pthreads), and distributed memory (MPI) versions of the libraries, in both single and double precision.
It has been compiled with MPI support and by default it uses the pgi fortran compiler in its fortran interface. To use them
pgf77 -O3 foo.f -L/usr/local/lib -lpgifftw mpi_pgf77 -O3 foo.f -L/usr/local/lib -lpgifftw_mpi (parallel version)
A subset of LAPACK designed for use on distributed memory parallel architectures. Includes the PBLAS (Parallel BLAS) library.
High-performance BLAS and LAPACK routines and for C and Fortran. Each routinne is
individually tuned for the underlying hardware. The library has been compiled using
gcc compiler (the suggested one) and with fortran wrapper for all the fortran compiler.
To use them:
pgf77 foo.f -L/usr/local/lib -lpgiblas -lpgiatlas (PGI Fortran compiler) ifcc foo.f -L/usr/local/lib -lifcblas -lifcatlas (Intel Fortran compiler) g77 foo.f -L/usr/local/lib -lgnublas -lgnuatlas (GNU Fortran compiler) mpi_pgf77 -O3 foo.f -L/usr/local/lib -lpgiblas -lpgiatlas
The "Math Kernel Library" consists of functions in the following computational areas:
For running MKL and/or VML, the library directory, name and the include directory needs to be included in your makefile or command line. Below is an example of how to compile and link a program which calls a BLAS function in the MKL. Note that the library is for use in a single node, hence can be used by both serial compilers or by MPI wrapper scripts.
mpicc -O3 -I/usr/local/intel/mkl/include foo.c -L/usr/local/intel/mkl/lib/32 -lmkl_p3
For additional documentation and reference on MKL, both pdf and html-based, please look in the directory /usr/local/intel/mkl/doc.