HOME   |   COMPUTING   |   BACK   |  

Ibnsina Users Guide

Table of Contents

Ibnsina Hardware
Ibnsina Software
Usage Policy
Connecting to Ibnsina
Changing your password
Transfering Files to and from Ibnsina
Sequential Programming
Parallel Programming
Compiling and linking
Running Jobs
Using the Loadleveler
Debugging
Code Optimisation
Scientific Libraries
Documentation



Ibnsina Hardware

Ibnsina is composed of 8 dual processor nodes. Each node consists of two POWER 4 processors running at 1.0 GHz and sharing 2GB of memory.

There are three levels of cache on each node. Each processor has 64KB L1 cache and then each pair of processors share a 1.41 MB L2 cache, and 16 MB L3 cache.

Two communication channels exist. One handles management data(FAST Ethernet Switch); the other handles computing data(HPC IBM Switch 2).

The combined peak performance of the system is 64 GFLOPS.

See
Ibnsina Hardware Listing
See Power4 Technical Whitepaper


Ibnsina Software

Ibnsina comprises a complex system of software working at different layers:

Operating System

Ibnsina runs the AIX Operating System.

Clustering Components

The Parallel Systems Support Program (PSSP) is a comprehensive suite of applications to manage Ibnsina as a full-function parallel processing system.

The Parallel Operating Environment (POE) is the environment that lets users manage parallel jobs.

The Loadleveler is a job management system that works with POE to let users run jobs and match processing needs with system resources, in order to make better use of Ibnsina.

Programming Environment

The programming environment on Ibnsina consists of C/C++, and Fortran Compilers. Debugging, and Profiling Tools. Parallel and Scientific libraries



See
Ibnsina Installed Software


Usage Policy

This list of computer use policies and security rules apply to all researchers using Ibnsina.

Computers and network systems are inherently insecure. All users, are cautioned that in general these technologies are not "private." Therefore users should not expect privacy when using systems or networks. Take appropriate protective measures, protecting sensitive information and applications accordingly.

Computer Use

Ibnsina is to be used only for work as stated in account application form. The use of Ibnsina for personal or non-project related activity is prohibited.

User Accountability

Users are accountable for their actions and may be held liable to administrative or criminal sanctions for any unauthorized actions found to be intentional, malicious, or grossly negligent.

Unauthorized Access

Users are not to access or attempt to access systems or information for which they are not authorized. Users are not to attempt to receive unintended messages or access information by some unauthorized means, such as imitating another system, impersonating another user or other person, misuse of legal user credentials (User IDs, passwords, etc.), or by causing some network component to function incorrectly. Users are not to possess or transfer information for which they are not authorized.

Passwords and User IDs

A User ID and password are required of all users. Passwords are protected commensurate (equal) to the data and system they protect. Passwords must be changed at least every six months. Passwords must be at least six (6) characters long, not found in a dictionary, and cannot be the name of a person, place, or thing.

Default passwords must be changed as soon as possible to avoid suspected compromise.

See
Changing your password

Software License

All software used on Ibnsina be appropriately acquired and used according to the appropriate licensing. This means that any illegally copied software or use is expressly prohibited.

Software used on Ibnsina must be approved (generically or specifically) by CAMS.

Malicious Software

Users must not introduce or use malicious software such as computer viruses, Trojan horses, or worms.

Altering Authorized Access

Users are prohibited from changing access controls to allow themselves or others to perform actions outside their authorized privileges.

Denial of Service Actions

Users are not allowed to prevent others or other systems from performing authorized functions by actions that deny their access, their communications capability, deliberately suppressing their messages or generating frivolous or unauthorized traffic.

Deconstruction of Information or Software

Users are not allowed to reconstruct or recreate information or software for which they are not authorized.




