Useful links
Simple awk tutorial
How to sort by last field in the line: http://stackoverflow.com/a/3223025
Useful Commands
# to display that Std output and Std error of a job as it is running:
bpeek <job ID>
# to search module by name:
module avail 2>&1 | grep -i #search_name
# to see available hosts and resources on the cluster:
bhosts
Setting up your local environment on the cluster:
Within your /home/[username]/.bashrc add/edit the following as necessary:
# to add confirmation before moving anything:
alias mv='mv -i'
# to add a confirmation before removing/deleting anything:
alias rm='rm -i'
# to list files colored by file type:
alias ls='ls --color'
# shortcut to list files with more information
alias lh='ls -hog --color'
# to grep files colored by grep query
alias grep='grep --color;
# to change the directory/host colors to make them stand out:
DIR_COLOR=$YELLOW
HOST_COLOR=$DEFWHITE
# to add date/time information to command prompt:
export PS1="\[\e[${HOST_COLOR}\][\D{%h %d}|\@][${debian_chroot:+($debian_chroot)}\u@\h:\[\e[${DIR_COLOR}\]\\w\[\e[${HOST_COLOR}\]]$"
Setting up Local Modules on Cluster:
1. In your .bash_profile, add the following:
# User specific environment and startup programs
export MOD_SW=/pi/athma.pai-umw/software/local_modules_sw
module use /pi/athma.pai-umw/local_modules
2. For each new software:
a) Download the compiled software to software_downloads directory (compile code if necessary)
b) Make [softwarename]/[version] folder in local_modules_sw directory
c) Compile or move executable files to local_modules_sw/[softwarename]/[version]/bin
d) Create folders/file: local_modules/[softwarename]/[version]
e) In that file, type:
#%Module########################################################################
#
# module
#
# [softwarename]-[version]
#
module-whatis "[softwarename]-[version]"
set MOD_[softwarename] $env(MOD_SW)/[softwarename]/
set MOD_[softwarename]_VERSION [version]
set MOD_[softwarename]_DIR $MOD_[softwarename]/$MOD_[softwarename]_VERSION/
prepend-path PATH $MOD_[softwarename]_DIR/bin/
3. This module should now be added.
a) When typing "module avail", you should see the module in /pi/athma.pai-umw/local_modules/
b) Load the module with "module load [software]/[version]"
c) Check that the software works - how you do this will depend on what commands the particular software requires.