#!/bin/sh' . "\n"; ### Output' . "\n"; ### Queue name ' . "\n"; #PBS -q single' . "\n"; ### Allocation ' . "\n"; #PBS -A loni_stopgap2' . "\n"; ### Number of nodes ' . "\n"; #PBS -l nodes=4:ppn=1,walltime=00:05:00' . "\n"; ' . "\n"; # Print the default PBS server' . "\n"; echo PBS default server is $PBS_DEFAULT' . "\n"; ' . "\n"; # Print the jobs working directory and enter it.' . "\n"; echo Working directory is $PBS_O_WORKDIR' . "\n"; cd $PBS_O_WORKDIR' . "\n"; ' . "\n"; # Print some other environment information' . "\n"; echo Running on host `hostname`' . "\n"; echo Time is `date`' . "\n"; echo Directory is `pwd`' . "\n"; echo This jobs runs on the following processors:' . "\n"; NODES=`cat $PBS_NODEFILE`' . "\n"; echo $NODES' . "\n"; ' . "\n"; # Compute the number of processors' . "\n"; NPROCS=`wc -l < $PBS_NODEFILE`' . "\n"; echo This job has allocated $NPROCS nodes' . "\n"; ' . "\n"; # Run hello_world' . "\n"; for NODE in $NODES; do' . "\n"; 'ssh $NODE "' . $cmd . '" &' . "\n"; done' . "\n"; ' . "\n"; # Wait for background jobs to complete.' . "\n"; wait ' . "\n";