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

Carrays

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

Reply
 
LinkBack Thread Tools 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: 8
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
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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

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
Carrays shuo OpenFOAM Running, Solving & CFD 0 January 16, 2007 20:09


All times are GMT -4. The time now is 04:11.