CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Carrays (http://www.cfd-online.com/Forums/openfoam-solving/59855-carrays.html)

shuo January 16, 2007 20:03

Hi For some reason my code
 
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

hartinger January 17, 2007 07:15

you can check the used memory
 
you can check the used memory with the command 'top', but my guess is, that you access your array out of its bounds

mattijs January 22, 2007 06:54

"flow_field(){variable = 0;}"
 
"flow_field(){variable[VertG][HoriG] = 0;}" will index outside 'variable'.

Use e.g. valgrind to pick up these errors.


All times are GMT -4. The time now is 10:16.