[Beowulf] in pbs submit script, setenv command is not working

Don Holmgren djholm at fnal.gov
Thu Apr 8 14:44:19 EDT 2010

You should add, as the second line,

#PBS -S /bin/csh

else PBS will (I think) use your default login shell, which I assume is
not csh (explaining the "setenv" error message).

Also, you have a typo.  You should have

echo "NPROCS is $NPROCS"
   instead of
echo "NPOCS is $NPOCS"

Don Holmgren

On Wed, 7 Apr 2010, akshar bhosale wrote:

> Hi,
> we have cluser of 8 nodes and it is rhel 5.2 (64 bit). We have torque and
> here is my submit script which is
> #!/bin/csh -f
> #PBS -l nodes=2:ppn=2
> #PBS -r n
> #PBS -A ourproj
> #PBS -V
> #PBS -o output_pvd3.6.txt
> #PBS -e error_pvd3.6.txt
> echo PBS JOB id is $PBS_JOBID
> setenv NPROCS `cat $PBS_NODEFILE|wc -l`
> echo "NPOCS is $NPOCS"
> #/opt/intel/mpi/bin64/mpirun --totalnum=$NPROCS --file=$PBS_NODEFILE
> --rsh=/usr/bin/ssh -1 --ordered --verbose -l -machinefile $PBS_NODEFILE
> -np $NPROCS /home/aksharb/helloworld
> #sleep 100
> /bin/hostname
> in output file i get
> PBS JOB id is 1725.server1.gnps.tkl
> PBS_NODEFILE is /opt/PBS/aux//1725.server1.gnps.tkl
> PBS_QUEUE is batch
> NPOCS is
> y8.gnps.tkl
> y8.gnps.tkl
> y7.gnps.tkl
> y7.gnps.tkl
> and error file says :
> /opt/PBS/mom_priv/jobs/1725.server1.gnps.tkl.SC: line 11: setenv: command
> not found
> kindly guide me.

Beowulf mailing list, Beowulf at beowulf.org sponsored by Penguin Computing
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

More information about the Beowulf mailing list