Fix partition restart with mixed parallelization strategies
The partition restart is sometimes not working properly. I believe this is caused by not taking into account mixed parallelization strategies, which leads to a race condition when writting the partition restart files.