Andrej Prsa, on Fri 30 Oct 2015 13:35:39 -0400, wrote:
> Thanks for the suggestion. I tried:
> 
> mpirun --prefix /opt/openmpi-1.10.0 --hostfile node1 -np 44 sh -c
> "/usr/bin/env HWLOC_XMLFILE=/etc/hwloc_\${hostname}.xml python
> testmpi.py"
> 
> and:
> 
> mpirun --prefix /opt/openmpi-1.10.0 --hostfile node1 -np 44 sh -c
> "/usr/bin/env HWLOC_XMLFILE=/etc/hwloc_`hostname`.xml python testmpi.py"

Ah, sorry, hostname was supposed to be an environment variable that
contains the hostname, but there is no such thing :)

However, this could work:

mpirun --prefix /opt/openmpi-1.10.0 --hostfile node1 -np 44 sh -c
"/usr/bin/env HWLOC_XMLFILE=/etc/hwloc_\`hostname\`.xml python testmpi.py"

so that hostname gets execute by the remote shell, not the local shell.

Samuel

Reply via email to