|
[Sponsors] |
July 21, 2006, 17:08 |
Could not run a Fortran program
|
#1 |
Guest
Posts: n/a
|
Hello all,
I spent many days to finish the code of a fortran program. There is no error or warning when compiling every Subroutine. But there is a warning when I link them to build an "exe" file as the following: "warning LNK4084: total image size -673341440 exceeds max (268435456); image may not run Creating browse info file..." If I run the built "exe" file, there is a pop window coming out with the following error information: "Could not execute: Bad executable format(Win32 error 193)." Any suggestion please, thanks in advance. |
|
July 21, 2006, 18:04 |
Re: Could not run a Fortran program
|
#2 |
Guest
Posts: n/a
|
Memory problem.What compiler do you use?There is an option to increase cache size in some compilers.Try making dynamic allocation with memory deletion if you are using f90 or f95.
-H |
|
July 22, 2006, 09:07 |
Re: Could not run a Fortran program
|
#3 |
Guest
Posts: n/a
|
maybe your matrix size is too big. that happen to me b4...
|
|
July 22, 2006, 13:05 |
Re: Could not run a Fortran program
|
#4 |
Guest
Posts: n/a
|
Probably, it is due to large memory allocation. So if you assign large unusable memory you must decrease your dimension sizes and ... else if you need such large memory you must increase your RAM based on your allocation (note that your allowable memory allocation is equal to your RAM size + your assigned virtual memory, in win32 you can check it with alt+ctrl+del then performance tab and then check total memory)
|
|
July 22, 2006, 15:37 |
Re: Could not run a Fortran program
|
#5 |
Guest
Posts: n/a
|
Thanks Harish, I use Fortran Powerstation 4.0 and I couldnot find such option to increase the cache size.
|
|
July 22, 2006, 15:41 |
Re: Could not run a Fortran program
|
#6 |
Guest
Posts: n/a
|
I define many 3-d matrix around (100,100,20) and I will try to make it smaller to see what it will happen. thanks Zonexo.
|
|
July 22, 2006, 16:01 |
Re: Could not run a Fortran program
|
#7 |
Guest
Posts: n/a
|
Thanks a lot, rt. I will try to check it.
|
|
July 22, 2006, 16:09 |
Re: Could not run a Fortran program
|
#8 |
Guest
Posts: n/a
|
You'll need to use a linker parameter (something like /image:[image size]). I can't remember but you'll find it checking on the linker error messages by the number of the error 4084.
This boring problem could be solved with memory allocated dynamically. In this case you'll get success on compiling/linking your program and the lack of memory would appear only at runtime with the use of swap (a kind of memory extension on your hard disk). in order to use memory allocation you would do: real*8, allocatable :: a(:,:, allocate(a(100,100,5)) ! body of your program deallocate (a) Cheers Renato. |
|
July 22, 2006, 20:55 |
Re: Could not run a Fortran program
|
#9 |
Guest
Posts: n/a
|
try to add anothter memory
|
|
July 24, 2006, 09:44 |
Thanks, it can run now!
|
#10 |
Guest
Posts: n/a
|
Thanks all,
It is the memory problem and I define the matrix smaller, then the program could run! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Execute a Fortran program with Fluent | marye | FLUENT | 6 | December 9, 2019 19:53 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
Fortran Program with FLUENT UDFs | gautamcfd | FLUENT | 0 | August 17, 2010 06:39 |
Fortran compiler for Transient run | dinesh | Siemens | 1 | January 10, 2009 08:06 |
Making program run faster | Konstantinos | Siemens | 9 | March 8, 2006 12:58 |