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

Fortran

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2004, 08:40
Default Fortran
  #1
chinthakindi
Guest
 
Posts: n/a
Hello friends, I am getting one problem with fortran. i,e In my simulation for the jet, there r total 4.2 million control volumes, my RAM is 1.5 GB, i tryed to run the same code with another computer of 2GB RAM, in this case also i could able to run only 4.2 million control volumes, if i increase the the no of control volumes, i am getting segmentation fault ,, may i know what is the reason behind this,(my main interest is i want to increase my CV by increasing RAM size, but it is not working out) Please help me .. thankyou for your attention.
  Reply With Quote

Old   June 3, 2004, 11:05
Default Re: Fortran
  #2
Jarmo Monttinen
Guest
 
Posts: n/a
Look for "stack size" in your compiler manual, this may be to blame. I recall seeing similar problems with Digital Visual Fortran years ago and believe that was the solution.

-- Jarmo
  Reply With Quote

Old   June 3, 2004, 13:14
Default Re: Fortran
  #3
ag
Guest
 
Posts: n/a
If you get an error when you increase the number of volumes then you probably have an array overflow - compile with -C and see if the program indicates where/if such an array boundary error is occurring.
  Reply With Quote

Old   June 3, 2004, 18:04
Default Re: Fortran
  #4
Ananda Himansu
Guest
 
Posts: n/a
I believe MS Windows on a 32-bit processor sets a limit of 2 GB of RAM per process, even though it can itself access 4 GB on a single machine. Also, keep in mind that MS Windows uses up a fair chunk of memory for itself. One way to use up to 4 GB of memory on a single machine may be to parallelize your code with OpenMP or MPI, and run two processes with each using 2 GB.
  Reply With Quote

Old   June 4, 2004, 01:36
Default Re: Fortran
  #5
matej
Guest
 
Posts: n/a
it is easy to look when the code is running how much memory it swallows. But I guess the problem is,as Jarmo wrote, in stack size. Your variables and arrays are stored in stacks of some size. if you working in unix, you can try to set its size to unlimited by $ulimit unlimited .

Olso check the array definition.compile with the compiler switch checking the array boundaries. (in absoft it is -C in others other...).

the other tools to track what is going on are gdb debugger with electric fence - handy piece of code filling up the memory with scrap, so it can show you the place, where your code is shooting out of its defined memory space. It's not all the fancy icons and clicking, but it works well. Another similar tracking tool is 'strace'. sorry- all of them unix ...

matej
  Reply With Quote

Old   June 4, 2004, 15:28
Default Re: Fortran
  #6
chinthakindi
Guest
 
Posts: n/a
Hi Friends; I am working on UNIX, the problem may be due to stack size as mentioned Jarmo Monttinen, Jarmo Monttinen, can i know where i will get the manual for that, after seeing the manual, how we can rectify this problem. still now i am not much aware of this manual, Please let me know more details about this. thankyou
  Reply With Quote

Old   June 4, 2004, 19:51
Default Re: Fortran
  #7
Jarmo Monttinen
Guest
 
Posts: n/a
Well.. I would just see if the Unix computer you are using has any built-in manuals. For example with Fortran compiler, type in
: man f77 and you should get the manual for that. The stack size is probably limited by the system, not the compiler. I can't remember how exactly I modified it, it was something along
: limit stacksize unlimited As I could not find manual pages for "limit" or "stacksize" myself I'm guessing that is not the right form. But if you try for example
: man setrlimit you will get some info again. If everything else fails, do a google-search for "modifying stacksize in Unix" or something like that.

I hope this helps, sorry if I do not have the answer you are looking for.

-- Jarmo
  Reply With Quote

Old   June 4, 2004, 20:33
Default Re: Fortran
  #8
Nashat
Guest
 
Posts: n/a
Under bash in your .bashrc file add the following line:

ulimit -s unlimited

Regards, Nashat
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fortran Compiler-CFX12.1 Araz CFX 13 March 27, 2017 05:37
Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77 hawk Main CFD Forum 1 April 12, 2005 22:13
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45
Fortran77 or Fortran 90 Swapnil CFX 2 November 26, 2002 15:16
Why Favoring Fortran over C/C++? Zi-Wei Chiou Main CFD Forum 35 September 26, 2001 09:34


All times are GMT -4. The time now is 14:12.