Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference

h.eng.cam.ac.uk
from h.eng.cam.ac.uk More from this publisher
12.07.2015 Views

2 Intel Fortran Libraries Referencecall PXFSTRUCTFREE(jtms2,ierror)STOP 'Error: the first call of PXFTIMES fails'end ifcall PXFTIME(time1, ierror)if(ierror.NE.0) thencall PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)STOP 'Error: the first call of PXFTIME fails'end ifs = 0._8PI = atan(1._8)*4do i=0, ns = s + cos(i*PI/n)*sin(i*PI/n)end doprint *," s=",scall PXFTIMES(jtms2, itime,ierror)if(ierror.NE.0) thencall PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)STOP 'Error: the second call of PXFTIMES fails'end ifcall PXFTIME(time2, ierror)if(ierror.NE.0) thencall PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)STOP 'Error: the second call of PXFTIME fails'end if!DEC$ IF DEFINED(_M_IA64)call PXFINT8GET(jtms1,"tms_utime",user_time1,ierror)call PXFINT8GET(jtms1,"tms_stime",system_time1,ierror)call PXFINT8GET(jtms2,"tms_utime",user_time2,ierror)call PXFINT8GET(jtms2,"tms_stime",system_time2,ierror)!DEC$ ELSEcall PXFINTGET(jtms1,"tms_utime",user_time1,ierror)call PXFINTGET(jtms1,"tms_stime",system_time1,ierror)call PXFINTGET(jtms2,"tms_utime",user_time2,ierror)2-352

Descriptions of the Library Routines 2call PXFINTGET(jtms2,"tms_stime",system_time2,ierror)!DEC$ ENDIFiname = IPXFCONST("_SC_CLK_TCK")call PXFSYSCONF(iname,clocks_per_sec, ierror)if(ierror.NE.0) thencall PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)STOP 'Error: the call of PXFSYSCONF fails'end ifseconds_user = (user_time2 - user_time1)/DBLE(clocks_per_sec)seconds_system = (system_time2 - system_time1)/DBLE(clocks_per_sec)print *," The processor time of calculations:"print *," User code execution(in seconds):", seconds_userprint *," Kernal code execution(in seconds):", seconds_systemprint *," Total processor time(in seconds):", seconds_user +seconds_systemprint *," Elapsed wall clock time(in seconds):", time2 - time1print *,"Free memory for instance of structure associated with jtms"call PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)end programPXFTTYNAMPOSIX Subroutine: Gets the terminal pathname. This subroutine is only available on Linux*systems.Module: USE IFPOSIXSyntaxCALL PXFTTYNAM (ifildes, s, ilen, ierror)ifildes(Input) INTEGER(4). The file descriptor associated with the terminal.s(Output) Character. The returned terminal pathname.ilen2-353

Descriptions of the Library Routines 2call PXFINTGET(jtms2,"tms_stime",system_time2,ierror)!DEC$ ENDIFiname = IPXFCONST("_SC_CLK_TCK")call PXFSYSCONF(iname,clocks_per_sec, ierror)if(ierror.NE.0) thencall PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)STOP 'Error: the call of PXFSYSCONF fails'end ifseconds_user = (user_time2 - user_time1)/DBLE(clocks_per_sec)seconds_system = (system_time2 - system_time1)/DBLE(clocks_per_sec)print *," The processor time of calculations:"print *," User code execution(in seconds):", seconds_userprint *," Kernal code execution(in seconds):", seconds_systemprint *," Total processor time(in seconds):", seconds_user +seconds_systemprint *," Elapsed wall clock time(in seconds):", time2 - time1print *,"Free memory for instance of structure associated with jtms"call PXFSTRUCTFREE(jtms1,ierror)call PXFSTRUCTFREE(jtms2,ierror)end programPXFTTYNAMPOSIX Subroutine: Gets the terminal pathname. This subroutine is only available on Linux*systems.Module: USE IFPOSIXSyntaxCALL PXFTTYNAM (ifildes, s, ilen, ierror)ifildes(Input) INTEGER(4). The file descriptor associated with the terminal.s(Output) Character. The returned terminal pathname.ilen2-353

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!