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

INPUTFILE READ FAIL

iwillflyhighergmail_
1,685 Views

Thanks a lot for the help. I compile this large HVACSIM+ project, however, when I compile this in Intel FORTRAN, it shows there is something wrong when try to read the input file. And Attched with the input file.

Thanks a lot for the help.

OPEN (2956,FILE="INPUTFILE.DAT",STATUS='UNKNOWN')

READ(2956,*) TMIN,TMAX,TSTOP

TMAXT = TMAX

c PRINT *,' Will the Initialization File be called? '

READ(2956,*) ANSWER

IF(ANSWER.EQ.'Y' .OR. ANSWER.EQ.'y') THEN

INIT=1

ENDIF

C Ask questions pertaining to all simulations

C Open input and output files

CALL OPNFIL(BLDSHL)

c PRINT *,' Do you want to use Reported Time for outputs ? '

READ(2956,*) ANSWER

IF(ANSWER.EQ.'Y' .OR. ANSWER.EQ.'y') THEN

MOUT=2

ELSE

MOUT=1

ENDIF

c PRINT *,' Do you wish to disable Freezing Variable feature ? '

READ(2956,*) ANSWER

IF(ANSWER.EQ.'Y' .OR. ANSWER.EQ.'y') THEN

FRZ = .FALSE.

ELSE

FRZ = .TRUE.

ENDIF

0 Kudos
11 Replies
KitturGanesh
Employee
1,685 Views
Hi,
This is the forum for Intel Parallel Studio, which supports only C/C++. You should submit any issues on Fortran compilation with Intel Fortran Compiler in the Fortran Forum at http://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/ or for Linux at http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/ or you can file an issue in Premier Support if you are using the 11.0 version of the Intel Fortram Compiler.

Let me know if you need any further clarification. In the meantime, I'll let our Fortran Compiler support team know about this link you've posted in this forum, just FYI.

-regards,
Kittur
0 Kudos
iwillflyhighergmail_
1,685 Views
Thank you very much, that helps a lot, as I work a lot to make it work, but actually it didn't .
Hi,
This is the forum for Intel Parallel Studio, which supports only C/C++. You should submit any issues on Fortran compilation with Intel Fortran Compiler in the Fortran Forum at http://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/ or for Linux at http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/ or you can file an issue in Premier Support if you are using the 11.0 version of the Intel Fortram Compiler.

Let me know if you need any further clarification. In the meantime, I'll let our Fortran Compiler support team know about this link you've posted in this forum, just FYI.

-regards,
Kittur

0 Kudos
Steven_L_Intel1
Employee
1,685 Views
Would you please reattach the data file but in a ZIP archive instead? For some reason, the .DAT did not come through.
0 Kudos
iwillflyhighergmail_
1,685 Views
Would you please reattach the data file but in a ZIP archive instead? For some reason, the .DAT did not come through.

Thank you very much
0 Kudos
Steven_L_Intel1
Employee
1,685 Views
Ok, thanks - I can get the file now. But the source you posted initially is incomplete. I need the declarations of the variables used in the READ statements.

Also, which statement gets the error and what is the exact and complete text of the error message?
0 Kudos
iwillflyhighergmail_
1,685 Views
Ok, thanks - I can get the file now. But the source you posted initially is incomplete. I need the declarations of the variables used in the READ statements.

Also, which statement gets the error and what is the exact and complete text of the error message?
Error

>modsim.exe!INDATA(LOGICAL(4) BLDSHL=.FALSE., INTEGER(4) ISPOS={...}, INTEGER(4) ISSHEL=5832334, INTEGER(4) ISVIEW=60030428, INTEGER(4) NSTVEC=60030520, REAL(4) TMAX=3600.000, REAL(4) TSTOP=36000.00, LOGICAL(4) VIEW=.FALSE., LOGICAL(4) INTSHL=.FALSE., INTEGER(4) MOUT=2236216) Line 283 + 0x51 bytesFortran

LOGICAL BLDSHL,INTSHL,VIEW,FRZ ! changed 1/16/97

CHARACTER ANSWER*1,LBLS(MAXLBL)*4

The value of BLDSHL is FALSE always, so I think there might be something wrong there, besides, the first line of the time might cause the problem too, my guess. Problem is that it works in Compa, it might can work here.

0 Kudos
Steven_L_Intel1
Employee
1,685 Views
You haven't said what the error is nor which statement gets the error. I do note that you have two reads of ANSWER but there is only one "n" before the lines beginning with SIMTEMP.dfn. Perhaps that routine you show a call of but no code for does more reads? What does it look like? Does it also use list-directed input to read character strings?
0 Kudos
iwillflyhighergmail_
1,685 Views
You haven't said what the error is nor which statement gets the error. I do note that you have two reads of ANSWER but there is only one "n" before the lines beginning with SIMTEMP.dfn. Perhaps that routine you show a call of but no code for does more reads? What does it look like? Does it also use list-directed input to read character strings?

Sorry, you said there are two reads of ANSWER, but I just see one, can you specify it? Thank you very much
0 Kudos
Steven_L_Intel1
Employee
1,685 Views

c PRINT *,' Will the Initialization File be called? '

READ(2956,*) ANSWER

IF(ANSWER.EQ.'Y' .OR. ANSWER.EQ.'y') THEN

INIT=1

ENDIF

C Ask questions pertaining to all simulations

C Open input and output files

CALL OPNFIL(BLDSHL)

c PRINT *,' Do you want to use Reported Time for outputs ? '

READ(2956,*) ANSWER

0 Kudos
iwillflyhighergmail_
1,685 Views

c PRINT *,' Will the Initialization File be called? '

READ(2956,*) ANSWER

IF(ANSWER.EQ.'Y' .OR. ANSWER.EQ.'y') THEN

INIT=1

ENDIF

C Ask questions pertaining to all simulations

C Open input and output files

CALL OPNFIL(BLDSHL)

c PRINT *,' Do you want to use Reported Time for outputs ? '

READ(2956,*) ANSWER


Thank you very much, I just find the problem, two problem here, one is a logical problem, as there are 7 answer in the inputfile, however, I only need 6, the other is it can not read character if I just put n, when I change it into 'n' then it works now.

Really appreciate for your help.
0 Kudos
Steven_L_Intel1
Employee
1,685 Views
I generally recommend against using list-directed input for non-delimited character data, but it does work. Can you show an example where it doesn't?
0 Kudos
Reply