Skip to content

Commit

Permalink
added @{wrkpath} keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Apr 25, 2018
1 parent 53987be commit d6e598e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ runs:
path: /work/cjs14/yaml_test

process:
qsub:
cores_per_node: 16
nnodes: 1
walltime: 1:00:00
Expand Down Expand Up @@ -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
-------
Expand Down
2 changes: 1 addition & 1 deletion atomic_hpc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from atomic_hpc import config_yaml, deploy_runs, mockssh, context_folder, utils

__version__ = "0.2.4"
__version__ = "0.2.5"

2 changes: 1 addition & 1 deletion atomic_hpc/deploy_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit d6e598e

Please sign in to comment.