# HG changeset patch # User Steve Losh # Date 1711656415 14400 # Node ID 417f91fae3c27a090a667fb9f39cce82339a4a13 # Parent f6bdfbdf747e5bbf1734e7fc97e82647572cc186 More diff -r f6bdfbdf747e -r 417f91fae3c2 remote/bin/slurm-shell --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/remote/bin/slurm-shell Thu Mar 28 16:06:55 2024 -0400 @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -euo pipefail + +read -p "Account? " +acct="$REPLY" + +read -p "Hours? " +hours="$REPLY" + +read -p "CPUs? " +cpus="$REPLY" + +read -p "Memory (gb)? " +mem_gb="$REPLY" +mem_kb=$(( mem_gb * 1024 * 1024 / cpus )) + +exec salloc --account="$acct" --nodes=1 --ntasks-per-node=1 --mem-per-cpu="$mem_kb"K --cpus-per-task="$cpus" --time="$hours":00:00