-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfloatFunctionGen.sh
More file actions
executable file
·38 lines (31 loc) · 958 Bytes
/
floatFunctionGen.sh
File metadata and controls
executable file
·38 lines (31 loc) · 958 Bytes
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
#!/bin/bash
parallelism=2
while getopts j: flag
do
case "${flag}" in
j) parArg=${OPTARG};;
esac
done
if [ "$parArg" -eq "$parArg" ] 2>/dev/null
then
parallelism=$parArg
fi
#1. Build the function generation program
echo -e "\033[1m* Compiling function generation code\033[0m"
cd functiongen/float
make --silent clean
make --silent ADDTL=-w
echo -e "\033[1m\tCompilation finished\033[0m"
#2. Run function generation program in parallel
echo -e "\033[1m* Generating polynomial. This will take a long time\033[0m"
echo -e "\033[1m\tRunning generation script in parallel\033[0m"
echo -e "\033[1m\tParallelism: $parallelism jobs\033[0m"
echo -e "\033[1m\tEstimated time: 3 hours\033[0m"
cat FuncGenCommands.txt | parallel -j $parallelism
echo -e "\033[1m\tPolynomial generation complete\033[0m"
#5. Finally, make clean
echo -e "\033[1m* Cleaning up\033[0m"
make --silent clean
rm *.log
cd ../..
echo -e "\033[1m\tCleanup complete\033[0m"