# ssubmit [![Rust CI](https://github.com/mbhall88/ssubmit/actions/workflows/ci.yaml/badge.svg)](https://github.com/mbhall88/ssubmit/actions/workflows/ci.yaml) [![codecov](https://codecov.io/gh/mbhall88/ssubmit/branch/main/graph/badge.svg?token=4O7HTGKD6Q)](https://codecov.io/gh/mbhall88/ssubmit) [![Crates.io](https://img.shields.io/crates/v/ssubmit.svg)](https://crates.io/crates/ssubmit) Submit sbatch jobs without having to create a submission script - [Motivation](#motivation) - [Install](#install) - [Usage](#usage) ## Motivation This project is motivated by the fact that I want to just be able to submit commands as jobs and I don't want to fluff around with making a submission script. `ssubmit` wraps that whole process and lets you live your best lyf #blessed. ## Install **tl;dr** ```shell curl -sSL install.ssubmit.mbh.sh | sh # or with wget wget -nv -O - install.ssubmit.mbh.sh | sh ``` You can pass options to the script like so ``` $ curl -sSL install.ssubmit.mbh.sh | sh -s -- --help install.sh [option] Fetch and install the latest version of ssubmit, if ssubmit is already installed it will be updated to the latest version. Options -V, --verbose Enable verbose output for the installer -f, -y, --force, --yes Skip the confirmation prompt during installation -p, --platform Override the platform identified by the installer [default: apple-darwin] -b, --bin-dir Override the bin installation directory [default: /usr/local/bin] -a, --arch Override the architecture identified by the installer [default: x86_64] -B, --base-url Override the base URL used for downloading releases [default: https://github.com/mbhall88/ssubmit/releases] -h, --help Display this help message ``` ### Cargo ```shell $ cargo install ssubmit ``` ### Build from source ```shell $ git clone https://github.com/mbhall88/ssubmit.git $ cd ssubmit $ cargo build --release $ target/release/ssubmit -h ``` ## Usage Submit an rsync job named "foo" and request 350MB of memory and a one week time limit ```shell $ ssubmit -m 350m -t 1w foo "rsync -az src/ dest/" ``` Submit a job that needs 8 CPUs ```shell $ ssubmit -m 16g -t 1d align "minimap2 -t 8 ref.fa query.fq > out.paf" -- -c 8 ``` ``` $ ssubmit -h Submit sbatch jobs without having to create a submission script Usage: ssubmit [OPTIONS] [-- ...] Arguments: Name of the job Command to be executed by the job [REMAINDER]... Options to be passed on to sbatch Options: -o, --output File to write job stdout to. (See `man sbatch | grep -A 3 'output='`) [default: %x.out] -e, --error File to write job stderr to. (See `man sbatch | grep -A 3 'error='`) [default: %x.err] -m, --mem Specify the real memory required per node. e.g., 4.3kb, 7 Gb, 9000, 4.1MB become 5KB, 7000M, 9000M, and 5M, respectively [env: SSUBMIT_MEMORY=] [default: 1G] -t, --time