2024-05-07 11:38:31 +09:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Define the parameters
|
|
|
|
num_node_range=(100 1000 10000)
|
2024-05-08 23:40:25 +09:00
|
|
|
degree_range=(2 3 5 10 20)
|
2024-05-07 11:38:31 +09:00
|
|
|
copies=20
|
|
|
|
seed=41
|
|
|
|
|
2024-05-08 23:40:25 +09:00
|
|
|
max_jobs=4
|
2024-05-07 11:38:31 +09:00
|
|
|
running_jobs=0
|
|
|
|
|
|
|
|
# Loop through different parameters
|
|
|
|
for num_node in "${num_node_range[@]}"; do
|
2024-05-08 23:40:25 +09:00
|
|
|
for num_degree in "${degree_range[@]}"; do
|
|
|
|
output_folder="${num_node}n${num_degree}d"
|
2024-05-07 11:38:31 +09:00
|
|
|
mkdir -p $output_folder
|
|
|
|
|
|
|
|
# Run the program with the parameters
|
2024-05-08 23:40:25 +09:00
|
|
|
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 &
|
2024-05-07 11:38:31 +09:00
|
|
|
|
|
|
|
((running_jobs++))
|
|
|
|
|
|
|
|
if ((running_jobs >= max_jobs)); then
|
|
|
|
wait
|
|
|
|
running_jobs=0
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|