Connecting to Ibnsina

ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network.
  • If you are using a Linux/Unix client, the following is recommended:
    1. If ssh is not installed, the files are availalbe at openssh.org
    2. Given the ssh client is installed on your client, type:
      "ssh ibnsina.cams.aub.edu.lb -l yourusername"
    3. You will be prompted for your password, after that you will have established a secure connection with the cluster

  • If you are using a Windows client, the following is recommended:
    1. Download and use Putty which is a free ssh client.
    2. Given the ssh client is installed, do the following:
      Type "ibnsina.cams.aub.edu.lb" in the "Host Name" field.
    3. Click on the "SSH" radio button in "Protocols"
    4. You will be prompted for your password, after that you will have established a secure connection with the cluster



Changing your password

In order to change your password, use the following command exclusively:

yppasswd

You will first be prompted for your old password.
After that you will asked to enter your new password twice for confirmation.
The changes can take up to 1 hour to propagate across the cluster.




Transfering Files to and from Ibnsina

scp copies files between hosts on a network, and comes with installed with ssh. If not the files are availalbe at
openssh.org
It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh. Unlike rcp, scp will ask for passwords or passphrases if they are needed for authentication.
  • On a Unix/linux machine:

    We assume you are logged on to your personal computer:
    ("~" is equivalent to your home directory "/home/yourname")
    scp file1.c yourname@ibnsina.cams.aub.edu.lb:~/work/
    (copies file1.c TO your ibnsina directory "work")
    scp -r ./folder1/ yourname@ibnsina.cams.aub.edu.lb:~/work/
    (recursively copies folder "folder1" TO your ibnsina directory "work")

    If you are ON ibnsina.cams.aub.edu.lb, the syntax is the same but instead of "ibnsina.cams.aub.edu.lb:" above you would type "yourcomputername".

  • On Windows machine:

    • PSCP can be used to copy files securely from the windows terminal
    • Some people find it easier to work with a graphical interface instead of the command-line pscp command. Another possibility in this case is to use a free program called WinSCP



Sequential Programming

Fortran
  • xlf is the standard IBM Fortran77 compiler
  • xlf_r is the "thread safe" Fortran77 compiler, if there is not a reason to use it the two are equivalent. "_r" version of all the compilers exist
  • xlf90 is the standard IBM Fortran90 compiler
  • xlf95 has also the latest Fortran95 extensions
C/C++
  • xlc or cc is the standard IBM C compiler
  • xlc -qlanglvl=stdc99 requires adhesion to the latest ANSI99 standard
  • xlC is the IBM C++ compiler

See
Fortran Manuals
See C/C++ Manuals


Parallel Programming

Note that it is not enough to link against an MPI library
to use it, but you MUST use the appropriate compiler in order to use it.

Since we are using the
GANG scheduler on Ibnsina,
it is strictly required you link the thread safe MPI library (you are obliged to use the "_r" compilers):
  • mpxlf_r is the standard parallel Fortran77 compiler
  • mpxlf90_r is the standard parallel Fortran90 compiler
  • mpxlf95_r is the standard parallel Fortran95 compiler
  • mpcc_r is the standard parallel C compiler
  • mpCC_r is the standard parallel C++ compiler
These compilers supports IBM specific LAPI library as well.
See Fortran Manuals
See C/C++ Manuals
See Parallel Environment Manuals



Compiling and Linking

Typical compilation commands

xlf90 serial_prog.f prog.f is a serial Fortran code
xlf90_r -qsmp=omp:noauto openmp_prog.f openmp_prog.f contains OpenMP directives
mpcc mpi_prog.c mpi_prog.c is an MPI program in C
mpxlf90_r -qsmp=omp:noauto mpi_openmp_prog.f mpi_openmp_prog.f is a mixed MPI-OpenMP code
mpCC_r mpi_C++_prog.C mpi_C++_prog.C contains MPI bindings in C++
pubcc pub_prog.c pub_prog.c is a PUB program in C
pubc++ pub_prog.cc pub_prog.cc is PUB program in C++

PUB

Typically, pubcc and pubc++ are the commands used to compile and link programs. Other compilation scripts are available in the form of pubcc_ibmsp2_aix_[PUB_COMMUNICATION]_[PUB_MODE].

See table below for possible value of PUB_COMMUNICATION and PUB_MODE. To compile C++ files using the scripts, replace pubcc with pubc++.


