Skip to content

Commit

Permalink
Fix bailing when one STREAM_ARRAY_SIZE does not compile (#29)
Browse files Browse the repository at this point in the history
* Update to exit only when base_cache size could not be compiled, skip size otherwise
  • Loading branch information
kdvalin authored Jul 31, 2023
1 parent f590ce4 commit be7d2d6
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions streams/streams_extra/run_stream
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,22 @@ build_images()
fi
fi

if [[ $streams_exec == "" ]]; then
streams_exec=$stream
else
streams_exec=$streams_exec" "$stream
fi
echo gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DSTREAM_ARRAY_SIZE=${use_cache} stream_omp_5_10.c -o ${stream} -fno-pic >> streams_build_options
gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DSTREAM_ARRAY_SIZE=${use_cache} stream_omp_5_10.c -o ${stream} -fno-pic
CC_CMD="gcc ${MOPT} -fopenmp -mcmodel=large ${optim_opt} -DSTREAM_ARRAY_SIZE=${use_cache} stream_omp_5_10.c -o ${stream} -fno-pic"
echo $CC_CMD >> streams_build_options
$CC_CMD
if [ $? -ne 0 ]; then
echo Compilation of streams failed.
exit 1
if [ -z "$streams_exec" ]; then
echo Compilation of streams failed.
exit 1
else
echo Could not compile streams with $use_cache size, skipping
fi
else
if [[ $streams_exec == "" ]]; then
streams_exec=$stream
else
streams_exec=$streams_exec" "$stream
fi
fi

use_cache=`echo ${base_cache_size}*1024*${multiple_size} | bc`
Expand Down

0 comments on commit be7d2d6

Please sign in to comment.