@@ -18,6 +18,53 @@ creating jobspecs directly.)
1818On the command line, set the ``.attributes.system.dw `` field by passing flags
1919like ``-S dw="my_string" `` or ``--setattr=dw="my_string" ``.
2020
21+ The simplest way to use rabbits is to use preset DW strings that
22+ administrators may have configured on a system. For more flexibility,
23+ it may be desirable to write custom DW strings.
24+
25+
26+ Preset DW Directives
27+ --------------------
28+
29+ Running
30+
31+ .. code-block :: bash
32+
33+ flux config get rabbit.presets | jq .
34+
35+ will display a mapping of the presets that have been configured on the
36+ current system. The keys of the mapping are the strings that you can
37+ pass to ``-S dw=... ``, the values of the mapping are the actual DW directives
38+ the strings correspond to.
39+
40+
41+ Preset Example
42+ ~~~~~~~~~~~~~~
43+
44+ Suppose ``flux config get rabbit.presets | jq . `` returns the following:
45+
46+ .. code-block :: json
47+
48+ {
49+ "xfs_small" : " #DW jobdw type=xfs capacity=256GiB name=xfssmall" ,
50+ "xfs_large" : " #DW jobdw type=xfs capacity=1TiB name=xfslarge" ,
51+ "lustre_large" : " #DW jobdw type=lustre capacity=10TiB name=lustrelarge" ,
52+ }
53+
54+ Then you should be able to add the flag ``-S dw=lustre_large `` to
55+ ``flux run/batch/alloc/submit `` and have 10 Terabytes of lustre storage
56+ accessible to your job at a path given by the ``$DW_JOB_lustrelarge ``
57+ environment variable. Similarly, ``-S dw=xfs_small `` and ``-S dw=xfs_large ``
58+ would give your job 256 gigabytes and 1 terabyte of XFS storage at
59+ ``$DW_JOB_xfssmall `` and ``$DW_JOB_xfslarge ``, respectively.
60+
61+
62+ Custom DW Directives
63+ --------------------
64+
65+ Writing custom DW directives instead of using preset strings allows for much
66+ greater flexibility.
67+
2168DW directives are strings that start with ``#DW ``. Directives
2269that begin with ``#DW jobdw `` are for requesting storage that
2370lasts the lifetime of the associated flux job. Directives that
@@ -30,8 +77,8 @@ Full documentation of the DW directives and their arguments is available
3077The usage with Flux is most easily understood by example.
3178
3279
33- Examples of jobdw directives
34- ----------------------------
80+ Examples of custom jobdw directives
81+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3582
3683Requesting a 10 gigabyte XFS file system per compute node on the
3784command line:
@@ -59,7 +106,7 @@ Requesting both XFS and lustre file systems in a batch script:
59106
60107
61108 Data Movement Examples
62- ----------------------
109+ ~~~~~~~~~~~~~~~~~~~~~~
63110
64111.. warning ::
65112
0 commit comments