Rose & Cylc Rose suites 09/02/2016 by Joao Teixeira.

Slides:



Advertisements
Similar presentations
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Advertisements

Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
Guide To UNIX Using Linux Third Edition
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 5: User Environment and Multiple Languages.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
MARC 10.5 Update John Harvey. MARC 10.5 Changes  Backup Scripts restructured  Added a script to generate scripts outside of MARC  Generate Scripts.
® IBM Software Group © 2009 IBM Corporation Rational Publishing Engine RQM Multi Level Report Tutorial David Rennie, IBM Rational Services A/NZ
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
Microsoft ® Official Course Module XA Using Windows PowerShell ®
LOGO Scheduling system for distributed MPD data processing Gertsenberger K. V. Joint Institute for Nuclear Research, Dubna.
Appendix A Starting Out with Windows PowerShell™ 2.0.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Oracle Data Integrator Procedures, Advanced Workflows.
SAN DIEGO SUPERCOMPUTER CENTER Inca Control Infrastructure Shava Smallen Inca Workshop September 4, 2008.
INFSO-RI Enabling Grids for E-sciencE Ganga 4 – The Ganga Evolution Andrew Maier.
© 2012 LogiGear Corporation. All Rights Reserved FitNesseFitNesse Authors: Nghia Pham 1.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Transportation Agenda 165. Transportation About Pages Pages organize and present information Pages are files that end in.aspx 166.
PHP Form Processing * referenced from
Review Please turn in your homework and practicals Packages, installation, rpm command Apache – Quick and easy way to set up a web server to play around.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
Advanced Taverna Aleksandra Pawlik University of Manchester materials by Katy Wolstencroft, Aleksandra Pawlik, Alan Williams
Grid Computing: An Overview and Tutorial Kenny Daily BIT Presentation 22/09/2016.
Emdeon Office Batch Management Services This document provides detailed information on Batch Import Services and other Batch features.
Advanced Computing Facility Introduction
LINGO TUTORIAL.
Managing, Storing, and Executing DTS Packages
Development Environment
Introduction to the new robust security system from SCC.
Project Management: Messages
Autodesk Inventor 2008 Essentials Plus
Release Numbers MATLAB is updated regularly
SQL and SQL*Plus Interaction
Matlab Training Session 4: Control, Flow and Functions
Topics Introduction to Repetition Structures
Chapter 2: System Structures
Building the UM within Rose/Cylc
Deploying and Configuring SSIS Packages
Arrays and files BIS1523 – Lecture 15.
Introduction to XHTML.
Microsoft Access Illustrated
Algorithm and Ambiguity
Intro to PHP & Variables
Complete Management of your Entire Backflow Program
PL/SQL Scripting in Oracle:
Computer Programming.
This is the cover slide..
Topics Introduction to File Input and Output
Exploring Microsoft Excel
How to Run a Java Program
Building Web Applications
Topics Introduction Hardware and Software How Computers Store Data
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
UM Practical Exercises
Informatica & ETL Testing
Algorithm and Ambiguity
Smart Integration Express
Introduction to the Rose suite
Exploring the Power of EPDM Tasks Working with and Developing Tasks in SolidWorks Enterprise PDM (EPDM) By: Marc Young xLM Solutions
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
Automating SAS through the Power of VB Script
Dtk-tools Benoit Raybaud, Research Software Manager.
CSE 303 Concepts and Tools for Software Development
Rational Publishing Engine RQM Multi Level Report Tutorial
Introduction to Programming and JavaScript
Topics Introduction to File Input and Output
Presentation transcript:

Rose & Cylc Rose suites 09/02/2016 by Joao Teixeira

Contents Overview of Rose and Cylc Metadata configuration Cylc in Rose What we’ll cover … Overview of Rose and Cylc What’s Rose ? What’s Cylc ? Hands on!!! Metadata configuration Introduction Creating Metadata Cylc in Rose Cylc controls Q & A

Overview of Rose & Cylc What is this?

What does Rose look like? What’s Rose? What does Rose look like? Rose is a group of utilities provides a common way to manage development run software Research Production It can be used for (almost) anything It is not specific to any type of: Language Application etc... Uses human readable and writable file formats Rosie – system for managing suites

What does Cylc look like ? What’s Cylc? What does Cylc look like ? workflow engine and meta-scheduler specialises in continuous workflows of cycling tasks It can be used for non-cycling tasks Scheduler used by Rose to control tasks Configured via a suite.rc file that lives in the top directory of a Rose suite Clever algorithm for deciding when applications are ready to run

What is a Rose Application Configuration? An app config: Can define how to run a scientific model Describes how to run a command (executable or script to call, environment variables, input files) Not tied to a version of the model or a GUI Simple to process and run Simple to: edit compare review

