CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Could not run a Fortran program

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2006, 16:08
Default Could not run a Fortran program
  #1
Henry
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.

  Reply With Quote

Old   July 21, 2006, 17:04
Default Re: Could not run a Fortran program
  #2
Harish
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
  Reply With Quote

Old   July 22, 2006, 08:07
Default Re: Could not run a Fortran program
  #3
zonexo
Guest
 
Posts: n/a
maybe your matrix size is too big. that happen to me b4...
  Reply With Quote

Old   July 22, 2006, 12:05
Default Re: Could not run a Fortran program
  #4
rt
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)
  Reply With Quote

Old   July 22, 2006, 14:37
Default Re: Could not run a Fortran program
  #5
Henry
Guest
 
Posts: n/a
Thanks Harish, I use Fortran Powerstation 4.0 and I couldnot find such option to increase the cache size.
  Reply With Quote

Old   July 22, 2006, 14:41
Default Re: Could not run a Fortran program
  #6
Henry
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.
  Reply With Quote

Old   July 22, 2006, 15:01
Default Re: Could not run a Fortran program
  #7
Henry
Guest
 
Posts: n/a
Thanks a lot, rt. I will try to check it.
  Reply With Quote

Old   July 22, 2006, 15:09
Default Re: Could not run a Fortran program
  #8
Renato.
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.

  Reply With Quote

Old   July 22, 2006, 19:55
Default Re: Could not run a Fortran program
  #9
ztdep
Guest
 
Posts: n/a
try to add anothter memory
  Reply With Quote

Old   July 24, 2006, 08:44
Default Thanks, it can run now!
  #10
Henry
Guest
 
Posts: n/a
Thanks all,

It is the memory problem and I define the matrix smaller, then the program could run!
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute a Fortran program with Fluent marye FLUENT 5 December 1, 2012 16:25
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Fortran Program with FLUENT UDFs gautamcfd FLUENT 0 August 17, 2010 05:39
Fortran compiler for Transient run dinesh CD-adapco 1 January 10, 2009 08:06
Making program run faster Konstantinos CD-adapco 9 March 8, 2006 12:58


All times are GMT -4. The time now is 03:17.