remote/bin/slurm-shell @ 6c4c335faf47
Merge
author |
Steve Losh <steve@stevelosh.com> |
date |
Tue, 06 Aug 2024 10:56:16 -0400 |
parents |
417f91fae3c2 |
children |
(none) |
#!/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