What is a Rose Application Configuration? xx-aa000 |---- app/ | | | |---- um/ | | |----- rose-app.conf | | | | | |----- bin/ | | |----- meta/ | | |----- opt/ Configuring which: Executable to run Environment Input files (e.g. Namelists) May not be present

What is a Rose Application Configuration? example of a rose-app.conf file: When Rose runs the app, it creates a file hello.nl that looks like this: and runs hello.exe with the environment variable SUBJECT set to world

App configs can have metadata Rose Application App configs can have metadata Metadata is: a way of providing information about app config inputs used to drive the rose edit GUI for editing app configs (not part of the GUI itself) a simple specification defined in a similar format to the app config. Metadata sometimes lives in the meta/ directory of an app config, but more often in a shared central location

Rose A Brief Tour Lets get “hands on” with Rose http://metomi.github.io/rose/doc/rose-rug-brief-tour.html Go trough the practical with them

Configuration Metadata information about settings in Rose configurations

Rose Metadata Introduction Metadata is used to provide information : Help document your inputs Perform automatic checking (including whether an input is needed) Enhance the interface to your configurations (e.g. the Rose config editor)

Rose Metadata Creating metadata Lets use the Rose example suite our hands on: We are going to develop metadata for the app my_hello_mars Change directory to the suite app/my_hello_mars/ The rose-app.conf file contains the following: This configuration will run hello.exe with some environment variables set up: MAX_TARGETS, LANG_JUPITER, and WORLD

Rose Metadata Creating metadata Compare the text in the rose-app.conf with the one in the Rose GUI

Let’s create the metadata Rose Metadata Let’s create the metadata ... for a variable called MAX_TARGETS: We can specify that it's an integer by giving it a type: We could also improve the way it's displayed by giving it a title: We can restrict the number using a range:

Rose Metadata rose metadata-check rose metadata-check checks the syntax errors in the metadata Automatically run when the rose editor loads Can be run from the command line in a metadata directory Try setting an invalid entry in the metadata e.g.: What happens in the GUI?

Reference to metadata location... Rose Metadata Reference to metadata location... Metadata for rose-suite.conf and rose-app.conf settings can be referenced by the meta flag You can store metadata in other locations --meta-path=PATH option ROSE_META_PATH environment variable meta-path setting in user configurations Usually references centrally-stored metadata

Advanced Configuration Metadata Rose Metadata Advanced Configuration Metadata Metadata supports logical expression syntax, e.g: Range Trigger The syntax is a subset of Python with some extra metadata functionality - you can use standard Python operators e.g.:(foo * bar + baz) / wibble >= wobble - flob ** quxor"spam" in foo and not bar or (baz and 5 < wibble <= wobble)Where you would normally use a variable name, use an id to refer to the value of a setting (e.g. namelist:run_snow=max_ok_ice_fraction) or use this as a shorthand for the id of this setting.The syntax also has array element support via bracketed indices (e.g. this(2) or namelist:run_snow=monthly_snowfall(12)).There are any and all functions (e.g. any(namelist:run_snow=monthly_snowfall > 10)). Warn-if Syntax is a subset of Python with extra metadata functionality You can use standard Python operators

Advanced Configuration Metadata Rose Metadata Advanced Configuration Metadata Other useful configuration options are available : compulsory Setting it to true means that the section should always be in the configuration duplicate Allow duplicated copies of the setting sort-key Used to order and group pages and variables in the config editor value-titles Allows you to set a title to display for each of the values macro Used to associate a setting with a set of custom macros

More about Metadata Advanced exercises... More examples of metadata: http://metomi.github.io/rose/doc/rose-rug-metadata-tutorial.html http://metomi.github.io/rose/doc/rose.html#advanced UM Metadata (all version) https://code.metoffice.gov.uk/svn/um/main/trunk/rose-meta/um-atmos/

Cylc in Rose The scheduler

Suite engine that drives task submission and monitoring Cylc Suite engine that drives task submission and monitoring Originally developed by Hilary Oliver at NIWA Developed to provide a fast, automated way of scheduling tasks so that a suite can catch up after outages Currently Acollaborative effort, involving the Met Office Written in Python and uses PyGTK for its GUIs It is open source and licensed under GPL v3 Lives on github The syntax is a subset of Python with some extra metadata functionality - you can use standard Python operators e.g.:(foo * bar + baz) / wibble >= wobble - flob ** quxor"spam" in foo and not bar or (baz and 5 < wibble <= wobble)Where you would normally use a variable name, use an id to refer to the value of a setting (e.g. namelist:run_snow=max_ok_ice_fraction) or use this as a shorthand for the id of this setting.The syntax also has array element support via bracketed indices (e.g. this(2) or namelist:run_snow=monthly_snowfall(12)).There are any and all functions (e.g. any(namelist:run_snow=monthly_snowfall > 10)).

Cylc Scheduling Algorithm Scheduling - making sure tasks run in the correct order, at the correct time Every task has input and output dependencies Each task checks the others to see if its inputs are satisfied - if so, it runs

