-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmscTuturialCopyDataTestScript.qsub.sh
74 lines (52 loc) · 1.68 KB
/
mscTuturialCopyDataTestScript.qsub.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
62
63
64
65
66
67
68
69
70
71
72
73
74
# This is the most basic QSUB file needed for this cluster.
# Further examples can be found under /share/apps/examples
# Most software is NOT in your PATH but under /share/apps
#
# For further info please read http://hpc.cs.ucl.ac.uk
# For cluster help email cluster-support@cs.ucl.ac.uk
#
# NOTE hash dollar is a scheduler directive not a comment.
#########################FLAGS#################################
# These are flags you must include - Two memory and one runtime.
# Runtime is either seconds or hours:min:sec
# test script, so we'll ask for 1G of RAM only.
#$ -l tmem=1G
# only need 1 minute to test this script.
#$ -l h_rt=00:01:00
# no need for a GPU just yet. When you do need one, uncomment
# these lines and ask for what you need:
# #$ -l gpu=true
# #$ -pe gpu 2
# choose your preferred shell.
#$ -S /bin/bash
# merge STDOUT and STDERROR
#$ -j y
# make sure you give it a memorable name
#$ -N mscTuturialCopyDataTestScript
# output directory for STDOUT file
#$ -o ~/runLog/
#########################/FLAGS#################################
#The code you want to run now goes here.
# print hostname and data for reference.
hostname
date
# copy your data
cd /home/$USER/
date
. ./copyTestDataToScratch.sh
date
# I've found that I sometimes need to include the path to conda's libraries. No harm in including it.
export LD_LIBRARY_PATH=/home/$USER/miniconda3/lib/:${LD_LIBRARY_PATH}
# optionally activate your conda env here:
conda activate base
# cd somewhere where your code is.
cd /home/$USER/code/
python mscPythonReadTestScript.py $COPYDIR
# print hostname and date for reference again
hostname
date
# cleanup
rm -r $COPYDIR
# give time for a clean exit.
sleep 10
date