@@ -1158,14 +1158,60 @@ def get_script_common_text(this: str, example: Optional[str] = None):
1158
1158
.. versionadded:: 8.3.0
1159
1159
''' )
1160
1160
Conf ('platform' , VDR .V_STRING , desc = '''
1161
- The name of a compute resource defined in
1162
- :cylc:conf:`global.cylc[platforms]` or
1163
- :cylc:conf:`global.cylc[platform groups]`.
1161
+ The platform to submit jobs to.
1164
1162
1165
- The platform specifies the host(s) that the tasks' jobs
1163
+ The
1164
+ :cylc:conf:`platform <global.cylc[platforms][<platform name>]>`
1165
+ specifies the host(s) that the tasks' jobs
1166
1166
will run on and where (if necessary) files need to be
1167
1167
installed, and what job runner will be used.
1168
1168
1169
+ This can be:
1170
+
1171
+ * A :cylc:conf:`platform <global.cylc[platforms]>`,
1172
+ * a :cylc:conf:`platform group <global.cylc[platform groups]>`,
1173
+ * or a command which returns a platform or platform group.
1174
+
1175
+ To see what platforms have been configured at your site, run
1176
+ ``cylc config --platform-names``.
1177
+
1178
+ .. rubric:: Commands:
1179
+
1180
+ The ``platform`` can be set to a command which returns the name
1181
+ of the platform to submit jobs to using the ``$()`` syntax,
1182
+ i.e:
1183
+
1184
+ .. code-block:: cylc
1185
+
1186
+ platform = $(command)
1187
+
1188
+ The configured command will be evaulated for each job
1189
+ submission (i.e, different submissions of the same task may
1190
+ submit on different platforms).
1191
+
1192
+ Cylc batches job submissions, so when multiple jobs are
1193
+ submitted at the same time, using a platform defined by the
1194
+ same command, the command will be run once, and all jobs in the
1195
+ batch will submit to the same platform.
1196
+
1197
+ Note: do not use a command to configure a list of login nodes.
1198
+ Instead, define a platform and configure the login nodes it
1199
+ can use; see
1200
+ :ref:`config.platforms.cluster_with_multiple_login_nodes`.
1201
+
1202
+ .. rubric:: Examples:
1203
+
1204
+ .. code-block:: cylc
1205
+
1206
+ # run the job on the same host the Cylc scheduler runs on
1207
+ platform = localhost
1208
+
1209
+ # run the job on a platform (or platform group) called hpc
1210
+ platform = hpc
1211
+
1212
+ # run a command to select the platform (or platform group):
1213
+ platform = $(select-platform)
1214
+
1169
1215
.. versionadded:: 8.0.0
1170
1216
''' )
1171
1217
Conf ('inherit' , VDR .V_STRING_LIST , desc = '''
0 commit comments