What is causing the sbatch script error "Unknown shell type 'load'"?

If you're getting the error message

init.c(379):ERROR:109: Unknown shell type load

when running your sbatch script, then your script is probably starting with the line


To remedy this you need to make sure that your script starts with

#!/bin/bash -l

I.e. notice the trailing "-l". This tells bash to load the correct environment settings, which makes the module system usable.