PUB_COMMUNICATION mpi, and seq
PUB_MODE debug, release, and profile

Compiler Options

Some important and IBM specific options (see man xlf, xlc, or whatever for more detailed explanations and more options; more information also HERE ):

  • -bmaxdata:0x70000000 allows to use seven 256 MB segment (therefore to use up to 1.7GB - the last segment is dedicated to MPI buffers) instead of just one (the default).

    In the last case the executables can address only 256MBs, so if you try to use more memory than 256 MBs you get the misleading error message "There is not enought memory now".

  • -q64 requires to generate 64 bits executable.
    With this option enabled you will be able to break the 2GB per process limit.

  • -qarch=pwr4 -qtune=pwr4 (specify both) asks to generate optimized code for the the IBM Power4 processor

  • -O3, -O4 or -O5 different optimization level - see man page or on line documentation for details.


See
Fortran Manuals
See C/C++ Manuals
See PUB Manual


Running jobs

The main node you log into on Ibnsina, e.g "ibnsina.cams.aub.edu.lb", is where editing, compiling, and submitting of your programs to the loadleveler should take place.
You do not have interactive access to other nodes in the cluster. If you connect to other nodes (via rlogin/telnet/ssh) your processes will be killed, and your account disabled.

Sequential Programs

Trial Runs

For short test runs, you can either submit your job to the tiny_serial job queue, or run your job directly on "ibnsina.cams.aub.edu.lb" with a CPU time limit of 2 hours.

Production Runs

For production runs, you must submit your jobs to one of the loadleveler queues (tiny_serial, small_serial, medium_serial, large_serial, huge_serial) where each queue 3R differs from the other according to the wall clock time allowed and the assigned queue priority.

Parallel Programs

Trial Runs

For short test runs, you can submit your job to the tiny_parallel job queue, that will allocate 30 minutes of wall clock time for your parallel job. This should give you a rough estimate of how long your job should take to run.

Producation Runs

For production runs, you must submit your jobs to one of the loadleveler queues (tiny_parallel, small_parallel, medium_parallel, large_parallel, huge_parallel) where each queue differs from the other accodring to the wall clock time allowed, and the assigned queue priority.


See
Classes and Priorities for a listing of queues and their priorities.
See Loadleveler llclass command for listing available queues.
See Using the Loadleveler for details on working with the IBM Loadleveler.


Using the Loadleveler

LoadLeveler Version 3.1 (LL) is the default IBM batch queue system on
Ibnsina. LoadLeveler keeps track of all queues and user jobs and starts,
holds, and ends batch jobs on the cluster.
Actual job priorities, user and queue run limits, and the order in which
submitted jobs are started on Ibnsina is under control of the LL scheduler.
Basic Commands
Classes and Priorities
Sample Commands Usage
Sample Jobs Command Files: Serial jobs Parallel jobs PVM jobs PUB jobs

Basic Commands

Here's a list of basic LL commands available to the users:
Getting queue/machine/job info:
llq Queries the job queue
llstatus Displays machine status
llclass Displays information on available classes
Modifying Running Jobs:
llsubmit Submits a job to LoadLeveler
llcancel Cancels a job
llhold Holds or releases a job
GANG Scheduler Specific Commands:
llmatrix Displays GANG matrix information
llprio Modifies user priority of a job step



Classes and Priorities


Sample Command Outputs

llq

$ llq
Id                       Owner      Submitted   ST PRI Class        Running On 
------------------------ ---------- ----------- -- --- ------------ -----------
node1.183.0              user1		11/17 10:11 R  50  small_parall node5      
node1.177.0              user2		11/17 10:11 R  50  huge_paralle node6      
node1.178.0              user3		11/17 10:11 R  50  medium_seria node3      
node1.179.0              user1		11/17 10:11 R  50  huge_paralle node8      
node1.180.0              user2		11/17 10:11 I  50  small_serial node4 
node1.181.0              user1		11/17 10:11 I  50  small_parall  
node1.182.0              user3		11/17 10:11 I  50  huge_paralle            



