diff --git a/README.md b/README.md deleted file mode 100644 index e99b4c0..0000000 --- a/README.md +++ /dev/null @@ -1,61 +0,0 @@ -
-Gabriel Possenti Kheisa Drianasta
-19/442374/PA/19123
-
Matrix size: 4096
-Dengan menghitung perbandingan selisih waktu yang di dapat antara 1 thread dengan 2 thread, yakni ( 227 / 115 ) detik, maka speedup yang di dapat adalah 1.97 kali. Dengan menggunakan rumus perhitungan speedup berikut:
- - - -Maka program bersifat 98.4% parallel. Dengan persentase berikut,maka, perbandingan performa dengan program yang bersifat parallel sempurna adalah sebagai berikut:
- --Parallel 100% = [1, 2, 4, 8, 16, 32, 64] -Parallel 98.4% = [1, 1.97, 3.8, 7.19, 12.9, 21.4, 31.8] -- - - -
Selisih speedup terbesar tampak pada jumlah thread 8 ke 16, sama seperti hasil percobaan sebelumnya, sehingga penambahan jumlah core dari 8, ke 16, ke 32, dan seterusnya menjadi relatif lebih tidak efektif.
- -Karena program tidak bersifat parallel sempurna (100%). Program bersifat 98.4% parallel, dimana 1.6% bersifat serial. Bagian serial ini merupakan bagian yang tidak dapat dikerjakan secara parallel karena berbagai faktor. Meskipun angka tersebut kecil, selisih speedup dengan program yang dapat dijalankan secara parallel sempurna akan semakin terlihat dengan jumlah core atau thread yang semakin banyak.
- - - - -Berdasarkan hasil yang terlampir, baik hasil eksperimen maupun perhitungan dengan Hukum Amdahl, 8 thread merupakan jumlah core terbaik karena selisih waktu eksekusi (hasil percobaan) tidak begitu besar, sedangkan selisih speedup (perhitungan menggunakan Hukum Amdahl) sangat besar. Dengan kata lain, 8 thread ke 16 thread dan seterusnya relatif tidak efektif. Hubungan antara jumlah thread program dengan jumlah core adalah berbanding lurus dalam hal speedup dan berbanding terbalik dengan waktu eksekusi, dengan program yang bersifat 100% parallel.
- -Lampiran program dan hasil: https://repo.gabrielkheisa.xyz/gabrielkheisa/tugas3-openMP
\ No newline at end of file diff --git a/a.out b/a.out deleted file mode 100755 index e41d303..0000000 Binary files a/a.out and /dev/null differ diff --git a/graph.html b/graph.html deleted file mode 100644 index d3c2cf8..0000000 --- a/graph.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - diff --git a/no_reduction.f90 b/no_reduction.f90 deleted file mode 100644 index 3b61e99..0000000 --- a/no_reduction.f90 +++ /dev/null @@ -1,15 +0,0 @@ -program summ -implicit none - integer :: sum = 0 - integer :: n - !$OMP parallel do - do n = 0, 1000 - sum = sum + n - print*, n, " ", sum - end do - !$OMP end parallel do - print*, " " - print*, " " - print*, " " - print*, "hasilnya adalah ", sum -end program summ \ No newline at end of file diff --git a/no_reduction.sh b/no_reduction.sh deleted file mode 100644 index 400b2b8..0000000 --- a/no_reduction.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:01:10 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp no_reduction.f90 -o no_reduction.x -export OMP_NUM_THREADS=4 -./no_reduction.x \ No newline at end of file diff --git a/no_reduction.x b/no_reduction.x deleted file mode 100755 index 7677126..0000000 Binary files a/no_reduction.x and /dev/null differ diff --git a/slurm-16206.out b/slurm-16206.out deleted file mode 100644 index ccfbace..0000000 --- a/slurm-16206.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi06 - Matrix Size = 4096 - Execution Time = 227.454 sec A(n,n) = 0.102092747142180D+04 diff --git a/slurm-16207.out b/slurm-16207.out deleted file mode 100644 index 3847709..0000000 --- a/slurm-16207.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi06 - Matrix Size = 4096 - Execution Time = 115.605 sec A(n,n) = 0.102437460360345D+04 diff --git a/slurm-16208.out b/slurm-16208.out deleted file mode 100644 index 9505ec5..0000000 --- a/slurm-16208.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi06 - Matrix Size = 4096 - Execution Time = 60.744 sec A(n,n) = 0.102843459928075D+04 diff --git a/slurm-16209.out b/slurm-16209.out deleted file mode 100644 index 37e8d3a..0000000 --- a/slurm-16209.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi06 - Matrix Size = 4096 - Execution Time = 30.498 sec A(n,n) = 0.100725125084073D+04 diff --git a/slurm-16210.out b/slurm-16210.out deleted file mode 100644 index 98bc652..0000000 --- a/slurm-16210.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi06 - Matrix Size = 4096 - Execution Time = 26.556 sec A(n,n) = 0.100253761446337D+04 diff --git a/slurm-16212.out b/slurm-16212.out deleted file mode 100644 index 8f328d4..0000000 --- a/slurm-16212.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi03 - Matrix Size = 4096 - Execution Time = 24.960 sec A(n,n) = 0.101898724293035D+04 diff --git a/slurm-16213.out b/slurm-16213.out deleted file mode 100644 index c8109fd..0000000 --- a/slurm-16213.out +++ /dev/null @@ -1,4 +0,0 @@ -mahasiswa2 -komputasi03 - Matrix Size = 4096 - Execution Time = 24.707 sec A(n,n) = 0.101964571498883D+04 diff --git a/tugas3.f90 b/tugas3.f90 deleted file mode 100644 index 72f4c23..0000000 --- a/tugas3.f90 +++ /dev/null @@ -1,29 +0,0 @@ -program sample3 -use omp_lib - - implicit real(8)(a-h,o-z) - parameter (n=4096) - real(8) a(n,n), c(n,n) - real(4) b(n,n) - real*8 t1, t2 - a=0.0d0 - call random_number(b) - call random_number(c) - write(6,50) ' Matrix Size = ', n - 50 format(1x,a,i5) - t1 = omp_get_wtime() - !$OMP PARALLEL DO - do j=1,n - do k=1,n - do i=1,n - a(i,j)=a(i,j)+b(i,k)*c(k,j) - end do - end do - end do - !$OMP END PARALLEL DO - t2 = omp_get_wtime() - write(6, 60) ' Execution Time = ',t2-t1,' sec',' A(n,n) = ',a(n,n) - 60 format(1x,a,f10.3,a,1x,a,d24.15) - stop - -end \ No newline at end of file diff --git a/tugas3.sh b/tugas3.sh deleted file mode 100644 index 6ecc95f..0000000 --- a/tugas3.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:01:10 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=512 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_16thread.sh b/tugas3_16thread.sh deleted file mode 100644 index b006912..0000000 --- a/tugas3_16thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=16 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_1thread.sh b/tugas3_1thread.sh deleted file mode 100644 index f55889f..0000000 --- a/tugas3_1thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=1 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_2thread.sh b/tugas3_2thread.sh deleted file mode 100644 index f631548..0000000 --- a/tugas3_2thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=2 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_32thread.sh b/tugas3_32thread.sh deleted file mode 100644 index 62a2253..0000000 --- a/tugas3_32thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=32 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_4thread.sh b/tugas3_4thread.sh deleted file mode 100644 index 371dbfb..0000000 --- a/tugas3_4thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=4 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_64thread.sh b/tugas3_64thread.sh deleted file mode 100644 index 598643e..0000000 --- a/tugas3_64thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=64 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/tugas3_8thread.sh b/tugas3_8thread.sh deleted file mode 100644 index 5f2e9dd..0000000 --- a/tugas3_8thread.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:05:00 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp tugas3.f90 -export OMP_NUM_THREADS=8 -ulimit -s unlimited -./a.out \ No newline at end of file diff --git a/with_reduction.f90 b/with_reduction.f90 deleted file mode 100644 index 3b61e99..0000000 --- a/with_reduction.f90 +++ /dev/null @@ -1,15 +0,0 @@ -program summ -implicit none - integer :: sum = 0 - integer :: n - !$OMP parallel do - do n = 0, 1000 - sum = sum + n - print*, n, " ", sum - end do - !$OMP end parallel do - print*, " " - print*, " " - print*, " " - print*, "hasilnya adalah ", sum -end program summ \ No newline at end of file diff --git a/with_reduction.sh b/with_reduction.sh deleted file mode 100644 index f229a96..0000000 --- a/with_reduction.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -#SBATCH --nodes=1 -#SBATCH --time=00:01:10 -#SBATCH --job-name=Gabriel - -whoami -hostname - -gfortran -fopenmp with_reduction.f90 -o with_reduction.x -export OMP_NUM_THREADS=4 -./with_reduction.x \ No newline at end of file diff --git a/with_reduction.x b/with_reduction.x deleted file mode 100755 index 4567d80..0000000 Binary files a/with_reduction.x and /dev/null differ