SCOTCH mesh partitioner doesn't return

I’m running a 3D reaction-diffusion simulation with a tetrahedral elements stored in h5 files. With some combinations of MPI ranks and number of mesh elements, the SCOTH partitioner gets stuck, this happens in the dolfin::HDF5File()::read() function.
Does anyone know what to take into account regarding the mesh sizes/ number mpi ranks or even a workaround?