support
CHPC National Meeting 2011
We are pleased to invite you to the Centre for High Performance Computing National Conference to be held from 7 to 9 December 2011 at the CSIR International Convention Centre (ICC) in Pretoria.
logging in
Find guidelines on the following below:
- CHPC Use Policies
- Logging in via Secure Shell
- Directories
- File permissions
- Disk space
- Changing your password on GPU OR Sun cluster
- Changing your login shell
- Changing bash command line editing mode
- Shell variables
- Command-line completion
CHPC Use Policies
Please Make sure you have read and signed the CHPC Use Policy and returned it. Chances are you have already done so to get to this point.
Logging in via Secure Shell
CHPC systems use the UNIX operating system. Click here to download the readme file for all our clusters.
Most systems have an SSH client that may be used to log in to the CHPC. Linux and MacOS systems have this as standard, while PuTTY is a free downloadable client for MS-Windows.
Login using your ssh client to the system (GPU & Sun system) and optionally set the command line argument -X to enable X-windows display forwarding back to your local host. For example:
To login into the GPU:
ssh username@gpu.chpc.ac.za (Anywhere from the internet)
SUN cluster loggins Using Linux
1. Login from anywhere on the internet
ssh username@sun.chpc.ac.za
2. Login from CSIR
ssh username@chpcsun.csir.co.za
Login via Putty
- Open Putty.exe
- Category: Session
- Under Host Name or IP address:
- sun.chpc.ac.za (from anywhere in the internet)
- or : gpu.chpc.ac.za
- Port: 22
- Connection Type: SSH
- Saved Session: e.g CHPC-SUN or CHPC-GPU
- Close window on exit: Only on clean exit
- Click Open
- Your Username [press Enter]
- Your Password [press Enter]
This will connect you to a shell on the login node of the cluster. From here you will be able to conduct almost all of your activities.
Directories
The root directory in unix / (forward slash) is the base of the file system. Other disk systems may be mounted on mount points on the root directory. The other directories are normally on separate disk subsystems from the system directories containing the libraries and programs.
The directory in which a user's login session starts, is the home directory.
In commands, it may also be referred by a short form, using the tilde symbol, ~.
The tilde is expanded by the shell to refer to the full directory path of the home directory, typically /GPU/home/username (GPU) or /export/home/username (Sun). This directory is owned by the user and contains files enabling correct startup of the user's session such as setting shell variables.
The current working directory may be referred to by its full pathname or . (dot), while the parent directory which is one level up is referred to by .. (double dot).
You may change to your home directory by typing cd on its own. Or, you may refer to files in your home directory by using the tilde shortcut symbol when in a different working directory, eg.:
cat ~/myfile.text
to display the contents of the file in /GPU/home/username/myfile.text (GPU) OR /export/home/username/myfile.text (Sun) on the console.
Tip: to change your working directory to the previous directory, type cd -
File permissions
In unix, file permissions for reading, writing and executing may be specified for the classes owner, group and world. In this way access may be controlled. The chown and chmod commands are used to change a file or directory's permissions.
Disk space
The unix disk free command df shows the filesystem free space and mount points. The '-h' command line switch causes the output to be in a format more easily read by a human.
For example, to show all free space in GPU cluster:
% df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 49G 18G 29G 38% /
tmpfs 12G 0 12G 0% /dev/shm
/dev/gpfs 14T 942G 13T 7% /GPU
For example, to show all free space in Sun cluster:
% df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 119G 45G 68G 40% /
udev 7.9G 188K 7.9G 1% /dev
/dev/sda1 130M 25M 98M 21% /boot
172.17.203.15:/mnt/gridware 1.6T 680G 865G 45% /opt/gridware
172.17.203.15:/mnt/home 1.9T 717G 1.1T 41% /export/home
172.17.203.50:/scratch/work 3.6T 1.8T 1.9T 50% /scratch/work
172.17.203.50:/scratch/home 2.0T 210G 1.8T 11% /scratch/home
172.17.195.20@o2ib0:172.17.195.21@o2ib0:/lfs01 72T 15G 68T 1% /lustre/SCRATCH1
172.17.195.21@o2ib0:172.17.195.20@o2ib0:/lfs02 72T 13T 56T 19% /lustre/SCRATCH2
172.17.195.20@o2ib0:172.17.195.21@o2ib0:/lfs03 72T 38T 31T 55% /lustre/SCRATCH3
172.17.195.21@o2ib0:172.17.195.20@o2ib0:/lfs04 72T 2.9T 66T 5% /lustre/SCRATCH4
To show disk usage, use the unix command du :
du -sh .
Show usage in all subdirectories of a specified directory
du -sh directoryname
Changing your password on GPU OR Sun cluster
To change your password, login to gpu.chpc.ac.za (GPU) OR sun.chpc.ac.za (Sun).
To change your password type passwd and follow the prompts, first to enter your existing password, and then the new password. You will be prompted twice for the new password to ensure correctness.
For example (GPU):
passwd
Please enter old (i.e. current) password:
Please enter new password:
Please re-enter new password:
For example (SUN cluster):
NB:You'll be requested to enter a new password and to confirm it.
username@login02:~>passwd username
Changing password for username.
Old Password:
New Password:
Reenter New Password:
Changing NIS password for username on batch01.
Password changed.
Choose a "strong" password, with mixed case alphabetic characters and digits. As per the CHPC agreements, please keep your password private and change it immediately if you suspect it has become known to anyone else.
If you have forgotten the password or otherwise cannot log in, you will have to request that your password be reset by the CHPC system admin.
Changing your login shell
To change your shell type 'chsh' and follow the prompts. A list of valid shells is available in the text file /etc/shells although the bash shell will suffice for most operations. Current shells include csh, ksh, tcsh, zsh.
For example, to change your shell to bash:
chsh -s bash
Changing bash command line editing mode
By default, the bash shell is set up to use VI-style editing keys. To change, run the following, or add the following to your .bashrc file to execute on login:
set -o emacs
Useful keys in this mode:
- ^a Start of line
- ^e End of line
- ^w Delete previous word
- Up/Down arrow access command history
To revert to VI mode
set -o vi
Shell variables
A number of shell environment variables are preset and control many aspects of the shell's operation. They can be viewed by using the unix commands env or set. To change a shell variable's value, use export in Bash.
Some importants shell variables are:
- PATH -- the search path used for commands and programs
- EDITOR -- which editor is used
- PS1 -- The Bash shell command line prompt, e.g.:
export PS1='\u@\h:\w $ '
This will generate a prompt of the form username@Host WorkingDir $, where WorkingDir is the current working directory.
To add a new directory to the end of your search path, re-use the variable
export PATH=$PATH:/my/new/location
To run a program in the current directory without adding it to the PATH, invoke it as follows:
./myprogram
Command-line completion
Pressing Tab will perform automatic filename completion, both for commands that are available on the shell's PATH, a variable that determines which directories are searched for programs, and for file and directory name completion.
