Is 922.1 MB signifi...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Is 922.1 MB significant? (Computer calculating stuff content)

21 Posts
11 Users
0 Reactions
56 Views
Posts: 0
Free Member
Topic starter
 

I'm running a simulation program written in Fortran and compiled using G77 on a 64bit 8 core PC running Debian. It simulates the magnetic properties of nuclei.

The simulation works for small systems (up to 6 centers) but whenever I try and run a 7 center simulation, it keels over when the memory usage on the PC goes up to 922.1MB. The CPUs only ever get a 13% load.

I'm out of ideas, so was wondering if this 922.1 MB is significant in computing terms


 
Posted : 24/02/2011 10:50 am
Posts: 251
Full Member
 

922.1Mb isn't a lot but it might be significant in Fortan - is there a maximum number it can cope with?

It's mor elikely to be a limitation of the OS or programming language (or DB if you're trying to write it to a 'proper' database rather than just as a single file).

[Edit] I wonder if you're hittign 1 Gb with other stuff in memory too - might be the max a 64bit Fortran can address?


 
Posted : 24/02/2011 10:53 am
Posts: 0
Free Member
 

I shouldn't have thought so - I run FE jobs on an 8 core 64 bit machine (Windows) and it'll chug along for days at a time at 90+% CPU load using most of its 64Gb of RAM.


 
Posted : 24/02/2011 10:53 am
Posts: 77691
Free Member
 

It's not a limit I've seen before. My opening gambit would probably be "that's probably where the faulty part of your DIMM is."

Run memtest (google it, you might need to download it and burn it to a CD). Alternatively, if you've got more than one memory stick, you could swap them over and see if the crash point changes.

Checking the disk wouldn't hurt either, just in case.


 
Posted : 24/02/2011 10:54 am
Posts: 91097
Free Member
 

With what does it keel over?

And how much free space is there when that happens?


 
Posted : 24/02/2011 10:56 am
Posts: 0
Free Member
 

How much memory is in the machine? How much swap space is allocated?

to check swap space it's: $ cat /proc/swaps

to check memory: $ free -m

edited to say that memtest86+ is probably already installed (and is in the debian repositories if not).


 
Posted : 24/02/2011 10:56 am
Posts: 0
Free Member
 

chkdsk - fail!

EDIT: Just seen you re-edit your post...


 
Posted : 24/02/2011 10:57 am
Posts: 8177
Free Member
 

Are you creating a file? Is there a 2GB file size limit you've hit?


 
Posted : 24/02/2011 10:58 am
Posts: 77691
Free Member
 

Just seen you re-edit your post...

Yeah, I spotted the OP was using *nix after I'd posted the initial reply, mia culpa.


 
Posted : 24/02/2011 11:08 am
Posts: 1594
Full Member
 

Is it actually the file size that is being complained about? Or is it that you are hitting a maximum number of array elements?


 
Posted : 24/02/2011 11:09 am
Posts: 0
Free Member
Topic starter
 

Thanks for the replies

Theres 1.5GB available for swap, and 32GB of memory free too.

I don't belive it's trying to write a file to disk, it should just be calculating a matrix (I'm not entirely sure how the program works, I didn't write it!)

I've run a memory testing program and that reported back ok.

Just using a stress testing program to check the rest of the system is ok too.


 
Posted : 24/02/2011 11:13 am
Posts: 0
Free Member
Topic starter
 

I should clarify, when I say keels over, I mean a complete freeze of the system, no mouse response, no keyboard response. The machine was left on overnight to check it hasn't just busy, but only way to recover was with a reset.


 
Posted : 24/02/2011 11:14 am
Posts: 0
Free Member
 

32GB! Your system is somewhat different to what I had been imagining!

Could you set up a virtual system on your machine and run the program in that? <stepping outside anything I really know about> You might then be able to spy on the virtualized system and see at what point it locks itself up? <back to reality>

Plenty of nice virtualization software out there - not my area but happy to ask a few who know if that's a route you might want to try (equally, I'll bet there are specialists here!).


 
Posted : 24/02/2011 11:25 am
 IA
Posts: 563
Free Member
 

The fact it's fortran and probably written by a physicist is ringing alarm bells. Is the code known to be solid, reliable and work previously/on other machines for that size of simulation?

I'd be more inclined to blame the program than the hardware, from personal experience...

I suspect the memory usage isn't the issue, merely a symptom. Pointing perhaps to a data structure getting out of bounds. Is the complexity (time/space) of the algorithms in use known? It may be that going from 6-7 centres is enough to push it into effectively uncomputable territory.

Also, are you sure about 922, or is that just when your reporting locks up - i.e. it could be more. I've had linux systems lock up on me when programs run out of both memory and swap.


 
Posted : 24/02/2011 11:29 am
Posts: 1594
Full Member
 

Some kind of stack/memory/pointer overflow in the software?

And a good call on the virtualisation... you can run either VirtualBox or VMWare very easily. With VMWare Converter you should even be able to take a virtual copy of your current machine to use too! Although it might just be easier to generate a new VM and install.


 
Posted : 24/02/2011 11:30 am
Posts: 251
Full Member
 

[i]fortran and probably written by a physicist[/i]

"schrodinger's code" - looking for a result invalidates the experiment?


 
Posted : 24/02/2011 11:30 am
 IA
Posts: 563
Free Member
 

fortran and probably written by a physicist

"schrodinger's code" - looking for a result invalidates the experiment?

No, just experience working with physicists who have to write programs, often in Fortran. I once saw some java code, that had been translated to Java from Fortran by a physicists who'd never done any programming (certainly no OO) before bar a little Fortran. The original program was similar in origins. The outcome Java code was....indescribable.

However, I don't mean to criticise. I'm well aware if the physicists set me at the equations/models I'd probably fare as well as they do when set at code.


 
Posted : 24/02/2011 11:34 am
Posts: 91097
Free Member
 

The fact it's fortran and probably written by a physicist is ringing alarm bells

Lol yes 🙂 That fact probably isn't the cause of the lock-up, however it could probably be re-written to use up 922kB and take 5 mins 🙂

Our Physics postgrads used to write long simulations that chewed up loads of power. There was a bit of bragging to be honest about how long their programs would take to run. Someone sent round a mail saying 'don't touch this machine my program is gonna take three weeks to run!'. Well the sysadmin saw this and tweaked the code, resulting in a total run time of 30 mins for the same sim 🙂


 
Posted : 24/02/2011 11:37 am
Posts: 0
Free Member
 

I'm one of those Virtualisation people 🙂


 
Posted : 24/02/2011 12:34 pm
Posts: 0
Free Member
 

For it to freeze completely its probably something wrong with the hardware or a kernel driver issue. A user space program should not be able to bring the system down completely.

Does the program use any special drivers or kernel modules etc ?


 
Posted : 24/02/2011 1:05 pm
Posts: 0
Free Member
Topic starter
 

Thanks for peoples suggestions, currently setting up a VM to have a go with it there.

The only thing I'm certain of is that it uses the lapack library for matrix diagonalization.


 
Posted : 24/02/2011 1:21 pm
Posts: 0
Free Member
 

xiphon - Member

I'm one of those Virtualisation people 😀

😀


 
Posted : 24/02/2011 1:28 pm