Verify the input data of load balancing with external partitioning data

In particular, throw an exception if a non-existing rank is requested.