Error importing function definition for `BASH FUNC module'
If you attempt to load modules in your script you might see errors like:
sh: module: line 1: syntax error: unexpected end of file sh: error importing function definition for `BASH_FUNC_module' bash: module: line 1: syntax error: unexpected end of file bash: error importing function definition for `BASH_FUNC_module'
This is caused by the module command relying on a "feature" of bash which later turned out to be a security vulnerability and was removed from the version of bash we have. To work around this, in your job script change:
#$ -S /bin/bash
to
#$ -S /bin/sh