-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-omp.sh
executable file
·36 lines (29 loc) · 914 Bytes
/
run-omp.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
#!/bin/bash
############################################
# This is the OpenMP run for the RayTracer #
############################################
# You can either pass scenes individually as arguments or
# leave it blank to run all scenes in the 'scenes' folder
SCENES="${@:1}"
SCENES="${SCENES:-`ls scenes/*.scn`}"
# Ray tracing parameters
export SUPER_SAMPLES=1
export DEPTH_COMPLEXITY=5
# Input binary
export PROGDIR="./bin"
export PROGRAM="$PROGDIR/RayTracer_omp"
# Output directory
export OUTDIR="./results/omp"
# Ensure the output directory exists
mkdir -p $OUTDIR
# Iterate through selected scenes and
# run the ray tracer using time
for SCENE in $SCENES
do
FILENAME="$OUTDIR/`basename $SCENE`"
FILENAME="${FILENAME%.*}"
OUTFILE="$FILENAME.tga"
OUTLOG="$FILENAME.log"
echo $SCENE...
(time $PROGRAM $SCENE $SUPER_SAMPLES $DEPTH_COMPLEXITY $OUTFILE) 2>&1 | tee $OUTLOG
done