Twitter Updates

Monday, 13 April 2009

module load fail when scripted

The following works on the command line
[1]$ module load something
but fails with [2] when used in make, bash, etc script files:
[2]> module: command not found

This is because the module enviroment has not been loaded, as it is for a normal user session.
Try using some thing similar to this before your module load call:
#!/bin/bash

. /usr/share/modules/init/bash
module load something

No comments: