Hi, Jilong,

Your observation is basically correct.  However, in examples/ibis.cpp,
the configuration files provided on command line are read before the
constructor of ibis::fileManager could be called, and therefore any
specification of maxBytes should be honored when the constructor of
ibis::fileManager is invoked by the function
ibis::fileManager::instance().

If you are writing your own code to use FastBit, the way to ensure the
same behavior is to make sure you read your configuration files and
invoke ibis::init() before touching any other FastBit functions.

If for whatever reason you have started working with FastBit code and
have invoked ibis::fileManager::instance() somewhere, there is still
one more option for you to forcefully change the value of maxBytes,
through the function ibis::fileManager::adjustCacheSize (defined in
fileManager.h).

To see whether your specification has been passed to
ibis::fileManager, set message/verboseness level to 4 or higher.  Look
for lines with fileManager.maxBytes in the output file.

Hope this helps.

John




On 8/27/15 2:00 PM, wang jilong wrote:
> Hi, John,
> 
>  
> 
> In fastbit (2.0.2) index building utility ibis (with source code at
> examples/ibis.cpp),
> 
> setting “fileManager.maxBytes” via -c ibis.rc, or environment IBISRC
> somehow all failed.
> 
> It always sets to be the half of the physical memory.
> 
> I like to increase it to 20G, given 32G RAM on my index building machine.
> 
>  
> 
> Have checked the output file and read source file “examples/ibis.cpp”
> and “fileManager.cpp”,
> 
> It looks like that:
> 
> 1.  fileManager.maxBytes is a static data member, was first
> initialized in fileManager::fileManager()
> 
> 2.  there is only one instance of fileManager. It is static, and
> initialized in ibis::fileManager::instance()
> 
> 3.  may be due to C++ static objects always are initialized first,
>  the code above runs before main() prints “building indexes
> (nthreads=8,  indexingOption..” in examples/ibis.cpp main();
> 
>  
> 
> My question is: how shall we change fileManager.maxBytes for “ibis”,
> the index building utility?
> 
>  
> 
> I have searched our fastbit mail archive, found similar questions
> without the final answer.
> 
>  
> 
> May be I overlooked some not-so-obvious?
> 
>  
> 
> Please help and thanks in advance.
> 
>  
> 
> Jilong Wang
> 
>  
> 
>  
> 
> 
> 
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to