llstatus

$ llstatus 
Name                      Schedd  InQ Act Startd Run LdAvg Idle Arch      OpSys
node1                     Avail     6   5 None     0 3.96     1 R6000     AIX51    
node2                     Avail     0   0 Run      4 0.00  9999 R6000     AIX51    
node3                     Avail     0   0 Run      4 0.16  9999 R6000     AIX51    
node4                     Avail     0   0 Run      2 0.00  9999 R6000     AIX51    
node5                     Avail     0   0 Run      2 0.12  9999 R6000     AIX51    
node6                     Avail     0   0 Run      4 0.63  9999 R6000     AIX51    
node7                     Avail     0   0 Run      4 0.58  9999 R6000     AIX51 

node8                     Avail     0   0 Run      4 1.20  9999 R6000     AIX51    

R6000/AIX51                 8 machines      6  jobs     24  running
Total Machines              8 machines      6  jobs     24  running

The Central Manager is defined on node1

The GANG scheduler is in use

All machines on the machine_list are present.



llclass

$ llclass 
Name                 MaxJobCPU     MaxProcCPU  Free   Max  Description
                    d+hh:mm:ss     d+hh:mm:ss Slots Slots
--------------- -------------- -------------- ----- -----  ---------------------
No_Class             undefined      undefined     0     0  
large_serial         unlimited      unlimited    14    14  Large Serial Jobs
huge_serial          unlimited      unlimited    14    14  Huge Serial Jobs
tiny_parallel        unlimited      unlimited    28    28  Tiny Parallel Jobs
small_serial         unlimited      unlimited    28    28  Small Serial Jobs
small_parallel       unlimited      unlimited    12    28  Small Parallel Jobs
medium_serial        unlimited      unlimited    21    21  Medium Serial Jobs
medium_parallel      unlimited      unlimited    21    21  Medium Parallel Jobs
large_parallel       unlimited      unlimited     6    14  Long Parallel Jobs
huge_parallel        unlimited      unlimited    14    14  Huge Parallel Jobs
--------------------------------------------------------------------------------



llsubmit

$ llsubmit ./pjob3.cmd 
llsubmit: The job "node1.190" has been submitted.



llcancel

$ llcancel node1.187.0
llcancel: Cancel command has been sent to the central manager.



llhold

$ llhold node1.189.0
llhold: Hold command has been sent to the central manager.
Release a held job:
$ llhold -r node1.189.0
llhold: Hold command has been sent to the central manager.



llprio

$ llprio +50 node1.193.0
llprio: Priority command has been sent to the central manager.

$ llq
Id                       Owner      Submitted   ST PRI Class        Running On 
------------------------ ---------- ----------- -- --- ------------ -----------
node1.189.0              user1        11/17 11:47 R  50  large_parall node7      
node1.191.0              user1        11/17 11:55 R  50  large_parall node8      
node1.192.0              user1        11/17 11:55 R  50  large_parall node2      
node1.193.0              user1        11/17 11:55 I  100 large_parall            
node1.194.0              user1        11/17 11:55 I  50  large_parall            





Sample Job Command Files

Job submission to LL is accomplished using a job command file.
The job command file is a shell script containing keywords embedded in comments
beginning with #@.
These keywords inform LL of the job's environment, the program to execute,
where to write output files, whethere the job is serial or parallel, and 
the resources required for the job to run.

Sample Job Command File for a Serial Job:

#!/bin/sh
#@ class = small_serial
#@ environment = COPY_ALL
#@ executable = myprogram 
#@ output = job.$(jobid).out
#@ error = job.$(jobid).err
#@ queue



Sample Job Command File for a Parallel Job:

#!/bin/sh
#POE job using ip over css0
#@ class =large_parallel
#
#@ job_type=parallel

#@executable = /usr/bin/poe

#@network.mpi = css0,shared,ip
#@requirements =  (Arch == "R6000") && (OpSys == "AIX51")

#@initialdir = /home/yourusername/work/
#@output = job.$(jobid).out
#@error =  job.$(jobid).err

