From 3d34925fa8f37f5b39997c87b4546606b9bdedc5 Mon Sep 17 00:00:00 2001 From: gabrielkheisa Date: Sat, 26 Nov 2022 21:36:45 +0700 Subject: [PATCH] add --- tugas.f | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tugas.f b/tugas.f index 9b82825..f7697aa 100644 --- a/tugas.f +++ b/tugas.f @@ -40,7 +40,9 @@ C "use portlib" statement on the next line is for Visual fortran C to use UNIX libraries. Please remove it if your system is UNIX. C ------------------- ! use portlib + use omp_lib IMPLICIT REAL*4(a-h,o-z) + real*8 t1,t2 C C PARAMETER (mimax=513,mjmax=257,mkmax=257) C PARAMETER (mimax=257,mjmax=129,mkmax=129) @@ -75,12 +77,15 @@ C write(*,*) ' Measure the performance in 10000 times.' C cpu0=dtime(time0) + t1=omp_get_wtime() C C Jacobi iteration call jacobi(nn,gosa) C cpu1= dtime(time1) + t2=omp_get_wtime() cpu = cpu1 + cpu = t2-t1 flop=real(kmax-2)*real(jmax-2)*real(imax-2)*34.0*real(nn) xmflops2=flop/cpu*1.0e-6 write(*,*) ' MFLOPS:',xmflops2,' time(s):',cpu,gosa