Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

problems with errset

kageist
Beginner
933 Views
Hi,
I am trying to make a VAX fortran code work on intel fortran for windows. The problem is it has a "call errset" statement. My understanding is "errset" isn't used in intel fortran. I'm having trouble figuring out how to produce a similar result in intel fortran without using errset. Any suggestions on this or where to look? Thank you in advance.
0 Kudos
5 Replies
Steven_L_Intel1
Employee
933 Views
Tell us what you were using ERRSET for. It has many possible uses. Some of them might be doable in Intel Fortran. If you don't know what the call does, then show us the call and I'll figure it out.
0 Kudos
kageist
Beginner
933 Views

Here's the section with errset. The three lines are indented so they will stand out. My job won't allow me to send you the whole file. Mylimited understanding is that it's supposed tostore errors for later viewing. I hope this is enough. Thank you in advance.


PRINT*,'ENTER INPUT FILE NAME'

READ(*,'(A)')FINP

FTMP='TEMP.DAT'

DO J=80,1,-1

IF (FINP(J:J).EQ.'.') GO TO 91

END DO

91 FLST=FINP(1:J)//'LST'

FSUM=FINP(1:J)//'SUM'

FACC=FINP(1:J)//'ACC'

OPEN (JLST,NAME=FLST,TYPE='NEW')

OPEN (JSUM,NAME=FSUM,TYPE='NEW',

* CARRIAGECONTROL='LIST')

OPEN (JACC,NAME=FACC,TYPE='NEW',

* CARRIAGECONTROL='LIST')

!CLEAN INPUT FILE FROM LINES THAT STARTS WITH "*"

CALL CLEAN_FILE(FINP,FTMP)

! READ FROM THE CLEANED INPUT FILE

1 CALL ERRSET(72,.TRUE.,.FALSE.,.FALSE.,.FALSE.,32767)

CALL ERRSET(73,.TRUE.,.FALSE.,.FALSE.,.FALSE.,32767)

CALL ERRSET(88,.TRUE.,.FALSE.,.FALSE.,.FALSE.,32767)

NRUN=NRUN+1

CALL GUSTA (FTMP,FLST,FSUM,FACC)

CALL GUSTD

CALL GUSTE

CALL GUSTF

CALL GUSTG

CALL GUSTL

CALL GUSTS

CALL GUSTT (NRUN)

GO TO 1

END

0 Kudos
Steven_L_Intel1
Employee
933 Views
Ok. What these do is tell the program to continue execution when a floating overflow or divide by zero is seen. (88 is for an overflow in the math library.) It does not "store them for later". The operation that would get the error instead stores a VAX reserved operand in the result.

I would suggest simply commenting out those calls. By default, Intel Fortran uses IEEE floating point semantics which continue on these errors and give you an Infinity or a NaN (Not a Number). If these are used in a later calculation, then you may get other results. Try it and see. There are other, newer ways of controlling floating point behavior but I don't want to get into that yet. I think that just removing the calls will give you behavior closer to what the VAX would do.
0 Kudos
kageist
Beginner
933 Views
Thank you! Commenting them out doesn't cause any problems so that's what I did.
0 Kudos
Steven_L_Intel1
Employee
933 Views
Glad to hear it.
0 Kudos
Reply