System operation
Batch (Serial) Operation
- prepare compiled executable; insert name and path into batch-run script as value of variable "myjob"
- submit batch-run script via "qsub"; each CPU does its own part of the work ONE AT A TIME
- monitor process via "qstat" until complete
- output and error sent to separate files in working directory
Parallel Operation
- prepare compiled executable; insert name and path into parallel-run script as value of variable "myjob"
- submit parallel-run script via "qsub"; all CPUs do their work SIMULTANEOUSLY
- monitor process via "qstat" until complete
- output and error sent to separate files in working directory
Example in Parallel Operation
We wish to calculate the numerical constant pi using the C code file cpi2.c...
- compile cpi2.c with "mpicc" ==> creates executable a.out
- create data file input.dat with number representing desired accuracy (rectangle rule)
- find "myjob=" in parallel-run script mpi_run.sh; append "a.out" to end of line
- remove prior output and error files
- submit mpi_run.sh via "qsub"
- monitor process via "qstat" until complete
- output and error sent to MPI-stdo.output and MPI-stderr.output respectively
- contents of MPI-stdo.output: "pi is approximately 3.1416009869231249, Error is 0.0000083333333318"