Skip to content

Commit

Permalink
Add demo script.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed May 11, 2024
1 parent 2e264b0 commit 2dedb35
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/target
/workspace
/workflow.toml
/.row
/.signac
workspace
.row
.signac
19 changes: 19 additions & 0 deletions demo/demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
mkdir workspace || exit 1
cd workspace

for i in {1..100}
do
mkdir dir$i || exit 1
v=$((1 + RANDOM % 1000))
echo "{\"value\": $v}" > dir$i/value.json || exit 1
done

row submit --cluster none --action=initialize -n 5 --yes || exit 1

row submit --cluster none --action=step1 -n 1 --yes || exit 1

row submit --action=step1 -n 1 --yes || exit 1

row show status || exit 1

row show directories step1 -n 3
24 changes: 24 additions & 0 deletions demo/workflow.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[workspace]
value_file = "value.json"

[[action]]
name = "initialize"
command = "touch workspace/{directory}/initialize.out"
products = ["initialize.out"]
resources.walltime.per_directory = "00:10:00"
group.maximum_size = 10

[[action]]
name = "step1"
command = "touch workspace/{directory}/step1.out"
products = ["step1.out"]
resources.walltime.per_directory = "1 day, 00:00:00"
group.maximum_size = 10

[[action]]
name = "step2"
command = "touch workspace/{directory}/step2.out"
products = ["step2.out"]
resources.walltime.per_directory = "08:00:00"
resources.gpus_per_process = 1
group.maximum_size = 10

0 comments on commit 2dedb35

Please sign in to comment.