fix sizeof(size_t) bug on 64bit arch
fix gatherv array length bug