Add rank0 and rename rank to rank1. [skip ci]