#/bin/bash
echo "======start======"
hostname

myhostname=`hostname`

source /ddn/support/soft/cuda-11.8/env_cuda_11.8.sh
output_file_path=/ddn/support/bench
output_file=qiql-${myhostname}-run.log
hostname >> ${output_file_path}/${output_file}

cd /ddn/support/bench/cuda-samples-11.8/Samples/4_CUDA_Libraries/batchCUBLAS
for device in {0..9}
do
  ./batchCUBLAS -m8192 -n8192 -k8192 --device=$device >> ${output_file_path}/${output_file}
done

cd /ddn/support/bench/cuda-samples-11.8/Samples/1_Utilities/bandwidthTest
for device in {0..9}
do
  ./bandwidthTest --device=$device >> ${output_file_path}/${output_file}
done

cd /ddn/support/bench/cuda-samples-11.8/Samples/5_Domain_Specific/p2pBandwidthLatencyTest
./p2pBandwidthLatencyTest >> ${output_file_path}/${output_file}

hostname>> ${output_file_path}/${output_file}
echo "=======end========"