From 2dedb350de33f843ea7ef82a20c244d44b441cc4 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Sat, 11 May 2024 12:22:21 -0400 Subject: [PATCH] Add demo script. --- .gitignore | 6 +++--- demo/demo.sh | 19 +++++++++++++++++++ demo/workflow.toml | 24 ++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 demo/demo.sh create mode 100644 demo/workflow.toml diff --git a/.gitignore b/.gitignore index ea74663..b6e08f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /target -/workspace /workflow.toml -/.row -/.signac +workspace +.row +.signac diff --git a/demo/demo.sh b/demo/demo.sh new file mode 100644 index 0000000..41245ff --- /dev/null +++ b/demo/demo.sh @@ -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 diff --git a/demo/workflow.toml b/demo/workflow.toml new file mode 100644 index 0000000..172aa35 --- /dev/null +++ b/demo/workflow.toml @@ -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