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

Program running without an end

apo
Beginner
855 Views

I have gota Fortran program originally created and run (without any problem and giving results) by Digital Visual Fortran 6.0. Now, I am trying to run this same program using Intel Fortran Compiler Integration for Microsoft Visual Studio* 2005, 11.0.3451.2005. After successfully building and compiling the program when I finally attemptto run it, after some successful calculations (that I can see on the screen) the program keeps running without providing with any results and without ever ending.

Can you please help me?

0 Kudos
6 Replies
Les_Neilson
Valued Contributor II
855 Views
Quoting - apo

I have gota Fortran program originally created and run (without any problem and giving results) by Digital Visual Fortran 6.0. Now, I am trying to run this same program using Intel Fortran Compiler Integration for Microsoft Visual Studio* 2005, 11.0.3451.2005. After successfully building and compiling the program when I finally attemptto run it, after some successful calculations (that I can see on the screen) the program keeps running without providing with any results and without ever ending.

Can you please help me?


The usual advice :
(a) use "implicit none" in your routines
(b) turn on all debugging diagnostics (e.g. Project -> Properties -> Fortran -> Run-time -> Runtime error checking (all or custom - especially array bounds, and uninitialised variables) )
(c) run the program through the debugger. If it continues with the same problem then you can click on the debug "pause" icon which will allow you to see where in you code it has reached. You will then have narrowed the problem down a bit.

(d) if you still are unable to fix the problem then post some code here and maybe someone will be able to help.

Les
0 Kudos
apo
Beginner
855 Views
Les,

Thank you very much for your reply and your help.

I indeed managed to narrow the problem down to the source. However when I am trying to debug the program I am getting the following Microsoft Visual Studio message : Unhandled exception at 0x004b57c7 in 3.exe: 0xC0000005: Access violation reading location 0x00000000

Apart from it there is a Fortran message:
forrtl:severe(157):Program Exception-access violation
Image PC Routine LineSource
3.exe 004B57A7 Unknown Unknown Unknown
3.exe0041289EUnknown Unknown Unknown
3.exe004057B5 _MAIN_ 278 Nf.for
3.exe 004BED83 UnknownUnknown Unknown
3.exe 0045F273Unknown Unknown Unknown
3.exe 0045F03D Unknown Unknown Unknown
kerne132.dll7C817067 Unknown Unknown Unknown


Can you please provide me with some help on this?
many thanks,
Apostolos
0 Kudos
Les_Neilson
Valued Contributor II
855 Views
Quoting - apo
Les,

Thank you very much for your reply and your help.

I indeed managed to narrow the problem down to the source. However when I am trying to debug the program I am getting the following Microsoft Visual Studio message : Unhandled exception at 0x004b57c7 in 3.exe: 0xC0000005: Access violation reading location 0x00000000

Apart from it there is a Fortran message:
forrtl:severe(157):Program Exception-access violation
Image PC Routine LineSource
3.exe 004B57A7 Unknown Unknown Unknown
3.exe0041289EUnknown Unknown Unknown
3.exe004057B5 _MAIN_ 278 Nf.for
3.exe 004BED83 UnknownUnknown Unknown
3.exe 0045F273Unknown Unknown Unknown
3.exe 0045F03D Unknown Unknown Unknown
kerne132.dll7C817067 Unknown Unknown Unknown


Can you please provide me with some help on this?
many thanks,
Apostolos

Are you running your program from Visual Studio IDE ?
if so :
Are you running the debug version ?
if so :
As a starting point look at your main program, the code aroundline 278.
Set a "break point" at the start of your main program then step [F10] through the code until, either you see something wrong, or the error occurs. You can use "watch" windows to see the value of variables as you step.
One common cause if this sort of error is a mismatch between what is passed to a subroutine and what it expects to receive.

Les
0 Kudos
apo
Beginner
855 Views
Les,

Thank you very much for your help.

Apostolos
0 Kudos
Les_Neilson
Valued Contributor II
855 Views
Quoting - apo
Les,

Thank you very much for your help.

Apostolos

Did you find the cause of the error ?
Les
0 Kudos
WSinc
New Contributor I
855 Views
Quoting - Les Neilson

Are you running your program from Visual Studio IDE ?
if so :
Are you running the debug version ?
if so :
As a starting point look at your main program, the code aroundline 278.
Set a "break point" at the start of your main program then step [F10] through the code until, either you see something wrong, or the error occurs. You can use "watch" windows to see the value of variables as you step.
One common cause if this sort of error is a mismatch between what is passed to a subroutine and what it expects to receive.

Les
Actually, if you turn on the GEN and WARN interface options, that should catch any mismatch between called routines and their callers in the argument list.

You can also try Ctl-C to trap it in the middle of an unending loop.
Hopefully, that will see where your loop is - - -
0 Kudos
Reply