12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>END PROGRAMSUBROUTINE FPE_SETUPUSE IFPORTIMPLICIT NONEINTERFACESUBROUTINE FPE_HANDLER(SIGNO, SIGINFO)INTEGER(4), INTENT(IN) :: SIGNO, SIGINFOEND SUBROUTINEEND INTERFACEINTEGER IRIR = IEEE_HANDLER('set','division',FPE_HANDLER)END SUBROUTINE FPE_SETUPSUBROUTINE FPE_HANDLER(SIG, CODE)USE IFPORTIMPLICIT NONEINTEGER SIG, CODEIF(CODE.EQ.FPE$ZERODIVIDE) PRINT *,'Occurred divide by zero.'CALL ABORTEND SUBROUTINE FPE_HANDLERIERRNOPortability Function: Returns the number of the last detected error from any routines in theIFPORT module that return error codes.Module: USE IFPORTSyntaxresult = IERRNO ( )Results:The result type is INTEGER(4). The result value is the last error code from any portabilityroutines that return error codes. These error codes are analogous to errno on a Linux* system.The module IFPORT.F90 provides parameter definitions for the following errno names(typically found in errno.h on Linux systems):Symbolic name Number DescriptionEPERM 1 Insufficient permission for operationENOENT 2 No such file or directory2-170

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

Saved successfully!

Ooh no, something went wrong!