#!/usr/bin/env bash
process_keys() {
  cat keys_rank0000_in.log keys_rank0001_in.log keys_rank0002_in.log keys_rank0003_in.log keys_rank0000_in.log keys_rank0001_in.log keys_rank0002_in.log keys_rank0003_in.log keys_rank0000_in.log keys_rank0001_in.log keys_rank0002_in.log keys_rank0003_in.log | sort -n -k 4 > keys_in.log
  cat keys_rank0000_out.log keys_rank0001_out.log keys_rank0002_out.log keys_rank0003_out.log keys_iter_l1_rank0000_out.log keys_iter_l1_rank0001_out.log keys_iter_l1_rank0002_out.log keys_iter_l1_rank0003_out.log keys_iter_l2_rank0000_out.log keys_iter_l2_rank0001_out.log keys_iter_l2_rank0002_out.log keys_iter_l2_rank0003_out.log | sort -n -k 4 > keys_out.log
}
. ./test_parallel.sh
test_parallel keyval_1 post_hook:process_keys \
  diff:keys_in.log:keys_out.log
