Coder Social home page Coder Social logo

cylc_patterns's Introduction

cylc_patterns

A collection of commonly used Cylc workflow patterns

Overview

This project contains a number of commonly used workflow patterns, which range from sequential to concurrent and more elaborate patterns. These patterns are the building blocks with which complex workflows can be assembled.

Preliminaries

Assuming yopu're running on Linux or Mac OSX, you will need to have Cylc 8 installed,

conda create -n cylc python=3.9
conda activate cylc
conda install -c conda-forge cylc-flow
conda install -c conda-forge cylc-uiserver

Mac users beware, you may need to apply the fix here.

Example of a workflow pattern

Go into any of the subdirectories, e.g.

cd cycl-src/resilient_cycling
cylc validate .
cylc graph .

This shows the first three cylcles of the resilient cylcing pattern. The worflow graph is encoded in the flow.cylc file.

    [[graph]]
        R1 = """
            prep => check?
        """
        P1 = """
            model[-P1] => check:succeed? => model
            check:fail? => diagnose
        """

The first task, prep, creates a file, output_file.txt. If file output_file.txt is present then task check succeeds and task model is then run. Occasionally, task model will fail -- we allow for up to 20 attempts. When task check succeeds, the next cycle starts. If task check fails then task diagnose will be run. This workflow supports an inifite number of cycles.

alt resilient cycling pattern

Install the worflow with

cylc install resilient_cycling

Run the workflow with

cylc tui resilient_cycling

Type return on the workflow_name/run1 and then select "play". The figure below shows the model task (blue square) of the 48th cycle being run with the 49th cycle check waiting for the model task to complete. The green square indicates that 48th check task was successful.

alt terminal user interface (tui) showing a cycle of the resilient cycling pattern

Troubleshooting

Mac users

If you get error

...
nodename nor servname provided, or not known: '1.0.0.127.in-addr.arpa'

or similar, then you'll have to update the hostuserutil.py file. Around line 113, replace

                target = socket.getfqdn()

with

                target = socket.gethostname()

cylc_patterns's People

Contributors

pletzer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.