I don't understand how the environment is set on compute nodes when running with MPI under a scheduler.
I do:
mpirun -np 1 --hostfile ./hostfile foo.sh
with foo.sh
:
#!/usr/bin/env zsh
echo $LD_LIBRARY_PATH
Then I do not recover the LD_LIBRARY_PATH I have got in an interactive shell... What are the initialization files that are executed/sourced at connection with MPI?
note: I am under zsh, and I tried to put things in .zprofile or .zshenv instead of .zshrc, but it doesn't seem to make a change... My LD_LIBRARY_PATH is set in a .profile which is sourced by a .bashrc which is sourced by the .zshrc.
sh
to read yourzsh
files? – Mehetabelmpirun -np 1 --hostfile ./hostfile echo $LD_LIBRARY_PATH
ormpirun -np 1 --hostfile ./hostfile 'echo $LD_LIBRARY_PATH'
? In the first case, the variable is expanded before mpirun is even called. – Dielectricmpirun -np 1 --hostfile ./hostfile 'echo $LD_LIBRARY_PATH'
does not work for me:mpirun was unable to launch the specified application as it could not find an executable:..Executable: echo $LD_LIBRARY_PATH
– Kudu