Skip to content

Commit

Permalink
Add --extra-args flag example in docs and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cl3to authored and rodrigo-ceccato committed Oct 11, 2024
1 parent fdee1ae commit 8ba9960
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/bench-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Timeout test
run: |
spinner -c docs/examples/timeout_test.yaml -r
- name: Extra Args test
run: |
spinner -c docs/examples/extra_args.yaml -r --extra-args "extra_time=4"
- name: Capture output test
run: |
spinner -c docs/examples/capture_output.yaml -r -e
Expand Down
17 changes: 17 additions & 0 deletions docs/examples/extra_args.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
metadata:
description: Sleep check using --extra-args flag
version: "1.0"
runs: 1
timeout: 10
retry: True
retry_limit: 1

sleep_test:
command:
template: >
sleep {{sleep_ammount + (extra_time | int)}}
sleep_test:
sleep_ammount:
- 1
- 2
4 changes: 2 additions & 2 deletions docs/slurm.MD
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set -e
# Load required modules
module purge
module load cmake/3.27.9
module load mpich/4.0.2-cuda-12.4.0-ucx
module load mpich/4.0.2
module load singularity/3.7.1

# Load Spinner env
Expand All @@ -24,6 +24,6 @@ source spinner/.venv/bin/activate
# Get MPI host lsit from Slurm and format it for MPI
host_list=$(scontrol show hostname $(echo "$SLURM_JOB_NODELIST" | head -n 4 | tr '\n' ',' | sed 's/,$//'))

spinner -c bench_settings.yaml -r T -e T --hosts $host_list
spinner -c bench_settings.yaml -r -e -o mpi_bench.pkl --extra-args "hosts=$host_list"

```

0 comments on commit 8ba9960

Please sign in to comment.