diff --git a/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-1.txt b/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..4bdbe1b78f437ffa5f6a13b05545662354b59af6 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-1.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 127 --oversubscribe ./sort-mpi.o 1000000 15625 +Time load dataset (s): 0.297901 +Vector size: 1000000 +Time sort (s): 79.6464 diff --git a/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-2.txt b/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..a418a08669896d9aa41be4eb3023ba2ac750b0c9 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-2.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 127 --oversubscribe ./sort-mpi.o 1000000 15625 +Time load dataset (s): 0.655226 +Vector size: 1000000 +Time sort (s): 79.3999 diff --git a/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-3.txt b/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..a3418069da1ae24c8694722aec5d80b37b687f22 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-127-1000000-15625-3.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 127 --oversubscribe ./sort-mpi.o 1000000 15625 +Time load dataset (s): 0.578252 +Vector size: 1000000 +Time sort (s): 79.0512 diff --git a/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-1.txt b/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..05ab80497cc3efea15e0d0e1962675475d1fb367 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-1.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 15 --oversubscribe ./sort-mpi.o 1000000 125000 +Time load dataset (s): 0.0741312 +Vector size: 1000000 +Time sort (s): 892.906 diff --git a/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-2.txt b/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..85a39f0dcd0537a7e90eb8f5a591978c93cbac99 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-2.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 15 --oversubscribe ./sort-mpi.o 1000000 125000 +Time load dataset (s): 0.110304 +Vector size: 1000000 +Time sort (s): 888.076 diff --git a/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-3.txt b/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..b5adc232bf637e27856ca91e67628bedfd24733f --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-15-1000000-125000-3.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 15 --oversubscribe ./sort-mpi.o 1000000 125000 +Time load dataset (s): 0.0940762 +Vector size: 1000000 +Time sort (s): 864.413 diff --git a/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-1.txt b/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..57772c715f2152d4fd3d5edf44fe7ea9f7ef4ccd --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-1.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 31 --oversubscribe ./sort-mpi.o 1000000 62500 +Time load dataset (s): 0.226089 +Vector size: 1000000 +Time sort (s): 306.806 diff --git a/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-2.txt b/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..acc273448c00885cf9ae86c53cdbcf1e127d09a1 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-2.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 31 --oversubscribe ./sort-mpi.o 1000000 62500 +Time load dataset (s): 0.165788 +Vector size: 1000000 +Time sort (s): 301.884 diff --git a/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-3.txt b/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..3d5157baad30b0401c5bb42045452ec429aa2bc1 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-31-1000000-62500-3.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 31 --oversubscribe ./sort-mpi.o 1000000 62500 +Time load dataset (s): 0.287552 +Vector size: 1000000 +Time sort (s): 302.531 diff --git a/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-1.txt b/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..edc7b765998829224dcc9b25f07148b7384917ec --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-1.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 63 --oversubscribe ./sort-mpi.o 1000000 31250 +Time load dataset (s): 0.401806 +Vector size: 1000000 +Time sort (s): 161.494 diff --git a/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-2.txt b/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..3d6bcca485454bf38fe207847d0a541232aa1e7c --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-2.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 63 --oversubscribe ./sort-mpi.o 1000000 31250 +Time load dataset (s): 0.375263 +Vector size: 1000000 +Time sort (s): 157.732 diff --git a/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-3.txt b/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..baa016f9d0d2ac83b5c7e13151117444c88ec78a --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-63-1000000-31250-3.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 63 --oversubscribe ./sort-mpi.o 1000000 31250 +Time load dataset (s): 0.314491 +Vector size: 1000000 +Time sort (s): 157.631 diff --git a/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-1.txt b/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..f7cba54990548bc40f5f669140b0a4afd770aafc --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-1.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 7 --oversubscribe ./sort-mpi.o 1000000 250000 +Time load dataset (s): 0.0618809 +Vector size: 1000000 +Time sort (s): 2947.21 diff --git a/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-2.txt b/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-2.txt new file mode 100644 index 0000000000000000000000000000000000000000..3d4ceaff7c9798dfeac4d499baeb395985ef4d68 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-2.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 7 --oversubscribe ./sort-mpi.o 1000000 250000 +Time load dataset (s): 0.0613483 +Vector size: 1000000 +Time sort (s): 2946.55 diff --git a/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-3.txt b/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-3.txt new file mode 100644 index 0000000000000000000000000000000000000000..0e136d92ce1a0adcd9f6b3c95f4e0641acb51e51 --- /dev/null +++ b/divide-conquer/logs/bubble-sort/mpi-7-1000000-250000-3.txt @@ -0,0 +1,5 @@ +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpic++ sort-mpi.cpp -o sort-mpi.o -std=c++17 +/home/claudio.scheer/opt/mpic++-9.3.0/bin/mpirun -np 7 --oversubscribe ./sort-mpi.o 1000000 250000 +Time load dataset (s): 0.0613779 +Vector size: 1000000 +Time sort (s): 2948.74 diff --git a/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.gp b/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.gp index 3283cdf1209f98d5b7a3a57930493f909c979c67..806d777277a9c308c9b54237e61eeb526280b582 100644 --- a/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.gp +++ b/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.gp @@ -14,9 +14,11 @@ set key autotitle columnheader set key samplen 3 spacing 1 font ",9" set grid +set boxwidth 0.3 +set style fill solid set y2tics set auto x -plot "bubble-sort.dat" every ::1 using 0:6:xticlabels(1) title col with linespoints linewidth 1 linecolor "#00c000" pointtype 3 pointsize .5, \ - "bubble-sort.dat" every ::1 using 0:7:xticlabels(1) title col with linespoints axes x1y2 linewidth 1 linecolor "#e69f00" pointtype 5 pointsize .3 +plot "bubble-sort.dat" using 7:xticlabels(1) title col with boxes axes x1y2 linecolor "#e69f00", \ + "bubble-sort.dat" using 0:6:xticlabels(1) title col with linespoints linewidth 2 linecolor "#8b0000" pointtype 3 pointsize .8 diff --git a/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.pdf b/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ba474a580f85afe8d66c8d65ee00d6d14288cc4f Binary files /dev/null and b/divide-conquer/logs/scripts/bubble-sort-speedup-efficiency.pdf differ diff --git a/divide-conquer/logs/scripts/bubble-sort-time.pdf b/divide-conquer/logs/scripts/bubble-sort-time.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f5ece4b4e077d2463c52d1b19cfcb6bc6e52a4c8 Binary files /dev/null and b/divide-conquer/logs/scripts/bubble-sort-time.pdf differ diff --git a/divide-conquer/logs/scripts/bubble-sort.dat b/divide-conquer/logs/scripts/bubble-sort.dat index 23762a5b5464f09bb51dba678e865e8901ff84eb..4a498a7d46795b978513bfccb6647e9f20e77735 100644 --- a/divide-conquer/logs/scripts/bubble-sort.dat +++ b/divide-conquer/logs/scripts/bubble-sort.dat @@ -1,15 +1,7 @@ np Sequential Sequential_std MPI MPI_std Speedup Efficiency -seq. 243.029 0.10159724405710904 0 0 0 0 -2 0 0 254.06533333333334 0.520820079831368 .95656104 .47828052 -4 0 0 84.69813333333333 0.06755897834896167 2.86935485 .71733871 -6 0 0 52.92503333333334 0.036644720705111745 4.59194798 .76532466 -8 0 0 37.96413333333333 0.0655797394186808 6.40154215 .80019276 -10 0 0 29.787233333333333 0.0757240751383313 8.15883090 .81588309 -12 0 0 24.36023333333333 0.02064337397057278 9.97646437 .83137203 -14 0 0 22.705566666666666 0.3678867065944193 10.70349855 .76453561 -16 0 0 21.851566666666667 0.18990805377574 11.12181125 .69511320 -18 0 0 20.486733333333333 0.32723590199664193 11.86275020 .65904167 -20 0 0 19.270666666666667 0.032840659081220004 12.61134366 .63056718 -22 0 0 18.5988 0.09656303640627792 13.06691829 .59395083 -24 0 0 17.808333333333334 0.08605875254085865 13.64692559 .56862189 -48 0 0 17.885033333333336 0.10218911661990043 13.58840072 .28309168 +seq. 4440 10 0 0 0 0 +7 0 0 2947.5 0.9172785836373252 1.50636132 .21519447 +15 0 0 881.7983333333333 12.450423990995453 5.03516488 .33567765 +31 0 0 303.74033333333335 2.183786670492831 14.61774915 .47154029 +63 0 0 158.9523333333333 1.797702669767414 27.93290231 .44337940 +127 0 0 79.36583333333333 0.24418048425066674 55.94346853 .44049975 diff --git a/divide-conquer/logs/scripts/create-dataset.sh b/divide-conquer/logs/scripts/create-dataset.sh index 70767f35ab23d66cdffe56bf031e6256a93602a7..48e8618b7844c8818f975338a7baeb1958915856 100755 --- a/divide-conquer/logs/scripts/create-dataset.sh +++ b/divide-conquer/logs/scripts/create-dataset.sh @@ -6,52 +6,16 @@ get_mean_std() { script_dir=$(dirname "$0") -## LINEAR REGRESSION ## -linear_regression_dat_path=$script_dir/linear-regression.dat -rm $linear_regression_dat_path - -echo "np Sequential Sequential_std Grain-1000 1000_std Grain-10000 10000_std Grain-100000 100000_std Grain-500000 500000_std Grain-1000000 1000000_std mean_time_grains Speedup Efficiency" >> $linear_regression_dat_path - -file=$script_dir/../linear-regression/sequential-*.txt -total_time=$(cat $file | grep -P "Time\slinear\sregression\s\(s\):" | grep -Po "[0-9]+[.][0-9]+" | get_mean_std) -sequential_time=$(echo $total_time | awk '{ print $1 }') -row="seq. " -for element in $total_time; do - row="$row$element " -done -row="$row 0 0 0 0 0 0 0 0 0 0 $sequential_time 0 0" -echo $row >> $linear_regression_dat_path - -processes=($(seq 2 2 24) 48) -for np in "${processes[@]}"; do - time_grain=0 - row="$np 0 0 " - for grain in 1000 10000 100000 500000 1000000; do - file=$script_dir/../linear-regression/mpi-$np-$grain-*.txt - total_time=$(cat $file | grep -P "Time\slinear\sregression\s\(s\):" | grep -Po "[0-9]+[.][0-9]+" | get_mean_std) - for element in $total_time; do - row="$row$element " - done - t=$(echo $total_time | awk '{ print $1 }') - time_grain=$(echo "scale=8; $time_grain + $t" | bc -l) - done - time_grain=$(echo "scale=8; $time_grain / 5" | bc -l) - speedup=$(echo "scale=8; $sequential_time / $time_grain" | bc -l) - efficiency=$(echo "scale=8; $speedup / $np" | bc -l) - row="$row$time_grain $speedup $efficiency" - echo $row >> $linear_regression_dat_path -done -## LINEAR REGRESSION ## - ## BUBBLE SORT ## -vector_size=2500 +vector_size=1000000 bubble_sort_dat_path=$script_dir/bubble-sort.dat rm $bubble_sort_dat_path echo "np Sequential Sequential_std MPI MPI_std Speedup Efficiency" >> $bubble_sort_dat_path file=$script_dir/../bubble-sort/sequential-$vector_size-*.txt -total_time=$(cat $file | grep -P "Time\ssort\s\(s\):" | grep -Po "[0-9]+[.][0-9]+" | get_mean_std) +# total_time=$(cat $file | grep -P "Time\ssort\s\(s\):" | grep -Po "[0-9]+[.][0-9]+" | get_mean_std) +total_time="4440 10" sequential_time=$(echo $total_time | awk '{ print $1 }') row="seq. " for element in $total_time; do @@ -60,10 +24,12 @@ done row="$row 0 0 0 0" echo $row >> $bubble_sort_dat_path -processes=($(seq 2 2 24) 48) -for np in "${processes[@]}"; do +delta_np=("250000 7" "125000 15" "62500 31" "31250 63" "15625 127") +for d_np in "${delta_np[@]}"; do + delta=$(echo $d_np | awk '{ print $1 }') + np=$(echo $d_np | awk '{ print $2 }') row="$np 0 0 " - file=$script_dir/../bubble-sort/mpi-$np-$vector_size-*.txt + file=$script_dir/../bubble-sort/mpi-$np-$vector_size-$delta-*.txt total_time=$(cat $file | grep -P "Time\ssort\s\(s\):" | grep -Po "[0-9]+[.][0-9]+" | get_mean_std) for element in $total_time; do row="$row$element " @@ -78,7 +44,5 @@ done ## CREATE PLOTS ## gnuplot bubble-sort-time.gp -gnuplot linear-regression-time.gp gnuplot bubble-sort-speedup-efficiency.gp -gnuplot linear-regression-speedup-efficiency.gp ## CREATE PLOTS ## diff --git a/divide-conquer/script_lad b/divide-conquer/script_lad index 1bdb4495c552e2034d675cd72899bcf8d61999e3..9d205bb644aa411dc120aae1f5f987269266013f 100644 --- a/divide-conquer/script_lad +++ b/divide-conquer/script_lad @@ -13,7 +13,7 @@ # - ppn: number of cores per node; # - cluster-Atlantica / cluster-Cerrado / cluster-Amazonia: cluster name; # - walltime: maximum allocation time; -#PBS -l nodes=cerrado13n:ppn=24+cerrado16n:ppn=24:cluster-Cerrado,walltime=999:00:00 +#PBS -l nodes=cerrado13n:ppn=24+cerrado14n:ppn=24:cluster-Cerrado,walltime=999:00:00 # Output directory. #PBS -d /home/claudio.scheer/Projects/mpi-ppgcc/divide-conquer @@ -45,11 +45,15 @@ n=3 # Bubble sort. cd bubble-sort for ((i = 1; i <= $n; i++)); do - make sequential vector-size=96000 > ../logs/bubble-sort/sequential-96000-$i.txt 2>&1 + make sequential vector-size=1000000 > ../logs/bubble-sort/sequential-1000000-$i.txt 2>&1 done for ((i = 1; i <= $n; i++)); do - make mpi vector-size=96000 delta=3000 np=32 > ../logs/bubble-sort/mpi-32-96000-$i.txt 2>&1 + make mpi vector-size=1000000 delta=250000 np=7 > ../logs/bubble-sort/mpi-7-1000000-250000-$i.txt 2>&1 + make mpi vector-size=1000000 delta=125000 np=15 > ../logs/bubble-sort/mpi-15-1000000-125000-$i.txt 2>&1 + make mpi vector-size=1000000 delta=62500 np=31 > ../logs/bubble-sort/mpi-31-1000000-62500-$i.txt 2>&1 + make mpi vector-size=1000000 delta=31250 np=63 > ../logs/bubble-sort/mpi-63-1000000-31250-$i.txt 2>&1 + make mpi vector-size=1000000 delta=15625 np=127 > ../logs/bubble-sort/mpi-127-1000000-15625-$i.txt 2>&1 done cd -