cylc / cylc-flow

Cylc: a workflow engine for cycling systems.
https://cylc.github.io
GNU General Public License v3.0
329 stars 93 forks source link

Better batch system directives configuration. #1560

Closed hjoliver closed 7 years ago

hjoliver commented 9 years ago

The current suite.rc spec doesn't make it easy to switch between different batch systems, because there is only one directives section, which is unlikely to be portable between different job submission methods:

    [[foo]]
         [[[job submission]]]
             method = loadleveler
        [[[directives]]]
             class = General

It would be better to have something like this:

    [[foo]]
         [[[job submission]]]
             method = loadleveler
             #method = pbs
        [[[loadleveler directives]]]
             class = General
        [[[pbs directives]]]
             # ...
matthewrmshin commented 9 years ago

(@dpmatthews and I discussed something like this a few weeks ago, but you have beaten us to raise an issue!)

Is this a desire to allow a suite to be portable to different batch systems within a site, or is it to allow a suite to be portable to different sites? The proposed solution will work for the former, but will not be enough for the latter because:

hjoliver commented 9 years ago

I was thinking within a site, if you happen to have access to several batch schedulers. However, if we can think of a solution that would make it easier to switch between sites, that would be great. I guess that currently requires heavy use of Jinja2 switching and probably include-files.

Maybe we really need something like this?:

[runtime]
   [[foo]]
      script = run-foo
      [[[SITE-A]]]
           # job submission method, directives, hosting, ... for SITE-A
      [[[SITE-B]]]
           # etc.   

That would be a difficult backward compatibility problem, however.

matthewrmshin commented 9 years ago

That would be a difficult backward compatibility problem, however.

We can continue to support the current interface like this:

[runtime]
    [[task1]]
        # Continue to allow non-site-specific stuffs?
        script = command
        [[[job submission]]]
            method = background
        [[[SITE-A]]]
            script = command-only-at-site-a
            [[[[job submission]]]]
                method = pbs
            [[[[remote]]]]
                host = hpc-at-site-a
        [[[SITE-B]]]
            # ... and so on
trwhitcomb commented 9 years ago

With the new parsing that came online a while back allowing suite.rc snippets, there's a really (I think) clean solution to this by refactoring out the specific platform specific information into a separate file. I've been using this to move between systems and it's worked well. Here's what I did:

  1. Define the suite as normal
  2. Then, remove the [[[job submission]]] blocks out to a separate file. I chose to create an inc directory and then have the platform-specific suite.rc snippets in there.
  3. Link the appropriate file to a platform.rc file which is then included in the main suite.rc

For me, I didn't need to worry about switching the entire scheduler but I did need to modify queue information as well as the specific resource requests.

hjoliver commented 8 years ago

[meeting]

matthewrmshin commented 7 years ago

Suite portability related to #1829.

hjoliver commented 7 years ago

Superceded by #2415