diff --git a/README.md b/README.md index e0fe41c..d239710 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ runs: path: /work/cjs14/yaml_test process: + qsub: cores_per_node: 16 nnodes: 1 walltime: 1:00:00 @@ -171,6 +172,16 @@ Note1: all relative paths are resolved relative to the execution directory, unle Note2: For the above example, if a script or cmndline has `@v{file1}` in it (rather than `@f{file1}`), then this would be replaced with the file name (rather than its content), i.e. input.txt +Note3: Within `qsub: run:`, the keyword `@{wrkpath}` will be replaced with the working folder path. +This is handy, for instance, to maintain a dynamic log file in the work path, while the program is running in a temporary folder, e,g, + +```yaml +process: + qsub: + start_in_temp: true + run: + - my_program > @{wrkpath}/output.log +``` Outputs ------- diff --git a/atomic_hpc/__init__.py b/atomic_hpc/__init__.py index 27861c5..3876e03 100644 --- a/atomic_hpc/__init__.py +++ b/atomic_hpc/__init__.py @@ -1,4 +1,4 @@ from atomic_hpc import config_yaml, deploy_runs, mockssh, context_folder, utils -__version__ = "0.2.4" +__version__ = "0.2.5" diff --git a/atomic_hpc/deploy_runs.py b/atomic_hpc/deploy_runs.py index 7e56c90..a32d784 100644 --- a/atomic_hpc/deploy_runs.py +++ b/atomic_hpc/deploy_runs.py @@ -555,7 +555,7 @@ def _create_qsub(run, wrkpath, cmnds): start_in_temp = "true" if qsub["start_in_temp"] else "false" # exec runs - exec_run = "\n".join(cmnds) + exec_run = "\n".join(cmnds).replace("@{wrkpath}", wrkpath) # remove rmlist = []