I had the following error message when trying to assign a job via Slurm (with Environment Modules installed). Since this has come up a few times for me I thought I would detail the solution:
bash: BASH_FUNC_module(): line 0: syntax error near unexpected token `)' bash: BASH_FUNC_module(): line 0: `BASH_FUNC_module() () { eval `/usr/bin/modulecmd bash $*`' bash: error importing function definition for `BASH_FUNC_module'
This appears to be a problem related to the version of bash (pre shellshock?) so updating bash and/or the whole system should clear the problem:
yum update