HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

Fortran debugging error in dynamic student program code

2018-02-06View Original

Thread Content

I’m a beginner in AspenPlus and Fortran. I’m encountering problems while using the Compaq Visual Fortran compiler to debug the Fortran code for a thermodynamics program. The subroutine code where errors occur is as follows:

SUBROUTINE USERKIN(SOUT, NSUBS, IDXSUB, ITYPE, NINT, 2 INT, NREAL, REAL, IDS, NPO, 3 NBOPST, NIWORK, IWORK, NWORK, WORK, 4 NC, NR, STOIC, RATES, FLUXM, 5 FLUXS, XCURR, NTCAT, RATCAT, NTSSAT, 6 RATSSA, KCALL, KFAIL, KFLASH, NCOMP, 7 IDX, Y, X, X1, X2, 8 NRALL, RATALL, NUSERV, USERV, NINTR, 9 INTR, NREALR, REALR, NIWR, IWR, * NWR, WR, NRL, RATEL, NRV, 1 RATEV)

C Definition of subroutine variables
IMPLICIT NONE

C Declare variables used in dimensioning
INTEGER NSUBS, NINT, NPO, NIWORK, NWORK, +
NC, NR, NTCAT, NTSSAT, NCOMP, +
NRALL, NUSERV, NINTR, NREALR, NIWR, +
NWR

C Include necessary files
#include “ppexec_user.cmn”
EQUIVALENCE (RMISS, USER_RUMISS)
EQUIVALENCE (IMISS, USER_IUMISS)

#include “dms_ncomp.cmn”
#include “rxn_rcstrr.cmn”
#include “rxn_rprops.cmn”

EQUIVALENCE (TEMP, RPROPS_UTEMP)
EQUIVALENCE (PRES, RPROPS_UPRES)
EQUIVALENCE (VFRAC, RPROPS_UVFRAC)
EQUIVALENCE (BETA, RPROPS_UBETA)
EQUIVALENCE (VVAP, RPROPS_UVVAP)
EQUIVALENCE (VLIQ, RPROPS_UVLIQ)
EQUIVALENCE (VLIQS, RPROPS_UVLIQS)
EQUIVALENCE (B(1), IB(1))

--------------------Configuration: userkin - Win32 Debug------------------
Compiling Fortran... C:\userkin\userkin.for
C:\userkin\userkin.for(24): Warning: Bad # preprocessor line
#include “ppexec_user.cmn” -^
C:\userkin\userkin.for(27): Warning: Bad # preprocessor line
#include “dms_ncomp.cmn” -^
C:\userkin\userkin.for(28): Warning: Bad # preprocessor line
#include “rxn_rcstrr.cmn” -^
C:\userkin\userkin.for(29): Warning: Bad # preprocessor line
#include “rxn_rprops.cmn” -^
C:\userkin\userkin.for(39): Warning: Bad # preprocessor line
#include “pputl_ppglob.cmn” -^
C:\userkin\userkin.for(40): Warning: Bad # preprocessor line
#include “dms_maxwrt.cmn” -^
C:\userkin\userkin.for(41): Warning: Bad # preprocessor line
#include “dms_plex.cmn” -^
C:\userkin\userkin.for(59): Error: This name does not have a type, and must have an explicit type.
+ XMW (NCOMP_NCC), ------------------^
C:\userkin\userkin.for(59): Error: A specification expression is invalid.
+ XMW (NCOMP_NCC), ------------------^
C:\userkin\userkin.for(25): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (RMISS, USER_RUMISS) --------------------------^
C:\userkin\userkin.for(26): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (IMISS, USER_IUMISS) --------------------------^
C:\userkin\userkin.for(30): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (TEMP, RPROPS_UTEMP) -------------------------^
C:\userkin\userkin.for(31): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (PRES, RPROPS_UPRES) -------------------------^
C:\userkin\userkin.for(32): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (VFRAC, RPROPS_UVFRAC) --------------------------^
C:\userkin\userkin.for(33): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (BETA, RPROPS_UBETA) -------------------------^
C:\userkin\userkin.for(34): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (VVAP, RPROPS_UVVAP) -------------------------^
C:\userkin\userkin.for(35): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (VLIQ, RPROPS_UVLIQ) -------------------------^
C:\userkin\userkin.for(36): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (VLIQS, RPROPS_UVLIQS) --------------------------^
C:\userkin\userkin.for(37): Error: This name does not have a type, and must have an explicit type.
EQUIVALENCE (B(1), IB(1)) -------------------------^
C:\userkin\userkin.for(99): Error: This name does not have a type, and must have an explicit type.
VBED=RCSTRR_VFRRC -------------^
C:\userkin\userkin.for(164): Error: This name does not have a type, and must have an explicit type.
RCARO2=KOVER*PO2*1.0D4/1.0D3*(1.0D0-VBED)*RCSTRR_VOLRC --------------------------------------------------
Error executing df.exe.
userkin.exe - 14 error(s), 7 warning(s)
Thank you so much!
Reply #22018-02-07
The data types of custom variables aren’t defined, right? For example: unconventional components, the molecular weight XMW of unconventional components (NCOMP_NCC), etc
Reply #32018-02-07
Thank you. How should the data types of the custom variables related to this program be defined? I hope you will kindly offer your guidance!

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.