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

Run time check failure

inkant
Novice
1,316 Views
Hi IFORT users,

System- 2quad procs Intel Xeon
OS- RHEL 2.6.18-128.1.14.el5 x86_64.


My code is written using IMPLICIT DECLARATIONS
IMPLICIT DOUBLE PRECISION(A-H,O-Z)

I am using following command line arguments to check my code:

ifort -O2 -xhost -g -traceback -fp-stack-check -heap-arrays -check all -fp-stack-check -gen-interfaces -warn interfaces gridgen.f jun18.f output.f reaction.f -ometh

These are the compiler remarks:

jun18.f(15357): (col. 7) remark: BLOCK WAS VECTORIZED.
jun18.f(15366): (col. 7) remark: BLOCK WAS VECTORIZED.
reaction.f(682): (col. 7) remark: BLOCK WAS VECTORIZED.


While running the output file the run-time check fails and reports following:

forrtl: severe (193): Run-Time Check Failure. The variable 'input_data_$DA' is being used without being defined
Image PC Routine Line Source
meth 0000000000765DC1 Unknown Unknown Unknown
meth 0000000000764D95 Unknown Unknown Unknown
meth 000000000071EF5A Unknown Unknown Unknown
meth 00000000006EE3F2 Unknown Unknown Unknown
meth 00000000006F0468 Unknown Unknown Unknown
meth 00000000006DFF3E input_data_ 328 reaction.f
meth 000000000040D85A MAIN__ 259 jun18.f
meth 000000000040331C Unknown Unknown Unknown
libc.so.6 00000034DBE1D974 Unknown Unknown Unknown
meth 0000000000403229 Unknown Unknown Unknown


input_data_
is a SUBROUTINE defined in reaction.f
at line 259 in jun18.f the call is made:
CALL input_data(nth, nr_g, nr_l, diam0, r_inf, r_0p,
& y_inf, ReDg, Prg, Schmg, xLeg, ReDl, Prl,
& Schml, Wel, nspace_rg, s0_rg, s1_rg, nspace_rl,
& s0_rl, s1_rl, nspace_th, s0_th, s1_th,
& dt_g, dt_l, nctr, ignite, nspecs, iguess,
& tryignite)

line 328 in reaction.f is a WRITE statement:

WRITE(*,1000) ReDg,ReDfs,Prg,Da,Schmg,xLeg,Eckrtg

I am wondering why run-time check is failing? What other options can I try ?

Best Regards,
Inkant



0 Kudos
1 Solution
bubin
New Contributor I
1,316 Views
As far as I understood, Da is a local variable in input_data. I suspect if you simply add Da=0.0D0 statement in the beginning of that subroutine, things should be ok without doing anything else. However, as it was suggested above, there might be a bug in the compiler, so it is a good idea to let the ifort developers test your code and fix that bug in future releases of ifort.

Edit: oops... you posted your last message while I was typing this one.

View solution in original post

0 Kudos
10 Replies
bubin
New Contributor I
1,316 Views
It looks like you simply tried to print variable Da before it was used (i.e. before it was assigned some value).
If you could show that line of your code labelled 1000 it would be very helpful. Perhaps the format in that line is wrong.
0 Kudos
inkant
Novice
1,316 Views
Quoting - bubin
It looks like you simply tried to print variable Da before it was used (i.e. before it was assigned some value).
If you could show that line of your code labelled 1000 it would be very helpful. Perhaps the format in that line is wrong.
Hi,

I think All these values have been addressed with correct format descriptors:

1000 FORMAT(/,'Gas-Phase Dimensionless Parameters',/,
& ' ReD = ',E13.6,/,
& ' Reinf = ',E13.6,' (freestream properties)',/,
& ' Pr = ',F8.5,/,
& ' Da = ',E13.6,/,
& ' Schm = ',F8.5,/,
& ' Le = ',F8.5,/,
& ' Eck = ',E13.6)

Best,
Inkant
0 Kudos
rreis
New Contributor I
1,316 Views
some ideas

maybe add the flags

-warn declarations

do you have "implicit none" in the subroutine? where is DA defined?
0 Kudos
inkant
Novice
1,316 Views
Quoting - rreis
some ideas

maybe add the flags

-warn declarations

do you have "implicit none" in the subroutine? where is DA defined?
I have tried that with -warn all
However, as the compiler shows that it is a variable input_data_$DA, it is NOT! it is rather a SUBROUTINE.
I do not have Implicit NONE anywhere.

Inkant
0 Kudos
rreis
New Contributor I
1,316 Views
"implicit none" is nice because it doesn't let you have undeclared variables...
0 Kudos
rreis
New Contributor I
1,316 Views
what happens if before the write statment you do


print *, DA
call flush(6)


?
0 Kudos
Steven_L_Intel1
Employee
1,316 Views
You can disable the check for uninitialized variables, which is the one failing here. It is possible that this is a compiler bug - can you provide us with a test case that shows the problem?
0 Kudos
inkant
Novice
1,316 Views
You can disable the check for uninitialized variables, which is the one failing here. It is possible that this is a compiler bug - can you provide us with a test case that shows the problem?
Thanks Steve and Rick,

Yes, indeed was due to check for uninitialized variables. With disabling nouninit, it worked.

ifort -O2 -xhost -g -traceback -fp-stack-check -heap-arrays -check all -check nouninit -fp-stack-check -gen-interfaces -warn interfaces gridgen.f jun18.f output.f reaction.f -ometh

Best Regards,
Inkant
0 Kudos
bubin
New Contributor I
1,317 Views
As far as I understood, Da is a local variable in input_data. I suspect if you simply add Da=0.0D0 statement in the beginning of that subroutine, things should be ok without doing anything else. However, as it was suggested above, there might be a bug in the compiler, so it is a good idea to let the ifort developers test your code and fix that bug in future releases of ifort.

Edit: oops... you posted your last message while I was typing this one.
0 Kudos
inkant
Novice
1,316 Views
Quoting - bubin
As far as I understood, Da is a local variable in input_data. I suspect if you simply add Da=0.0D0 statement in the beginning of that subroutine, things should be ok without doing anything else. However, as it was suggested above, there might be a bug in the compiler, so it is a good idea to let the ifort developers test your code and fix that bug in future releases of ifort.

Edit: oops... you posted your last message while I was typing this one.
Thank you so much Bubin !

This was indeed the case. Da was not initialized. I could not understand the compiler message !
This is not a compiler bug so I suppose it may not be required to upload the code.
So here is what I can figure out now
input_data_$DA (input_data:is the subroutine, and DA: is the variable).

Best Regards,
Inkant.
0 Kudos
Reply