Lachlan, I will have to check when I get into work in the morning. I am also sorry if I lead you down the wrong path here, however this does feel to be an issue of login versus non-login shells. Try a bash -l (dash lower case L)
I am sure the login/non-login thing has been discussed on here recently. On 17 August 2017 at 01:56, Lachlan Musicman <data...@gmail.com> wrote: > Hola, > > I was under the impression that environments travelled with slurm when > sbatch was executed - so any node could execute any code as if it was the > env I executed from or built within my sbatch scripts. > > We use Environment Modules and this has all worked just great. Very > pleased. > > Recently I learnt about Environment Modules "set-alias" command, which > seemed pretty nifty, especially for java executables that til now had been > wrapped in shell scripts that looked like: > > #/bin/sh > BASEDIR=$(dirname $0) > > if [[ -z "$TMPDIR" ]]; then > TMPDIR=/tmp > fi > > java -Xmx8g -Djava.io.tmpdir=$TMPDIR -jar $BASEDIR/SOFTWARE.jar "$@" > > > > I hated having these shell scripts around because they are messy and > cumbersome. Setting the alias seemed to be the perfect, modularised, > solution. > > set-alias "java -Xmx8g -Djava.io.tmpdir=$TMPDIR -jar $BASEDIR/SOFTWARE.jar" > > But today I have discovered that the alias - while working on the login > node - doesn't work when sent via > > sbatch script.sh > > > Are we doing something wrong, or was I incorrect in thinking that > set-alias was the balm for our shell script mess? > > cheers > L. > > ------ > "The antidote to apocalypticism is *apocalyptic civics*. Apocalyptic > civics is the insistence that we cannot ignore the truth, nor should we > panic about it. It is a shared consciousness that our institutions have > failed and our ecosystem is collapsing, yet we are still here — and we are > creative agents who can shape our destinies. Apocalyptic civics is the > conviction that the only way out is through, and the only way through is > together. " > > *Greg Bloom* @greggish https://twitter.com/greggish/ > status/873177525903609857 >