Skip to content

Commit

Permalink
Avoid 'module: command not found' error (#60)
Browse files Browse the repository at this point in the history
That error only happens when the user's default shell is /bin/csh on one
HPC. This is one way to fix the problem; the other involves adding a
"#PBS -S /bin/bash" line to the PBS script.
  • Loading branch information
araglu authored Jul 22, 2024
1 parent cf531bc commit 02a4d02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uit/pbs_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ def render_modules_block(self):
Returns:
str: All module calls.
"""
opt_list = [self._create_block_header_string('Modules')]
opt_list = [self._create_block_header_string('Modules'),
"# Avoid 'module: command not found' error when default shell is /bin/csh",
"source ${MODULESHOME}/init/bash"]
for path in self._module_use:
opt_list.append(f'module use --append {path}')
for key, value in self._modules.items():
Expand Down

0 comments on commit 02a4d02

Please sign in to comment.