From 456a6d6363fe9bbb13126b2944c4e7bf800300b9 Mon Sep 17 00:00:00 2001 From: Jo Basevi Date: Thu, 3 Aug 2023 11:37:18 +1000 Subject: [PATCH] Update documentation to include module use and load options --- .gitignore | 1 + docs/source/config.rst | 16 ++++++++++------ test/test_payu.py | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 47c37851..808b5549 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ MANIFEST .coverage .ipynb_checkpoints .vscode +.idea /test/tmp/ \ No newline at end of file diff --git a/docs/source/config.rst b/docs/source/config.rst index bc9a9e9d..e9c3c4d9 100644 --- a/docs/source/config.rst +++ b/docs/source/config.rst @@ -427,17 +427,21 @@ Miscellaneous is generally only used for testing purposes, such as bit reproducibility. ``modules`` - Specify a list of environment modules to load at the start of the PBS job, - for example:: + Specify lists of environment modules and/or directories + to load/use at the start of the PBS job, for example:: modules: - - netcdf-c-4.9.0 - - parallel-netcdf-1.12.3 - - xerces-c-3.2.3 + use: + - /path/to/module/directory + load: + - netcdf-c-4.9.0 + - parallel-netcdf-1.12.3 + - xerces-c-3.2.3 This is seldom needed, because payu is good at automatically determining the environment modules required by model executables. If the modules - require `module use` inorder to be found, do this prior to `payu run`, + require `module use` in order to be found, this command can also be run + prior to `payu run` instead of listing the directory under the `use` option, e.g.:: module use /path/to/module/directory diff --git a/test/test_payu.py b/test/test_payu.py index 56835be0..8a6d4065 100644 --- a/test/test_payu.py +++ b/test/test_payu.py @@ -245,8 +245,8 @@ def test_parse_ldd_output(): with open(ldd_output_path, 'r') as f: ldd_output = f.read() required_libs = payu.fsops.parse_ldd_output(ldd_output) - assert(len(required_libs), 4) - assert(required_libs['libmpi.so.40'], '/apps/openmpi/4.0.2/lib/libmpi.so.40') + assert(len(required_libs) == 4) + assert(required_libs['libmpi.so.40'] == '/apps/openmpi/4.0.2/lib/libmpi.so.40') def test_lib_update_lib_if_required():