Giter Club home page Giter Club logo

crun's Introduction

crun

Run workflow. Generally all parts are sequential executed, and some parts could be done parallelly.

DOWNLOAD

Two editions are provided:

  • [recommended] perl/crun is a Perl script. You may need to install a Perl module by:

    cpan install Parallel::Runner

  • [need more test] go/crun.go is written in Golang, no third-party packages are used. Please use gobuild - Cross-Platform Go Project Compiler to compile it. It's simple and fast!

USAGE

crun OPTIONS...

OPTIONS:

    -c STRING    Add a concurrent command
    -s STRING    Add a sequential command
    -t INT       Maximum concurrency (threads number) [4]
    -stdin       Concurrently run commands from STDIN
    -h           Help message

Note: The order of options decides the work flow! The two cases below are different:

crun -s ls -s date
crun -s date -s ls

EXAMPLE

crun -t 4 -s job1 -c job2 -c job3 -c job4 -s job5 -s job6

The work flow is:

  1. job1 must be executed fist.
  2. job2,3,4 are independent, so they could be executed parallelly.
  3. job5 must wait for job2,3,4 being done.
  4. job6 could not start before job5 done.

See the workflow graph below, long arrow means long excution time.

          |----> job2     |  
job1 ---> |--> job3       | -------> job5 --> job6
          |--------> job4 |

You can also concurrently run commands from STDIN:

cat jobs.list | crun -t 8 -s "echo start" -stdin -s "echo end" 

for f in *.fa; do echo clustalo -i \"$f\" -o \"$f.clustalo\"; done | crun -t 8 -stdin

Copyright

Copyright (c) 2014, Wei Shen ([email protected])

MIT License

crun's People

Contributors

shenwei356 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.