-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubmit_Script.sh
executable file
·58 lines (51 loc) · 1.66 KB
/
Submit_Script.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
#!/bin/bash
if [ "$#" = 2 ]
then
if [ "$1" = "excalibur" ]
then
echo "Running Hierarchical Upscaling Code on excalibur.arl.hpc.mil"
cd ./submit/excalibur/
if [ -f "$2" ]
then
cp ./"$2" ../../
cd ../../
qsub "$2"
rm "$2"
else
echo
echo "--> '$2' is not the name of a currently existing PBS script"
echo
echo "--> List of available scripts: ./source/<platform>"
echo "--------------------------------------------------------------"
ls -l *.pbs
fi
elif [ "$1" = "macOS" ]
then
echo "Running Hierarchical Upscaling Code on macOS"
cd ./submit/macOS/
if [ -f "$2" ]
then
cp ./"$2" ../../
cd ../../
./"$2"
rm "$2"
else
echo
echo "--> '$2' is not the name of a currently existing submit script"
echo
echo "--> List of available scripts: ./source/<platform>"
echo "--------------------------------------------------------------"
ls -l *.sh
fi
else
echo "--> Don't recognize that platform..."
echo "--> Need to specify recognized platform: excalibur or topaz"
echo "--> ./Submit_Script.sh <platform> <PBS script>"
fi
else
echo "--> Incorrect number of arguments - Need to specify the machine where the code is being compiled and name of an exisiting PBS script."
echo "--> ./Submit_Script.sh <platform> <PBS script>"
echo "--> Current platforms: excalibur, topaz"
echo "--> PBS scripts are stored in ./source/<platform> - you will find some examples already in that directory"
echo "--> Using the examples as a template, generate a PBS script for your job, store it in the correct directory, and run the code by specifying it's name when calling Submit_Script.sh"
fi