benchmark_mps/synthetic_data/random_regular/generate_graphs.bash

30 lines
640 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Define the parameters
num_node_range=(100 1000 10000)
degree_range=(2 3 5 10 20)
copies=20
seed=41
max_jobs=4
running_jobs=0
# Loop through different parameters
for num_node in "${num_node_range[@]}"; do
for num_degree in "${degree_range[@]}"; do
output_folder="${num_node}n${num_degree}d"
mkdir -p $output_folder
# Run the program with the parameters
echo "run with $num_node nodes and $num_degree degree output to $output_folder"
./make_regular_graph $num_node $num_degree $copies $seed $output_folder &
((running_jobs++))
if ((running_jobs >= max_jobs)); then
wait
running_jobs=0
fi
done
done