Coder Social home page Coder Social logo

ucd-farm-slurm-profile's Introduction

About

This is a Snakemake profile for use with slurm on the UCD farm cluster. I've removed the attempts to use sacct in slurm-status.py, as Farm isn't configured properly and it always fails. I've also removed the extremely verbose failure output, and have modified the script to output specific job statuses to stderr when a failure occurs (not on every status check).

Installation

mkdir -p ~/.config/snakemake
cd ~/.config/snakemake
git clone https://github.com/camillescott/ucd-farm-slurm-profile.git

An example cluster config is given as well. You'll want to edit the paths for your account and project (sorry, I was too lazy to make it a cookiecutter =P). Namely, you'll want to edit the logdir, chdir, and mail-user entries, and remove / edit the per-rule resources for your workflow.

Usage

snakemake -p -j 16 --rerun-incomplete --keep-going --profile ucd-farm-slurm-profile --cluster-config cluster_config.yml

Note that I still provide --cluster-config in the snakemake invocation: without this, you won't have access to wildcards expansions in your config variables.

The most important resource specifications are mem and time. time is specified in minutes., mem in megabytes. I've included a function in common.snakefile to easily use hours (or days, or whatever other keywords python's timedelta accepts). An example resources block would look like:

resources:
    mem = 8000,
    time = lambda _: as_minutes(hours=3)

Naturally, you can make use of attempts (and other parameters) to your lambda functions:

resources:
    mem = lambda wildcards, attempts: attempts * 4000,
    time = lambda wildcards, attempts: as_minutes(hours=(2**(attempts-1)))

Or, other time type combos:

resources:
    time = lambda _: as_minutes(days=1, hours=4)

See the timedelta documentation for other keywords.

Other

The cluster_config.yml can include any parameter that can be passed to sbatch; these are described in the slurm documentation. Make sure they match exactly, as they're expanded and placed directly in the command invocation.

ucd-farm-slurm-profile's People

Contributors

camillescott avatar

Watchers

James Cloos avatar  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.