48 lines
878 B
Bash
48 lines
878 B
Bash
#! /bin/bash
|
|
|
|
output_dir="$1"
|
|
baseline_time_s="$2"
|
|
input_dir="$3"
|
|
iterations="$4"
|
|
|
|
if [[ -z $output_dir ]]; then
|
|
echo "Missing destination directory!"
|
|
exit 1
|
|
fi
|
|
if [[ -z $baseline_time_s ]]; then
|
|
echo "Missing baseline time!"
|
|
exit 1
|
|
fi
|
|
if [[ -z $input_dir ]]; then
|
|
echo "Missing matrix directory!"
|
|
exit 1
|
|
fi
|
|
if [[ -z $iterations ]]; then
|
|
echo "Missing iterations!"
|
|
exit 1
|
|
fi
|
|
|
|
srun_args=(
|
|
--account oasis
|
|
--partition oasis
|
|
--qos oasis-exempt
|
|
#--cpus-per-task 160
|
|
--cpus-per-task 160
|
|
#--mem 28114
|
|
--mem 16G
|
|
--ntasks-per-node 1
|
|
--exclusive
|
|
--output /dev/null
|
|
--error /dev/null
|
|
)
|
|
|
|
echo "${srun_args[@]}"
|
|
|
|
input_files=$(ls "$input_dir"*.mtx)
|
|
for file in ${input_files[@]}; do
|
|
srun ${srun_args[@]} pytorch-altra.sh "$output_dir" "$baseline_time_s" "$file" "$iterations" &
|
|
#apptainer run pytorch-altra.sif -c python spmv.py $file
|
|
#cat $file | head -n 1
|
|
done
|
|
wait
|