Re: [Hampshire] 'Killed' response when running program from command-line
On 17 Jan 2014, at 08:56, Bob Dunlop wrote: > I wonder what valgrind tells you. "valgrind command" will run the command > and give you a summary of dynamic memory allocated and freed. > Also worth running "size command" as I've seen Fortan programs with huge > static memory allocations, add up the bss and data values. Wow - I get the following result from size: textdata bss dec hex filename 1733582 21888 1123936088 1125691558 4318b0a6./sixsV1.1 Which seems to suggest that the bss segment (apparently the size of variable storage) is over 1Gb in size…that might explain my problems! Thanks for all your help, Cheers, Robin -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] 'Killed' response when running program from command-line
On 17 January 2014 08:56, Bob Dunlop wrote: > > I don't know but I bet it's humungous. > Ever since university when I was introduced to the phenomena (they actually > used the guys work as an example of how not to do things), whenever I see > Fortran mentioned I think "Dumb physicist who knows no other way to do > matrix maths". Closely followed by "Dumb physicist with huge N-dimensional > arrays with only half a dozen set points" and "haven't they heard of sparse > matrix calculations". > > The only thing 30 years has taught me about the Fortran rule is that "Dumb > physicist" is an assumption, works just as well for "Dumb chemist", "Dumb > geoscientist" etc. The assumption that Fortan will be a memory hog holds. > Fortran has some advantages when used for maths calculations. It handles exception cases in floating point calculations that few other languages do. Caveat being that you can use specially designed math libraries with other languages to achieve handling of exception cases in floating point calculations. fortran has methods for properly handling spare matrix, but a "dumb physicist" maybe was not aware of them. Don't get me wrong, the last time I used fortran was 20 years ago, but I do recognize the areas where fortran can be the best tool. As an example, the last complex mathematics algorithm I had to implement, I did it in C with a special maths lib to ensure the accuracy of the results. The algorithm was taking data in from 150 data streams, doing its calculations and producing results in real time. It was working on streams of global positioning data, and endevouring to detect positioning errors in the data streams. Kind Regards James -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] 'Killed' response when running program from command-line
Hi, On Thu, Jan 16 at 09:02, Robin Wilson wrote: > 2. I'm intrigued as to how much memory this program uses - I thought it > wouldn't be much but obviously I was wrong. I would normally just use top, > but the program executes very quickly and so I don't have chance to do > anything like that - is there something I can run the program with that will > tell me the total memory usage once the program has exited? I don't know but I bet it's humungous. Ever since university when I was introduced to the phenomena (they actually used the guys work as an example of how not to do things), whenever I see Fortran mentioned I think "Dumb physicist who knows no other way to do matrix maths". Closely followed by "Dumb physicist with huge N-dimensional arrays with only half a dozen set points" and "haven't they heard of sparse matrix calculations". The only thing 30 years has taught me about the Fortran rule is that "Dumb physicist" is an assumption, works just as well for "Dumb chemist", "Dumb geoscientist" etc. The assumption that Fortan will be a memory hog holds. I wonder what valgrind tells you. "valgrind command" will run the command and give you a summary of dynamic memory allocated and freed. Also worth running "size command" as I've seen Fortan programs with huge static memory allocations, add up the bss and data values. -- Bob Dunlop -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] 'Killed' response when running program from command-line
All, I've managed to solve this now. Setting it up on a server instance with more RAM (8Gb compared to 2Gb) worked fine, so I assume it was an out of memory error. However, I have a couple of questions: 1. Does anyone have any idea why the fact that the process was killed due to low memory wasn't logged? Or was it logged, but I just couldn't find it (I recursively searched in /var/log though…) 2. I'm intrigued as to how much memory this program uses - I thought it wouldn't be much but obviously I was wrong. I would normally just use top, but the program executes very quickly and so I don't have chance to do anything like that - is there something I can run the program with that will tell me the total memory usage once the program has exited? Cheers, Robin On 16 Jan 2014, at 20:19, Robin Wilson wrote: > Thanks Al. That gives: > > execve("./sixsV1.1", ["./sixsV1.1"], [/* 21 vars */] > +++ killed by SIGKILL +++ > Killed > > So it is obviously being SIGKILLed by someone/something. I don't understand > the first line of output - does that tell us anything interesting? It's > really strange - I've never had this problem before with this program, and > I've run it on many machines. > > I've checked it isn't the Fortran compiler producing executables that always > die: a Hello World program compiled with the same compiler runs fine. > > Is it always the case the the Out of Memory Killer will log that it has > killed something? I find the fact that I can't find anything in the logs > anywhere very suspicious. > > Cheers, > > Robin > > > On 16 Jan 2014, at 20:15, Alan Pope wrote: > >> On 16 January 2014 19:30, Robin Wilson wrote: >>> robintw@test:~/Py6S/6S/6SV1.1$ ./sixsV1.1 >>> Killed >>> >>> Does anyone have any idea what I can do to try and work out what's >>> happening? >>> >> >> strace it? >> >> strace ./sixsV1.1 >> >> Cheers, >> Al. >> >> -- >> Please post to: Hampshire@mailman.lug.org.uk >> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire >> LUG URL: http://www.hantslug.org.uk >> -- > > > -- > Please post to: Hampshire@mailman.lug.org.uk > Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire > LUG URL: http://www.hantslug.org.uk > -- -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] 'Killed' response when running program from command-line
Thanks Al. That gives: execve("./sixsV1.1", ["./sixsV1.1"], [/* 21 vars */] +++ killed by SIGKILL +++ Killed So it is obviously being SIGKILLed by someone/something. I don't understand the first line of output - does that tell us anything interesting? It's really strange - I've never had this problem before with this program, and I've run it on many machines. I've checked it isn't the Fortran compiler producing executables that always die: a Hello World program compiled with the same compiler runs fine. Is it always the case the the Out of Memory Killer will log that it has killed something? I find the fact that I can't find anything in the logs anywhere very suspicious. Cheers, Robin On 16 Jan 2014, at 20:15, Alan Pope wrote: > On 16 January 2014 19:30, Robin Wilson wrote: >> robintw@test:~/Py6S/6S/6SV1.1$ ./sixsV1.1 >> Killed >> >> Does anyone have any idea what I can do to try and work out what's happening? >> > > strace it? > > strace ./sixsV1.1 > > Cheers, > Al. > > -- > Please post to: Hampshire@mailman.lug.org.uk > Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire > LUG URL: http://www.hantslug.org.uk > -- -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] 'Killed' response when running program from command-line
On 16 January 2014 19:30, Robin Wilson wrote: > robintw@test:~/Py6S/6S/6SV1.1$ ./sixsV1.1 > Killed > > Does anyone have any idea what I can do to try and work out what's happening? > strace it? strace ./sixsV1.1 Cheers, Al. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
[Hampshire] 'Killed' response when running program from command-line
Hi, I've just got access to a new cloud server, and am trying to setup various things on it for my work. One of these is a legacy Fortran program that I have compiled, and am trying to run. However, whenever I run it I get the output: robintw@test:~/Py6S/6S/6SV1.1$ ./sixsV1.1 Killed Everything I've seen online suggests that this is due to running out of memory, but the program uses very little memory, and I've got around 0.5Gb free. I can't find any reference to this program being killed in dmesg or in any of the log files that I've looked at (kern.log, anything under syslog etc). Does anyone have any idea what I can do to try and work out what's happening? Cheers, Robin -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --