The files you see from the login node are typically shared among all nodes in the cluster. But use this login machine only for compiling and general tasks. For running MPI or other parallel jobs, use the queuing system discussed below to access the computer cluster.
Every class user is allocated with a certain amount of service units. Use the gbalance -u username command to check the amount of time in your account.
Your account is billed according to the formula:
#CPUs x #nodes x wall-clock-time.SU charge is rounded to the nearest CPU node hour. For example, if you run with 8 CPUs (cores) on 1 node for 12 minutes, your account will be charged 2 SUs.
It is easy to accidentally chew through your time allocation by running a program with dead lock or leaving an interactive session open. One thing you can do is to always specify a maximum time the job can execute. For example, 10-20 minutes.
mpicc -o test1 test1.c
qsub -I -l nodes=1:ppn=8 -l walltime=00:15:00to start an interactive job on a single node with 8 cores for at most 15 minutes.
Once you run it, it will wait until a node is available, and then it will create an SSH session to that node. Your job will last until you exit that SSH session.
mpirun -np 8 test1
cd ~/path-to-program mpirun -v -machinefile $PBS_NODEFILE -np somenumber ./program
qsub jobfilewill submit your job to the scheduler and assign it a job number. Be careful when you are submitting multiple jobs. The output files will get overwritten by subsequent or concurrent jobs writing to the same file.
module load intelTo compile, use icpc or icc compiler with the following sample command:
icpc -openmp test.c -o testTo run, you can use the interactive or batch mode as MPI to allocate one node with upto 8 cores. Set up the actual number of openMP threads using.
export OMP_NUM_THREADS=8At most you can use 8 openMP threads since openMP assumes a shared memory machine setting.
~tyang-ucsb/mpiex ------------MPI sample code ~tyang-ucsb/openmpex ------------OpenMP sample code ~tyang-ucsb/pthreads ------------pthreads code ~tyang-ucsb/MKL ------------Use Intel math library including BLAS.