CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Carrays

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2007, 20:03
Default Hi For some reason my code
  #1
shuo
Guest
 
Posts: n/a
Hi

For some reason my code keeps giving me a segmentation fault when there are too many arrays(70*70) calculations? Is it to do with memory?

SHuo
  Reply With Quote

Old   January 17, 2007, 07:15
Default you can check the used memory
  #2
Senior Member
 
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 17
hartinger is on a distinguished road
you can check the used memory with the command 'top', but my guess is, that you access your array out of its bounds
hartinger is offline   Reply With Quote

Old   January 22, 2007, 06:54
Default "flow_field(){variable = 0;}"
  #3
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
"flow_field(){variable[VertG][HoriG] = 0;}" will index outside 'variable'.

Use e.g. valgrind to pick up these errors.
mattijs is offline   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
Carrays shuo OpenFOAM Running, Solving & CFD 0 January 16, 2007 20:09


All times are GMT -4. The time now is 23:57.