#!/bin/bash

## this script can be used to test an installation of bio_db_repo
## simple run: sbatch bio_db_stats_slurm
## check queue with squeue; kill jobs with scancel
##
## complex output run: sbatch --output="${CLUST_OUTS}/%x-%j-outs-`fstamp`.txt" build_bio_db_repo_slurm

## Resource Request
#SBATCH --job-name=bio_db_stats_slurm
## %j is job number, %x is the job name above
#SBATCH --output=/mnt/lustre/RDS-live/angelopoulos/aurochs/clust/outs/%x-%j-outs.txt
## 6 hours
#SBATCH --time=1-6:00:00
#SBATCH --ntasks=1
## fixme: test against 1
#SBATCH --cpus-per-task=8
## why not :) :
#SBATCH --mem-per-cpu=128G

## Job Steps
PACKS_DIR=/mnt/lustre/RDS-ephemeral/angelopoulos/local.home/src/packs/

echo "Starting: in sbatch we asked for 8 threads and 128G mem"
echo `date`
echo $PATH
cd ${PACKS_DIR}/bio_db/scripts

## run
srun upsh bio_db_stats

echo `date`
sleep 10
echo "The End"
# change urls to new central location
