[parallel-smoke] - Introduce logic to check for necessary package.
If package is not found on the system, proceed with
the sequential version of the check_smoke.sh script.
@@ -91,10 +91,6 @@ script_dir=$(dirname "$0")
pushd $script_dir
path=$(pwd)
-# Clean all testing directories, except in parallel build
-if [ "$AOMP_PARALLEL_SMOKE" != 1 ]; then
- make clean
-fi
cleanup
export OMP_TARGET_OFFLOAD=${OMP_TARGET_OFFLOAD:-MANDATORY}
@@ -126,6 +122,8 @@ fi
# ---------- Begin parallel logic ----------
if [ "$AOMP_PARALLEL_SMOKE" == 1 ]; then
+ sem --help > /dev/null
+ if [ $? -eq 0 ]; then
COMP_THREADS=1
MAX_THREADS=16
if [ ! -z `which "getconf"` ]; then
@@ -200,9 +198,17 @@ done
sem --wait --id def_sem
gatherdata
exit
+ else
+ echo
+ echo "Warning: Parallel smoke requested, but the parallel package needed is not installed. Continuing with sequential version..."
+ echo
+ fi
fi
# ---------- End parallel logic ----------
+# Clean all testing directories
+make clean
+
# Loop over all directories and make run / make check depending on directory name
for directory in ./*/; do
pushd $directory > /dev/null
