I started recently to learn using Linux. I want to write a script in bash shell to run a serial job on a cluster. I have been searching for hints and instructions on how to write such a script. I managed to write the following:
#!/bin/bash #PBS -l nodes=1:ppn=8 #PBS -l walltime=1:00:00 #PBS -e test.err #PBS -o test.log cd /home/myuser/ echo "Running on host `hostname`" echo "Time is `date`" echo "Directory is `pwd`" /home/myuser/comsol4.3b/bin/comsol batch -inputfile DF.mph -outputfile output.mph -batchlog out.log
The last line calls the program (it is called COMSOL) to run. One of the things that are missing in my code is the command “qsub”; I don’t know how to incorporate it with the rest of commands in my code. Can anyone please instruct me how to modify the line that calls the program I am using by “qsub” command please?
Sorry if my question is so simple, I spent a lot of time trying to make it work but I couldn’t unfortunately.
EDIT: To summarize, if I typed the last line of the code ONLY it will be run on the main node only, I don't want that. What I want is to modify the last line of the code such that it uses the resources I allocated to it using PBS lines, how should I do that?
For the record, the command
qhost shows there are 250 nodes with varying cores per node from 4 cores/node to 16 cores/node