I am trying to figure out how to use pbsdsh. I have a PBS script and a bash script. The PBS script looks like:
#!/bin/bash
## Required PBS Directives --------------------------------------
#PBS -A blahblahblah
#PBS -q debug
#PBS -l select=1:ncpus=32:mpiprocs=2
#PBS -l walltime=00:00:30
#PBS -j oe
#
## Execution Block
# Environment Setup ----------------------------------------------
cd $PBS_O_WORKDIR
pbsdsh -v $PBS_O_WORKDIR/greetings.bash
exit $?
The bash script greetings.bash will hopefully be much more involved very soon, but for now all it has is:
#!/bin/bash
#
#echo ::: $PBS_NODENUM ::: $PBS_VNODENUM :::
exit 0
I submit to PBS and get the output:
::: 0 ::: :::
::: 0 ::: :::
pbsdsh: spawned task 0x00000000 on logical node 0 event 2
pbsdsh: spawned task 0x00000001 on
So, first question: Why does the script find a value for $PBS_NODENUM but $PBS_VNODENUM is undefined?
Here's another question:
In the PBS script, I am cd'ing to $PBS_O_WORKDIR, and then running $PBS_O_WORKDIR/greetings.bash. But then I think, well, I'm already in $PBS_O_WORKDIR, so surely I don't have to specify it again in the pbsdsh command. "./greetings.bash" should be sufficient. Right? So I make that change to the script, and I get no results at all. I get the error messages:
: No such file or directory
: No such file or directory
Why should that happen? BTW, I saw an example with a script with the line PATH=$PBS_O_PATH and I tried inserting that into greetings.bash. No change.