File size: 1,181 Bytes
4e2940e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
# Run all DeepPTR benchmark scripts sequentially.
# Usage: bash analyses/deep/run_all.sh [script_numbers...]
# Examples:
#   bash analyses/deep/run_all.sh           # run all
#   bash analyses/deep/run_all.sh 12 13 14  # run only these
set -e
export OMP_NUM_THREADS=4 MKL_NUM_THREADS=4 OPENBLAS_NUM_THREADS=4 CUDA_VISIBLE_DEVICES=""

cd "$(dirname "$0")"

if [ $# -gt 0 ]; then
    # Run specific scripts
    for num in "$@"; do
        script=$(ls ${num}_*.py 2>/dev/null)
        if [ -n "$script" ]; then
            echo ""
            echo "========================================"
            echo "Running: $script"
            echo "========================================"
            python -u "$script" || echo "FAILED: $script"
        else
            echo "No script matching ${num}_*.py"
        fi
    done
else
    # Run all
    for script in [0-9][0-9]_*.py; do
        echo ""
        echo "========================================"
        echo "Running: $script"
        echo "========================================"
        python -u "$script" || echo "FAILED: $script"
    done
fi

echo ""
echo "Complete. Results in output/deep_benchmarks/"