December 27th, 2012, 01:21 PM
Killed message in gcc
I'm having trouble when running a program. It compiles without any problem using gcc but when it's running, after some iterations, it stops and appears "killed" on the terminal. It's a program about how an ideal gas in a box evolves in time. When I increase the number of particles in the box or increase the time I want the gas to evolve it stops itself. Any help on how to solve it? Why does the killed message appears? Thanks!!!
December 27th, 2012, 02:08 PM
The primary reason would be bugs in your code. Saying what is likely to be wrong would require you to post some code.
A secondary reason may be that your program takes up too much time / memory / file handles etc.
December 27th, 2012, 03:27 PM
this is a function used in main called time. ax, ay, az are the position of the particles in the box and bx by and bz are their velocity. N is the number of particles. T the total time, h the time between steps. This shows a killed message when running it when N or T are big (10000) (or h small). In fact we need N to be of the order of E23, is there any way that in a normal computer we can do that?
December 27th, 2012, 03:38 PM
I suggest you simulate particles in a small box.
With a million particles, or perhaps debug your program with 9 ideal gas particles.
I'm certain, absolutely certain that you can figure out the size of your box for N particles to make the density you need.
My computer has only 6e22 words of memory, so Mr. Avagadro can't work on MY computer.
[/code] are essential for python code and Makefiles!