corrected PBC for 2 gpus