How to set environment variables on compute nodes in an MPI job
问题 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