From 1f11c6330793ba22afb953d114078c87e65d522c Mon Sep 17 00:00:00 2001 From: gabrielkheisa Date: Sun, 27 Nov 2022 13:13:52 +0700 Subject: [PATCH] add parallelization line --- tugas.f | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tugas.f b/tugas.f index 39a2d83..310679e 100644 --- a/tugas.f +++ b/tugas.f @@ -78,13 +78,11 @@ C C ! cpu0=dtime(time0) t1 = omp_get_wtime() -!$OMP PARALLEL DO C C Jacobi iteration call jacobi(nn,gosa) C ! cpu1= dtime(time1) -!$OMP END PARALLEL DO t2 = omp_get_wtime() ! cpu = cpu1 cpu = t2-t1 @@ -142,6 +140,7 @@ CC Arrey CC other constants common /others/ imax,jmax,kmax,omega C +!$OMP do do k=1,mkmax do j=1,mjmax do i=1,mimax @@ -161,7 +160,10 @@ C enddo enddo enddo +!$OMP end do C + +!$OMP do do k=1,kmax do j=1,jmax do i=1,imax @@ -181,6 +183,7 @@ C enddo enddo enddo +!$OMP end do C return end @@ -208,6 +211,7 @@ C C DO loop=1,nn gosa=0.0 +!$OMP do reduction(+:GOSA) DO K=2,kmax-1 DO J=2,jmax-1 DO I=2,imax-1 @@ -227,7 +231,9 @@ C enddo enddo enddo +!$OMP end do C +!$OMP do DO K=2,kmax-1 DO J=2,jmax-1 DO I=2,imax-1 @@ -235,6 +241,7 @@ C enddo enddo enddo +!$OMP end do C enddo CC End of iteration