Replaced my own function with MPI_DIMS_CREATE