-
Notifications
You must be signed in to change notification settings - Fork 0
/
job_rod_WEW_DEW.sh
61 lines (50 loc) · 1.94 KB
/
job_rod_WEW_DEW.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
56
57
58
59
60
61
#! /bin/bash
#PBS -l nodes=1:ppn=64
#PBS -N ROD_WEW_DEW
#PBS -q core
##########################################
# #
# Output some useful job information. #
# #
##########################################
echo ------------------------------------------------------
echo -n 'Job is running on node '; cat $PBS_NODEFILE
echo ------------------------------------------------------
echo PBS: qsub is running on $PBS_O_HOST
echo PBS: originating queue is $PBS_O_QUEUE
echo PBS: executing queue is $PBS_QUEUE
echo PBS: working directory is $PBS_O_WORKDIR
echo PBS: execution mode is $PBS_ENVIRONMENT
echo PBS: job identifier is $PBS_JOBID
echo PBS: job name is $PBS_JOBNAME
echo PBS: node file is $PBS_NODEFILE
echo PBS: current home directory is $PBS_O_HOME
echo PBS: PATH = $PBS_O_PATH
echo ------------------------------------------------------
# Starting job
echo "job $PBS_JOBNAME started: `whoami` `hostname` `pwd` `date`."
##########################################
# #
# Environment settings #
# #
##########################################
# get reserved CPUs
export CORES=$(wc -l $PBS_NODEFILE | cut -f1 --delim=" ")
# activate conda environment
source activate R-3.3
##########################################
# #
# Calling R script #
# #
##########################################
# executing Rscript
Rscript --slave --vanilla ROD_WEW_DEW.R
##########################################
# #
# Ending job #
# #
##########################################
# compressing file
pigz --processes $CORES ROD*WEW-DEW.txt
# finishing job
echo "job $PBS_JOBNAME finished `whoami` `hostname` `pwd` `date`."