Fatal error in PMPI Allgatherv: Internal MPI error!, error stack
This and a lot of other MPI errors arise because VASP does not adhere to the stricter MPI standers in newer MPI libraries.
export I_MPI_COMPATIBILITY=4 fixes it in most cases. It's possible this occurred more in the HSE part which has been rewritten in 5.4.1, have not tested.
In 5.3.5 these issues still existed as mentioned here: https://www.nsc.liu.se/~pla/blog/2014/04/30/vasp535/