Remove all unnecessary modules. A job script should always start with
module load <only modules really required for this job>
to ensure a clean environment:.
Remember: whenever you load modules while you are on a login node, any job submitted from this modified environment will inherit these modules' settings!
Therefore, it is strongly recommended to use the above purging/loading statement in all job scripts.
Next, scrutinize your program's runtime libraries (“shared objects”) with
ldd -v /path/to/binary
$LD_LIBRARY_PATH might contain an unwanted directory, causing your program to load wrong or outdated libraries, which in fact should rather be coming from the modules you have loaded.
Particularly, the infamous“
Bus error” can be caused by non-matching arguments or return values between calling binary and called library, thus causing “unaligned” memory access and crashes.