Recent content by debbieanne

  1. D

    Fortran What is the correct way to handle a potential divide by zero issue in FORTRAN?

    Hi SteamKing...I tried your solution but got the same error. However, Hesch's code worked. Thanks so much for helping.
  2. D

    Fortran What is the correct way to handle a potential divide by zero issue in FORTRAN?

    Thanks for this. IF ((N(J)-1).EQ.0.0) THEN N(J) = 2 END IF EDEN=EDEN+(STVS**2)/(N(J)-1) Worked perfect.
  3. D

    Fortran What is the correct way to handle a potential divide by zero issue in FORTRAN?

    Good day, I'm working with a FORTRAN program that has the line: EDEN=EDEN+(STVS**2)/(N(J)-1) I would like to check if N(J)-1 is equal to zero. If so make N(J)-1=1.0 The following doesn't work: IF ((N(J)-1).EQ.0.0) THEN N(J)-1=1.0 END IF I'm using gfortran and am getting...
  4. D

    Fortran What is causing the ARITHMETIC exception in my FORTRAN program?

    Thanks jedishrfu. This worked. I was able to determine that Y = SAREA(2,ISN) / X13 was the culprit. X13 =0...division by zero problem. Thanks so much. Very much appreciated.
  5. D

    Fortran What is causing the ARITHMETIC exception in my FORTRAN program?

    Good day. My FORTRAN program is throwing an ARITHMETIC exception on this line of code: SAREA(2,ISN)=SAREA(2,ISN)/IND(13)/1000./6080.2*IND(12)/1000. When I check this using gdb and print the contents of the variable SAREA(2,ISN), the value is 1432. gdb error message: Program received signal...
  6. D

    Fortran Why Does This Fortran Code Result in an Infinite Loop?

    Hi, I've made some progress. Issue resolved. The code block should have only printed the information for either MALES or FEMALES. But in fact it was printing duplicate information. If the species was female, for instance, it should have just printed out female and the associated stats...
  7. D

    Fortran Why Does This Fortran Code Result in an Infinite Loop?

    Hi David. Thanks for your response. I believe I have found the offending piece of code in a linked object file. I started learning GDB to debug yesterday ! The main program calls many linked subroutines. I'm not sure yet how to use GDB to step through an object file to see how the variables...
  8. D

    Fortran Why Does This Fortran Code Result in an Infinite Loop?

    I've inherited the code below. It's giving an infinite loop but I can't find what's causing it. This is code originally on OpenVMS written now for AIX. Can you help? SUBROUTINE MREAD3(N_VESSEL,N_TRIP,N_ICNAF,N_SPECIES,N_DELSTR, + N_SETDEL,N_SELSTR,VESSELS_TO_BE_SELECTED, +...
  9. D

    Fortran FORTRAN moving from OpenVMS to AIX

    Thanks all for your input. It has been very helpful to me. This is what I was able to discover using the information in this thread. The line: READ(*,7)IVES,MIN,ITRIP is asking for input of the vessel name beginning in the first column and the trip number beginning in column 27. When I...
  10. D

    Fortran FORTRAN moving from OpenVMS to AIX

    I will do this and get back to you. You've been very helpful. Thanks so much. I have a meeting now but will read the site info you sent me. I had downloaded some manuals from various sites but found that they had different approaches. Probably because of the various versions of FORTRAN...
  11. D

    Fortran FORTRAN moving from OpenVMS to AIX

    On the OpenVMS I don't have to give any input from the keyboard. The fortran program itself is called from a DCL script which I re-wrote to bash. I've included both here. My compiler is gfortran. I use this code to compile: gfortran -std=legacy -ff2c sdetcat.for...I have hard coded paths...
  12. D

    Fortran FORTRAN moving from OpenVMS to AIX

    Good day, I am not familiar with older FORTRAN. We are shutting down an old OpenVMS server and moving to AIX. I am trying to tweak old FORTRAN code that is working fine on OpenVMS to now run on AIX. I have one error left in this code that I can't seem to fix. It is the line that reads 6...
Back
Top