This is the line that crashes when I run the code in debug mode:

HMX = HMX*HMX2SM

Here is the context of the Fortran line above:

SUBROUTINE IOCBCO2SM(T, P, HMX, DHMX)

!========================

! DESCRIPTION OF VARIABLES

!

! T: TEMPERATURE

! P: PRESSURE

! HMX: MOLAR ENTHALPY

! DHMX: MOLAR HEAT CAPACITY

!=============================

! DECLARING VARIABLES

!

DOUBLE PRECISION T, P, HMX, DHMX

!=======================

! INCLUDING IO DATA CONVERSION PARAMETERS

!

INCLUDE 'IOPARAM.FOR'

!===========================

! CONVERTING DATA DEPENDING ON MODEL

!

T = T*TA2SM + TB2SM

P = P*P2SM

HMX = HMX*HMX2SM

DHMX = DHMX*DHMX2SM

!--------------------------------------

! RETURN TO INTERFACE ROUTINE

!

RETURN

END

---------------------------------------------------

File IOPARAM.FOR looks as follows (I have removed some lines):

!

! DECLARING PARAMETERS

!

!*********************

!-------------------

! CO UNIT: mol/s, SM UNIT: mol/s

DOUBLE PRECISION, PARAMETER :: NF2SM = 1D0

! CO UNIT: Pa, SM UNIT: Pa

DOUBLE PRECISION, PARAMETER :: P2SM = 1D0

! CO UNIT: K, SM UNIT: K

DOUBLE PRECISION, PARAMETER :: TA2SM = 1D0, TB2SM = 0.0

!

! DATA FOR CONVERSION BETWEEN SIMULATION MANAGER AND CAPE-OPEN FOR CALL-BACK TO

! THERMODYNAMIC ROUTINES.

!

!------------------------------

! CO UNIT: J/mol, SM UNIT: J/MOL

DOUBLE PRECISION, PARAMETER :: HMX2SM = 1D0

! CO UNIT: J/(mol*K), SM UNIT: J/(mol*K)

DOUBLE PRECISION, PARAMETER :: DHMX2SM = 1D0

!

!**** END OF FILE: IOPARAM.FOR ***

---------------------

Why does this particular line crash? Why not the line above it?? Or the line below it??

-Bernt