Thanks, between yourself and the Gilles I've got plenty of information
to use in an explanation! And thanks for the hello world link, I've
used the examples that come with OpenMPI but hadn't used that one.
Usually I end up assuming it works and just running HPL. ;)
On Tue, 2016-10-11 at 15:27 +0200, Reuti wrote:
> > Am 11.10.2016 um 14:56 schrieb Mark Potter <mpot...@pcpcdirect.com>
> > :
> > This question is related to OpenMPI 2.0.1 compiled with GCC 4.8.2
> > on
> > RHEL 6.8 using Torque 6.0.2 with Moab 9.0.2. To be clear, I am an
> > administrator and not a coder and I suspect this is expected
> > behavior
> > but I have been asked by a client to explain why this is happening.
> > Using Torque, the following command returns the hostname of the
> > first
> > node only, regardless of how the nodes/cores are split up:
> > mpirun -np 20 echo "Hello from $HOSTNAME"
> The $HOSTNAME will be expanded and used as argument before `mpirun`
> even starts. Instead it has to be evaluated on the nodes:
> $ mpirun bash -c "echo \$HOSTNAME"
> > (the behaviour is the same with "echo $(hostname))
> > The Torque script looks like this:
> > #PBS -V
> > #PBS -N test-job
> > #PBS -l nodes=2:ppn=16
> > #PBS -e ERROR
> > #PBS -o OUTPUT
> > cd $PBS_O_WORKDIR
> > date
> > cat $PBS_NODEFILE
> > mpirun -np32 echo "Hello from $HOSTNAME"
> > If the echo statement is replaced with "hostname" then a proper
> > response is received from all nodes.
> > While I know there are better ways to test OpenMPI's functionality,
> > like compiling and using the programs in examples/, this is the
> > method
> > a specific client chose.
> There are small "Hello world" programs like here:
> to test whether e.g. the libraries are found at runtime by the
> -- Reuti
> > I was using both the examples and a Torque job
> > script calling just "hostname" as a command and not using echo and
> > the
> > client was using the script above. It took some doing to figure out
> > why
> > he thought it wasn't working and all my tests were successful and
> > when
> > I figured it, he wanted an explanation that's beyond my current
> > knowledge. Any help towards explaining the behaviour would be
> > greatly
> > appreciated.
Mark L. Potter
PCPC Direct, Ltd.
users mailing list