Cylc The suite.rc File Cylc has a single file to configure the suite, the suite.rc file It configures: Task dependencies, including times and dates Task environment Task scripting Uses a nested INI-based configuration format that looks like this:

Cylc Hands on... Let’s create something simple... Tasks such as our hello_world task above are generic - they can be Rose applications, or commands or executables as above. The suite will run and then shutdown when all tasks are successful in this case, the only task is hello_world Output will be in our cylc-run directory access it by running rose suite-log --name=simplesuite

Invoke a Rose application Cylc Invoke a Rose application What if we wanted to invoke a Rose application make an app called hello_world making an app/hello_world/ directory creating a rose-app.conf file in there Set the command in rose-app.conf file We would then have to change the [runtime] section – pointing it to the rose task

Cylc Families Families define shared configuration Can be used to reduce duplication between tasks Possible to override family settings Multiple inheritance Can be used to help write the dependencies e.g. to set up a task so that it runs when all the tasks in a family succeed

Reference to single application, app/hello_world/ using ROSE_TASK_APP Cylc Sharing Applications If we don't really need two Rose apps (app/hello_eris/ and app/hello_pluto/) We can create two tasks that share a single family In the last example, if we don't really need two Rose applications, (app/hello_eris/ and app/hello_pluto/) we can create two tasks that share a single application, with some override settings - in this example, a WORLD environment variable.We can reference our single application, app/hello_world/ by using ROSE_TASK_APP. rose task-run will read this environment variable value and use it to run the Rose app. We will put the override setting (WORLD) in the suite.rc file. Reference to single application, app/hello_world/ using ROSE_TASK_APP

Multiple Family Inheritance Cylc Multiple Family Inheritance cylc supports multiple inheritance Tasks can combine the configuration from more than one family can be inherit them like this:

Cylc Remote Hosts The example tasks run on the localhost tasks can be run on a remote host (e.g. compute server or a cluster/ supercomputer) We can set hello_eris to run on a given host by setting [[[remote]]] section settings: So far, the example tasks run on the localhost - it is usually better to farm off tasks to a remote host like a compute server or a cluster/supercomputer.We could set hello_eris to run on a given host by setting [[[remote]]] section settings: The order in which they are combined is essentially last to first - e.g. HELLO_FAMILY will override any shared setting in GAS_GIANT_FAMILY. The order in which they are combined is essentially last to first e.g. HELLO_FAMILY will override any shared setting in GAS_GIANT_FAMILY

Dependencies and scheduling Cylc Dependencies and scheduling The [scheduling] part of the suite.rc Let's say hello_pluto must run and succeed before hello_eris We can put this in our suite.rc: Cycling Dependencies We can make this run as a cycling suite, repeating every 12 hours:

Jinja2 templating language cylc uses a templating language called Jinja2 Can be used to: collapse duplicated portions of configuration Insert settings Useful when you have a lot of repetition (e.g. in an ensemble context) You can use if and for blocks, amongst other things:

centralise commonly-used settings Rose – Cylc – Jinja2 centralise commonly-used settings You can use Jinja2 to centralise commonly-used settings. Rose supports storing these in the rose-suite.conf file - e.g. Rose passes variables in this section into the Jinja2 template at runtime. This means that we can have a suite.rc snippet that looks like this: It's useful to keep commonly-changed variables in the rose-suite.conf file, so users don't have to modify the suite.rc itself.

Event Hooks and UTC mode Cylc Event Hooks and UTC mode Suites can have event handlers to report events or shutdown on failure It is recommend running all suites in UTC mode If abort if any task fails = True is not commented, the suite will abort when a task fails When a task fails, the suite will continue to run as much as possible and wait for user input to fix the failure so it can continue If abort if any task fails = True is not commented out, the suite will abort as soon as a task fails The events should be adjusted if necessary - for example, increasing the timeout lengths or altering the events that require email notification. Suites can also be configured to email you on specific events

Cylc Job Submission Example of a job submission method, such as using PBS The job submission method may need configuration via directives: cylc supports the following job submission methods (and more): at background (default) Loadleveler pbs (Portable Batch System) sge (Sun Oracle Grid Engine) slurm (not the fictional soft drink) lsf ...

Building a Suite Practical Let’s get “hands on” with Rose and Cylc http://metomi.github.io/rose/doc/rose-rug-suite-writing-tutorial.html

Online tutorials and documentations ... Useful links Online tutorials and documentations ... Rose https://github.com/metomi/rose http://metomi.github.io/rose/doc/rose.html Cylc https://github.com/cylc/cylc http://cylc.github.io/cylc FCM http://metomi.github.io/fcm/doc/user_guide MOSRS https://code.metoffice.gov.uk roses-u https://code.metoffice.gov.uk/trac/roses-u

Questions … ?