-
Notifications
You must be signed in to change notification settings - Fork 1
/
msglm_fit_chunk_oeproteome.lrz_cm2.sh
executable file
·56 lines (51 loc) · 1.56 KB
/
msglm_fit_chunk_oeproteome.lrz_cm2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /bin/sh
#SBATCH -o /gpfs/scratch/pn69ha/ge68wan2/logs/cov2/msglm_fit_oeprot_%J.log
#SBATCH -J cov2_msglm_oeprot
#SBATCH --get-user-env
#SBATCH --clusters=cm2
#SBATCH --partition=cm2_large
#SBATCH --reservation=special_covid
#SBATCH --nodes=60
##SBATCH --ntasks=1
#SBATCH --mincpus=7
##SBATCH --mem-per-cpu=2GB
##SBATCH --exclusive=user
#SBATCH --cpus-per-task=7
##SBATCH --ntasks-per-socket=1
#SBATCH --mail-type=end
#SBATCH [email protected]
#SBATCH --export=NONE
#SBATCH --time=72:00:00
source /etc/profile.d/modules.sh
module load slurm_setup
module load charliecloud
PROJECT_ID=cov2
DATA_VERSION=20200923
FIT_VERSION=20200923
MS_FOLDER=snaut_oefp_20200923
CHUNK_IDS_FILE=${SCRATCH}/${PROJECT_ID}/${PROJECT_ID}_${MS_FOLDER}_${FIT_VERSION}_pending_chunk_ids
if [[ -f $CHUNK_IDS_FILE ]]; then
echo "Reading ${CHUNK_IDS_FILE}..."
readarray -t CHUNK_IDS < $CHUNK_IDS_FILE
else
CHUNK_IDS=( $(seq 1 7832) )
fi
for chunk in ${CHUNK_IDS[@]}
do
srun -c7 -n1 --nodes=1 --ntasks-per-node=4 --mem-per-cpu=4GB --wait=0 \
--no-kill --distribution=block --exclusive=user \
ch-run $SCRATCH/docker4muc/archpc.msglm \
-t --unset-env='*PATH' \
-b $HOME/projects/adhoc:/projects/adhoc \
-b $HOME/data:/data \
-b $HOME/analysis:/analysis \
-b $SCRATCH:/scratch \
-- Rscript /projects/adhoc/$PROJECT_ID/msglm_fit_chunk_oeproteome.R \
$PROJECT_ID $SLURM_JOB_NAME $MS_FOLDER $DATA_VERSION $FIT_VERSION $SLURM_JOB_ID $chunk &
# sleep to avoid clogging of too many steps
if ! ((chunk % 400)); then
sleep 1
fi
done
wait
echo "All chunks of job #$SLURM_JOB_ID finished"