Non-parallel applications are equally well suited for cluster use. Simply develop and test your code as usual on the master node amdahl, and when it's time to run, submit your program into PBS, where it'll be scheduled and run on compute nodes.
In addition to programs developed from scratch, other computational programs can be run from PBS. OSCAR, ORCA, Matlab, Maple, or Octave can be run from a PBS script on compute nodes. For example, to run a Matlab job on the cluster:
- Create a file containing the appropriate matlab commands that you wish to execute. For example, create a file called cosplot.m:
% MATLAB M-file example to approximate a sawtooth
% with a truncated Fourier expansion.
nterms=5;
fourbypi=4.0/pi;
np=100;
y(1:np)=pi/2.0;
x(1:np)=linspace(-2.0*pi,2*pi,np);
for k=1:nterms
twokm=2*k-1;
y=y-fourbypi*cos(twokm*x)/twokm^2;
end;
plot(x,y);
print -deps matlab_test_plot.ps;
quit;
- Run matlab from the command line of your PBS script:
/usr/local/bin/matlab < cosplot.m
- Your job will be scheduled, run, with matlab processing the m-file and generating a plot, matlab_test_plot.ps.
Preston M Smith
2005-02-22