Preview job script in cylc8?


If I want to preview a job script without submitting, how do I do this in Cylc8? In Cylc7 I would do cylc submit --dry-run.


The cylc submit command was removed from Cylc 8.

As I recall, reasons were:

  • The command, which did not operate through the scheduler, was not compatible with the new architecture

  • Even though it did not operate through the scheduler, it contaminated the job log directories and which causes trouble for managing the job submit number. In Cylc 8, the job log tree is maintained more carefully for provenance reasons

I guess we could make some replacement that avoids those problems, but there didn’t seem to be much call for it.

Instead you could make a 2-line change to get the task to submit a local background job that just exits immediately, and trigger it manually (whether in a reloaded live workflow, or a new temporary install of it just for that purpose.

Making it local removes PBS type directives doesn’t it? If so, it’s not going to show what I’m always looking at. I’m thinking of overly complicated inheritance or initial checking of a system if you are charged to submit jobs to a platform and you want a sanity check of some tasks before proceeding.

I should also have said, the historical reason for the existence of cylc submit --dry-run was debugging errors in the job script generation module - i.e., to get it to generate a new job script repeatedly, after tweaking the code, without bothering to start the scheduler. That module has been stable for ages now, we have no reports of any job script bugs.

Making it local removes PBS type directives doesn’t it?

True, but a minor variation on the procedure I described still works. Just temporarily disable the real guts of the task, and submit the job to PBS (change the queue as well, if necessary).

I’m thinking of overly complicated inheritance or initial checking

Do you really need a whole job script for that? cylc config -i [runtime]task-name shows parsed task configuration, including directives, after all inheritance processing.

I didn’t know about that, I’m not that good with the config command. Will explore. Thanks.

To preview the job configuration from the GUI, use the cylc config command OR click on the task → see-more → edit-runtime in the GUI.

This shows you the full [runtime] section for the task complete with directives and scripts (with inheritance and broadcasts applied.

I’m not sure what the use case for previewing the actual job script would be any more. Since Cylc 7 the job script that Cylc generates is really just the job configuration in Bash format, essentially:

# <directives>

pre-script () {

script () {

post-script () {

The actual job script is sourced at the end of this.