Rose User Guide: Quiz

Introduction

This is a test to see how much Rose/cylc knowledge you've absorbed.

You should be familiar with all the content in the Rose User Guide.

Questions

  1. Rose is:

    a framework for managing and running suites of scientific applications

  2. cylc is:

    a suite engine - also called a metascheduler

  3. A user configuration for Rose is stored in:

    ~/.metomi/rose.conf

  4. You can create a new suite with:

    rosie create

  5. The sub-directory of a suite that holds Rose application configurations is called:

    app/

  6. rose-suite.conf files are for:

    jinja2 templating and installing files

  7. rose edit cannot:

    commit changes to version control

  8. We need an app config in Rose that will produce a file output.nl containing the following text:

    &spaghetti
    l_meat_ok=.true.,
    number_of_meatballs=3,
    /
    
    &salad
    cherry_tomatoes=4
    rocket=30,
    /
    

    Which rose-app.conf file will produce the correct output at runtime?

    [file[nl]:output.nl]
    namelists=spaghetti, salad
    
    [nl:spaghetti]
    l_meat_ok=.true.
    number_of_meatballs=3
    
    [nl:salad]
    cherry_tomatoes=4
    rocket=30
    
    [output.nl]
    content=spaghetti, salad
    
    [spaghetti]
    l_meat_ok=.true.
    number_of_meatballs=3
    
    [salad]
    cherry_tomatoes=4
    rocket=30
    
    [file:output.nl]
    source=namelist:spaghetti namelist:salad
    
    [namelist:spaghetti]
    l_meat_ok=.true.
    number_of_meatballs=3
    
    [namelist:salad]
    cherry_tomatoes=4
    !goats_cheese=2
    rocket=30
    
    [namelist:spaghetti]
    __files__=output.nl
    l_meat_ok=.true.
    number_of_meatballs=3
    
    [namelist:salad]
    __files__=output.nl
    cherry_tomatoes=4
    rocket=30
    

    [file:output.nl].... - note that goats_cheese is user-ignored and won't be output at runtime.

  9. What is the command to recursively prettyprint Rose configurations?

    rose config-dump

  10. In a Rose metadata configuration file, what does setting compulsory=true for an app configuration option imply?

    it should be in the app configuration if its parent section is present

  11. Which metadata option best matches the following description?

    Used to order and group pages and variables in the config editor

    sort-key

  12. Which metadata option best matches the following description?

    Specify a regular expression that the value of the setting must match.

    pattern

  13. Which metadata option best matches the following description?

    If not present, the setting is assumed to be a scalar. A positive integer defines a fixed length array. A colon : defines a dynamic length array.

    length

  14. I have the following metadata for one of my inputs:

    [namelist:foo=bar]
    fail-if=this > 0 and (all(namelist:foo=baz == 0))
    

    Which application configuration settings would cause the fail-if checking to throw an error?

    [namelist:foo]
    bar=1
    baz=0, 0
    
    [namelist:foo]
    bar=1
    
    [namelist:foo]
    bar=0
    baz=1, 0
    
    [namelist:foo]
    bar=0
    baz=1, 1
    

    bar=1, baz=0, 0 - it throws an error if the expression evaluates true - i.e. bar > 0 AND all elements in baz are 0. Missing options, as in the second answer, cause the check to be skipped.

  15. I have the following metadata for an app configuration:

    [env=A]
    trigger=env=Z: 20, 30
    
    [env=Z]
    

    In which app configuration is env=Z in the correct state?

    [env]
    Z=0
    
    [env]
    A=20
    !!Z=0
    
    [env]
    A=30
    Z=0
    
    [env]
    A=40
    Z=0
    

    A=30... - Z will only be enabled if A is present, enabled, and either 20 or 30.

  16. I have a flawed metadata file, that looks like this:

    [namelist:foo=bar]
    description=Bar, for controlling foo things.
    help=Bar, part of the legendary made up variable family of foo, bar,
        =baz, qux, quux, corge, grault, garply, waldo, wibble, wobble,
        =wubble, fred, and flob.
        =
        =See http://en.wikipedia.org/wiki/Metasyntactic_variable .
    trigger=namelist:spam=eggs: this < 0
    type=integer
    values=-1, 2, 10
    warn-if=True
    

    Which metadata option is definitely not needed?

    type - the values option supersedes other value definition options such as type, range, and pattern. warn-if=True is a valid way of warning a user when the setting is included in their configuration - for example, if it is deprecated. It would usually include a comment - e.g. warn-if=True #Deprecated..

  17. Which metadata setting, in the above example, will always lead to an error?

    trigger - the option namelist:spam=eggs is not defined in the metadata

  18. Rose macros are used to:

    Check and apply changes to Rose configurations

  19. Output for Rose suites is usually under:

    $HOME/cylc-run/

  20. The share/ subdirectory in a suite's output directory is for:

    any files that need to be shared between tasks

  21. Running the rosie go command:

    launches a discovery GUI

  22. We're searching for suites using rosie. We want every suite with Case Study in the title and where either the owner or the commit author was bob, across revisions. What is the correct command to run?

    rosie ls --title='Case Study' --username=bob --all
    
    rosie lookup --allrevs 'Case Study' bob
    
    rosie ls --all -Q 'Case Study' in title and \
     'bob' from \[author, owner\]
    
    rosie lookup --all-revs -Q title contains 'Case Study' and \
     \( owner eq bob or author eq bob \)
    

    rosie lookup --all-revs -Q ...

  23. Which of the following is considered bad practice for suite design?

    Magical, black box tasks with suite-level functionality

  24. I have a suite.rc file with the following scheduling section:

    [cylc]
        UTC mode = True
    [scheduling]
        initial cycle point = 20140105T00Z
        final cycle point = 20140107T00Z
        [[dependencies]]
            [[[T00, T12]]]
                graph = """
                    a => b
                """
            [[[T06]]]
                graph = """
                    b
                """
    

    How many times will the task b run?

    7: at 20140105T0000Z, 20140105T0600Z, 20140105T1200Z, 20140106T0000Z, 20140106T0600Z, 20140106T1200Z, 20140107T0000Z

  25. Task A runs if and only if B succeeds and C fails. Which is the correct suite.rc graph configuration entry?

    graph = """
        A => B & C:fail
    """
    
    graph = """
        B => C => A
    """
    
    graph = """
        B & C:fail => A
    """
    
    graph = """
        B and not C => A
    """
    

    B & C:fail => A

  26. Which of the following is a valid cylc suicide trigger?

    graph = """
        A:kill => B
    """
    
    graph = """
        A murders B
    """
    
    graph = """
        A => !B
    """
    
    graph = """
        A:fail => B
    """
    

    A => !B

  27. What does the environment variable ROSE_ORIG_HOST identify?

    the host that invoked rose suite-run

  28. Which of the following are Rose built-in apps?

    rose_ana, fcm_make - these are built in apps that you can reference in a suite.rc.

  29. How can you run a suite to completion to check dependencies, without actually running tasks and apps?

    rose suite-run -- --mode=simulation - options following -- are passed directly to cylc run.

Answers