-
Notifications
You must be signed in to change notification settings - Fork 2
/
find_failing_cuda_samples.sh
executable file
·33 lines (30 loc) · 1.19 KB
/
find_failing_cuda_samples.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
#!/bin/bash
# assumes that the nvidia examples have been put into $HOME
cd $HOME/NVIDIA_CUDA-9.1_Samples
# only go into directories that match "*_*", i.e. like 0_Simple, 1_Utilities, etc.
for sampleType in $(ls -d *_*); do
pushd $sampleType > /dev/null
for sampleProg in $(ls -d *); do
case "$sampleProg" in
common)
# data dir - not a sample directory
;;
*)
pushd $sampleProg > /dev/null
# compile the sample program
out=$(make 2>&1)
# check if the sample program exists as an executable
# if it doesn't then we consider the build a "failure"
if [ ! -f "$sampleProg" ]; then
echo "$sampleType/$sampleProg" >> /root/failures.txt
echo "===================================================="
echo "======= FAILURE : $sampleType/$sampleProg =========="
echo "===================================================="
echo $out
fi
popd > /dev/null
;;
esac
done
popd > /dev/null
done