-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
44 lines (32 loc) · 909 Bytes
/
run.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
#!/bin/bash
#Getting the date and time to create the
tmp_folder=$(date +'%Y_%m_%d_%H_%M_%S')
#echo $(date)
#echo $tmp_folder
# Creating the temporal file in the PROGRAM dir.
mkdir PROGRAM/$tmp_folder/
mkdir OUTPUT/
# Copy the INPUT filles to tmp. folder
cp INPUT/* PROGRAM/$tmp_folder/
# Execute compiler to create or actualize programs
cd PROGRAM/
./compile.sh
#gprof created
#Copy the program scripts in the tmp. folder
cp r_* $tmp_folder/
# Running the programs in the tmp folder
cd $tmp_folder/
./r_main parameters.dat
#./r_main input.dat
#gmon.out created
#execute gprof to get the final txt
#gprof r_mainSQA gmon.out > resuma_grop.txt
#delete all other trash
# After the program ends, create tar, delete folder and move to OUTPUT
cd ..
cd ..
pwd
mkdir OUTPUT/$tmp_folder/
mv PROGRAM/$tmp_folder/* OUTPUT/$tmp_folder/
rm -r PROGRAM/$tmp_folder/
echo "Folder for this simulation ${tmp_folder}"