In initialization of multistage checkpointing
|
v = get_write_and_read_counts(); |
|
sort(v.begin(),v.end()); |
|
mid=v[snaps-sn_ram]; |
|
// cout << mid << endl; |
|
for(int i=snaps-1;i>=0;i--) |
|
{ |
|
if(v[i]>=mid && num<sn_ram) |
|
{ |
|
where[i]=true; |
|
num++; |
|
} |
|
else |
|
{ |
|
where[i]=false; |
|
} |
|
} |
since v is sorted this always sets the last sn_ram elements of where to true, and the other elements to false, irrespective of the result of get_write_and_read_counts.
I think v should be copied before the sort (e.g. into w), and then the conditional replaced with
if(w[i]>=mid && num<sn_ram)
In initialization of multistage checkpointing
pyrevolve/src/revolve.cpp
Lines 1170 to 1185 in 23dea91
since
vis sorted this always sets the lastsn_ramelements ofwheretotrue, and the other elements tofalse, irrespective of the result ofget_write_and_read_counts.I think
vshould be copied before thesort(e.g. intow), and then the conditional replaced with