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