%SETTING LAM UP

%start lam
lamboot -v hostfile

%pinging all nodes
tping -cl N

%COMPILING

%to use the intel icc compiler
mpiCC foo.cpp -o foo



%to use the g++ compiler instead of the default intel compiler
export LAMHCP=/usr/bin/g++

%show what the mpiCC command means
mpiCC -showme

%compile MDP code as 
mpiCC -DLINUX -DPARALLEL -I/home/bedaque/mdp -I/home/bedaque/fermiqcd foo.cpp -o foo


%RUNNING

%to run one process in each node
mpirun -v N foo

%to run in x processes
mpirun -v -np x foo

%cleaning if necessary, safer to do this after every mpirun
%no need to start lam again
lamclean -v

%finishing lam
lamhalt

%recovery from catastrophic failure
wipe -v hostfile

%nice
%to nice the job from the source use
#include <unistd.h>
//int nice(int inc);   
nice (10);