#@node = 2
#@tasks_per_node = 2

#@arguments = ./myprogram

#@queue



Sample Job Command File for a PVM Job

#@ initialdir = /home/yourusername/work/
#@ error = job.$(jobid).err 
#@ output = job.$(jobid).out
#@ class = pvm3
#@ job_type = parallel
#@ queue

#clean up any pvm files left from previous
#runs
dsh -a rm /tmp/pvm*
dsh -a rm /tmp/aa*

#start the master PVM daemon with hostfile
#hostfile is a file with the node names
#you are going to use
pvm hostfile

#exit pvm but don't halt it
quit


#run the PVM program (your prog + args here!)
myprogram arg1 arg2

#kill PVM
pvm << EOF
halt
EOF


#final clean up run
dsh -a rm /tmp/pvm*
dsh -a rm /tmp/aa*
An explanation and listing of keywords can be found in the manual
"Using and Administering"


Sample Job Command File for a PUB Job:

#!/bin/sh
#POE job using ip over css0
#@ class =small_parallel
#
#@ job_type=parallel

#@executable = /usr/bin/poe

#@network.mpi = css0,shared,ip
#@requirements =  (Arch == "R6000") && (OpSys == "AIX51")

#@output = job.$(jobid).out
#@error =  job.$(jobid).err

#@node = 2
#@tasks_per_node = 2

#@arguments = myprogram

#@queue



Debugging

pdbx

The symbolic PDBX debugger is available. It can be used either for a run time analysis of the behaviour of a program, or to examine the core file at the end of the execution. The compilation must be invoked with the -g option, this way:

xlf -g -o myfile myfile.f (or xlc -g -o myfile myfile.c)
pdbx nomefile

Static Debuggers

Lint is a static debuggers. Static debuggers are program which analize source code to find problems as uninitialized variables, argument data type mismatch and others semantic (not syntax) errors. When your code is ready and syntax error free (the compiler compile it) you can check your code using these debuggers. The commands is:

lint

See man lint on the system for additional information.


Code Optimisation

Software profilers: Xprofiler and gprof

In order to check the performances of a code, you can use Xprofiler or gprof.
Xprofiler is a tool that helps you analyze your parallel application's performance quickly and easily. It uses data collected by the -pg compiling option to construct a graphical display of the functions within your application (call tree and CPU time spent in every subroutine).
Xprofiler provides quick access to the profiled data, which lets you identify the functions that are the most CPU-intensive. The graphical user interface also lets you manipulate the display in order to focus on the application's critical areas.

Usage:

xlf -pg -o filename filename.f
Run the program filename and get the output profiling file gmon.out Finally perform profiling
xprofiler filename gmon.out

If you prefer only text information use gprof instead of xprofiler:
gprof filename gmon.out
If you want to profile an MPI code use -pg option with mpxlf and run the code: every task creates its own gmon.out.taskID. You can analize only one task (for example the task 0)
xprofiler filename gmon.out.0
or all the application (sum of the data of n+1 tasks)
xprofiler filename gmon.out.0 gmon.out.1 ..... gmon.out.n

Note: no one of the MPI subroutines are showed in this profile: only the low level communication subroutines (as .kickpipe) are showed. If you want to analyze the MPI subroutine use the MPI trace facilities.


Scientific Libraries

ESSL and PESSL

The ESSL products are compatible with public domain subroutine libraries such as Basic Linear Algebra Subprograms (BLAS), Scalable Linear Algebra Package (ScaLAPACK), and Parallel Basic Linear Algebra Subprograms (PBLAS), making it easy to migrate from these libraries. Contains BLAS and LAPACK

MASS

MASS (Mathematical Accelerations SubSystem) library is available. It allows to speedup codes that make deep usage of mathematical functions (sin, cos, exp, sqrt, ... ), especially if used repeatedly.




Documentation

Besides these help pages, we suggest the following links
IBM SP Books
Ibnsina Docs


Contact:webmaster@cams.aub.edu.lb
Last modified: October 17 2006