Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

64-bit conversion - Program Crash After Array Allocation (unless I write something???)

yood
Beginner
1,060 Views
Hi, I have Intel Fortran Compiler 8.1 running on a 64-bit Itanium2
under Windows XP-64 version 2003. I have a Fortran program
linking to a Fortran DLL. It all compiles and links fine.

I can run the program, however when I try to set an element of a
dynamically allocated array (real*8). It causes a crash:

forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source

detailopt.exe 000000000040C134 Unknown UnknownUnknown
detailopt.exe 0000000000404510 UnknownUnknown Unknown
detailopt.exe 0000000000581CF0 UnknownUnknownUnknown
detailopt.exe 000000000056B1E0 UnknownUnknownUnknown
kernel32.dll 0000000077D24510 UnknownUnknownUnknown

32-bit versions of the same code work fine. I'm not sure if I'm
compiling/linking these up correctly. I notice that the size of the
64-bit DLL is very small when compared with every other piece
of Fortran code I've converted from 32-bit to 64-bit.

I was able to come up come up with the following solution / even
more perplexing situation. I have discovered that if I put a simple
write statement like:

write(6,'(/a)') ' here is the stat array '

immediately after allocation, then the allocatable array is fine and
the program runs to completion. Without the write statement -
crash/burn as soon as the allocatable array is referenced in any
way.

I'm thinking its some kind of boundary problem or some such
thing. Is there any way to get around this and/or ensure this won't
happen or should I just have a nice display and call it a feature?

Any thoughts would be interesting.

Thankx to all who viewed my query,

Mark

Link to my previous (and unanswered) query:

64-bit DLL linking question / problem ?
http://softwareforums.intel.com/ids/board/message?board.id=5&message.id=16999

0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,060 Views
We'd need to see a complete source in order to help with this. Please submit a test case to Intel Premier Support.
0 Kudos
3danim8
Beginner
1,060 Views
Hi,

Did you give Intel a copy of your code to investigate this issue? If so, did they give you any solutions to this issue?

I am having a similar problem with a code I am trying to move from the 32 to the 64-bit platform, due to memory constraints This work is being done on two brand new IBM pro workstations with 16 GB of RAM, one with Athlon and one with Intel processors.

I have a 16,000 line Fortran code (a numerical groundwater flow and transport code) that runs in 32-bit and compiles and links fine with Intel Fortran 9.1 on the 64-bit platform. However, once the input data is loaded from the files into memory and the code tries to use any of the dynamically allocated arrays, the program blows out of memory and a series of NAN's (not a number) show up in the output files. As far as I can tell, the input data is being read correctly and as the code moves towards iterations, that is when the problem occurs.

Incidently, I have also experienced the same problem using the Absoft 64-bit Fortran compiler. I have tested both compilers with other benchmarks and have determined that both compilers/linkers are working fine on these computers with Windows 64.

Thanks,

Ken


0 Kudos
Reply