Message1219

Author erez
Recipients erez, malte, silvia
Date 2011-01-23.11:11:44
Content
The landmarks code is not very efficient with memory, and this is compounded in 
64-bit mode. Examples with BJOLP configuration that Malte ran:

Woodworking #04: uses  737 MB with -m32, 1192 MB with -m64
Woodworking #14: uses 1277 MB with -m32, runs out of memory with -m64
Woodworking #15: uses 1583 MB with -m32, runs out of memory with -m64
Woodworking #24: uses  322 MB with -m32,  514 MB with -m64

Here are some places where the landmarks code uses lots of memory:

1. LandmarkNode has:

   vector<int> vars
   vector<int> vals
   set<int> first_achievers
   set<int> possible_achievers
   hash_set<pair<int, int>, hash_int_pair> forward_orders

Should be - 

   vector<var_num_t>  vars
   vector<state_var_t> vals
   set<operator_num_t> first_achievers
   set<operator_num_t> possible_achievers
   hash_set<pair<var_num_t, state_var_t>, hash_int_pair> forward_orders

If var_num_t, operator_num_t and state_var_t are all 32 bits, that would reduce 
the memory footprint of the landmarks by almost a half (there are some other 
members).

2. LandmarksGraph has:
    vector<int> empty_pre_operators
    vector<vector<vector<int> > > operators_eff_lookup
    vector<vector<vector<int> > > operators_pre_lookup
    vector<vector<set<pair<int, int> > > > inconsistent_facts
    hash_map<pair<int, int>, LandmarkNode *, hash_int_pair> simple_lms_to_nodes
    hash_map<pair<int, int>, LandmarkNode *, hash_int_pair> disj_lms_to_nodes
    hash_map<pair<int, int>, Pddl_proposition, hash_int_pair> pddl_propositions

should be - 

    vector<operator_num_t> empty_pre_operators
    vector<vector<vector<operator_num_t> > > operators_eff_lookup
    vector<vector<vector<operator_num_t> > > operators_pre_lookup
    vector<vector<set<pair<num_vars_t, state_var_t> > > > inconsistent_facts
    hash_map<pair<num_vars_t, state_var_t>, LandmarkNode *, hash_int_pair> 
simple_lms_to_nodes
    hash_map<pair<num_vars_t, state_var_t>, LandmarkNode *, hash_int_pair> 
disj_lms_to_nodes
    hash_map<pair<num_vars_t, state_var_t>, Pddl_proposition, hash_int_pair> 
pddl_propositions

3. LandmarkStatusManager uses StateProxy. If we add an ID for each state, we can 
replace this with a number, which might use less memory.
History
Date User Action Args
2011-01-23 11:11:44erezsetmessageid: <1295777504.9.0.873729380163.issue213@gmail.com>
2011-01-23 11:11:44erezsetrecipients: + erez, malte, silvia
2011-01-23 11:11:44erezlinkissue213 messages
2011-01-23 11:11:44erezcreate