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)
>>>
>
|