Hello,
So that change in the C code would not fix the -m 2048 problem, it would
just mean that the memory usage is counted in words instead of bytes,
which means you need a smaller XXX in -m XXX. And when it is counted in
words, XXX=2048 for you is definitely way too large, because it would mean
that you are asking the C world part of Analysis for 8 Gb of memory (and
in fact it would be slightly more than that, since it doesn't count
everything, only the most important memory usages). So that is ignoring
the Python world memory usage. And you have 6 Gb of memory. So I would
say that with that change in the C code you ought to run with XXX=512 or
maybe 1024.
I tried -m 2048 on one of our 64-bit computers (some SuSE variant or
other) and it worked. But I'm pretty sure what is happening on your
computers is that the value is getting passed down to the C world not as a
C int but as something else (e.g. a long int) but the Analysis code uses
an int and checks for an int, so the long int (or whatever type it is) is
failing.
Wayne
On Sat, 27 Jun 2009, Vitaliy Gorbatyuk wrote:
> I have changed that line but it did not help. I still have the same situation
> (just let you know that I have 64-bit CentOS 5.3).
>
> Also, I have checked this memory feature (without fixing that line) on a
> different box with 64-bit RedHat 5.3. Both versions of Analysis 1.15 and 2.0.7 do
> not accept the size 2048. The version 2.0.7 gives the error in the popup window
> ending with "...must have one argument: max_size".
>
> Thank you,
> Vitaliy
>
> > Date: Fri, 26 Jun 2009 20:37:51 +0100
> > From: [log in to unmask]
> > Subject: Re: memeory footprint (was: Re: a more recent version for Mac?)
> > To: [log in to unmask]
> >
> > Hmmm, I think the problem with "-m 2048" must be a 32 bit / 64 bit
> > problem. So the number the C code gets is 2048*1024*1024 and that is
> > where 32 bit integers wrap around to being negative. But that in itself
> > would not raise an exception at the bit of code which gives the error
> > message you got, so my guess is that Python automatically treated that
> > number as a long instead of an int and the code is looking for an int.
> >
> > That -m XXX has XXX in megawords, so for your computer XXX should be at
> > most perhaps 1024. Hmmm, I just see that the C code looks inconsistent on
> > this front. So this size limit includes the data files and the contours,
> > and it looks like the former is in bytes, not words. Not very clever, and
> > that *might* explain (because of this 32-bit issue) why you're not
> > noticing any increase in memory usage.
> >
> > It is probably worth editing c/memops/global/block_file.c to see if that
> > helps. So starting on line 530 (at least in my version) you will see:
> >
> > if (add_mem_cache(block_file->mem_cache,
> > (Generic_ptr) block_data, sizeof(Float)*block_data->size,
> > delete_data_block, block_file) == CCPN_ERROR)
> >
> > Get rid of the "sizeof(Float)*", so replace with:
> >
> > if (add_mem_cache(block_file->mem_cache,
> > (Generic_ptr) block_data, block_data->size,
> > delete_data_block, block_file) == CCPN_ERROR)
> >
> > And then do make (in c/, not just in c/memops/global).
> >
> > Wayne
> >
> > On Fri, 26 Jun 2009, Vitaliy wrote:
> >
> > > Hi Wayne,
> > >
> > > On Tue, 12 May 2009 09:40:34 +0100, Wayne Boucher <[log in to unmask]>
> > > wrote:
> > >
> > >> Yes, it ought to help everyone (especially if you want to work with lots
> > >> of 3Ds or a few 4Ds, although if the latter are big enough it's going to
> > >> be slow I think).
> > >>
> > >> Wayne
> > >
> > > I did not see any difference in memory usage (shown by 'top') between when I
> > > start Analysis with the default setting (just 'analysis') and when I start
> > > it with 'analysis -m 1024'. Also, when I started it with 'analysis -m 2048'
> > > I get the error attached bellow.
> > >
> > > My computer works very slow with my ccpn project and I am looking for the
> > > reason. I have installed 6GB RAM total (before I had 2GB) and hoped I could
> > > speed it up with this command. But seems it does not work for me. After I
> > > start Analysis I can see that it takes 1GB of RAM, no matter how I start it.
> > >
> > > Thank you,
> > > Vitaliy
> > >
> > > [vitaliy@pioneer ARIA2]$ analysis1 -m 2048
> > > CCPNMR Analysis Version 1.0. Release 15 (Copyright 2003-2006 CCPN)
> > > Distribution created Tue Jul 3 09:00:52 2007
> > >
> > > If you use this software, please quote the following reference:
> > >
> > > Wim F. Vranken, Wayne Boucher, Tim J. Stevens, Rasmus H. Fogh, Anne
> > > Pajon, Miguel Llinas, Eldon L. Ulrich, John L. Markley, John Ionides
> > > and Ernest D. Laue (2005). The CCPN Data Model for NMR Spectroscopy:
> > > Development of a Software Pipeline. Proteins 59, 687 - 696.
> > >
> > > The FAQ is at: http://www.ccpn.ac.uk/ccpn/software/ccpnmr-analysis/faq
> > > For further help see the mailing list: http://www.jiscmail.ac.uk/ccpnmr
> > >
> > >>>> Exception in Tkinter callback
> > > Traceback (most recent call last):
> > > File "/usr/lib64/python2.4/lib-tk/Tkinter.py", line 1345, in __call__
> > > return self.func(*args)
> > > File "/usr/local/ccpnmr/ccpnmr1.0/python/memops/gui/BasePopup.py", line
> > > 227, in ok
> > > if (not self.apply()):
> > > File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/memops/editor/OpenProjectPopup.py", line
> > > 142, in apply
> > > self.callback(self.project)
> > > File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/AnalysisPopup.py", line
> > > 949, in initProject
> > > Analysis.initProject(self, project)
> > > File "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py",
> > > line 394, in initProject
> > > self.mem_cache = MemCache(self.cache_size)
> > > MemCache.error: must have one argument: max_size
> > >>>>
> > >
> > >
> > >
> > >
> > >
> > >> On Tue, 12 May 2009, Marco Roeben wrote:
> > >>
> > >>> Hi Wayne,
> > >>>
> > >>>> One other thing you could do is to increase the memory footprint of
> > >>>> Analysis. So if you do:
> > >>>>
> > >>>> analysis -m 512 ....
> > >>>>
> > >>>> then it will allow up to 512 megabytes (if I'm reading the code
> > >>>> correctly!) to be cached in the C world (so the Python world will also use
> > >>>> memory, in addition). The default is 128.
> > >>>
> > >>> Do you think this would also make sense on systems with enough RAM?
> > >>>
> > >>>
> > >>> best regards
> > >>> Marco
> > >>>
> > >>> --
> > >>> Dipl. Chem. Marco Röben
> > >>> Leibniz-Institut für Molekulare Pharmakologie (FMP)
> > >>> dep.: Solution NMR
> > >>> Robert-Rössle-Str. 10
> > >>> D-13125 Berlin
> > >>> +49-30-94793224 (phone)
> > >>> +49-030-94793169 (fax)
> > >>>
> > >
>
>
|