Removed merging on same compute node

This commit is contained in:
Anthony Scemama 2020-06-01 23:30:07 +02:00
parent b837d4f346
commit 5d715b95d1
1 changed files with 5 additions and 3 deletions

View File

@ -429,7 +429,7 @@ let merge ~create_key ?update_block_id ?update_value ?update_weight t =
if (x>y) then 1
else if (x<y) then -1
else 0)
|> List.rev_map (fun (x,y) -> y)
|> List.rev_map snd
|> List.rev
}
@ -555,8 +555,9 @@ let ( /! ) = two_variable_operator
let compress =
merge
~create_key:(fun block ->
Printf.sprintf "%s %10.10d" (Compute_node.to_string block.Block.compute_node)
(((Block_id.to_int block.Block.block_id)+1)/2))
Printf.sprintf "%s %10.10d %10.10d"
(Compute_node.to_string block.Block.compute_node) block.Block.pid
(((Block_id.to_int block.Block.block_id)+1)/2))
~update_block_id:(fun block_id ->
((Block_id.to_int block_id)+1)/2
|> Block_id.of_int )
@ -678,6 +679,7 @@ let compress_files () =
| Not_found -> true
)
|> List.rev_map (fun x -> dir_name^x)
|> List.rev
in
let out_channel_dir =