I am not familiar with mpi.set_start_method, but I see that the reason to use it in main is to ensure it is called only once.
So you might have a workaround by using an an empty file as a lock.
i.e. before you invoke set_start_method you check if the file is present, if it is not, you create it and use set_start_method; otherwise, if the file is present, another process has already called set_start_method.
Even we can use multiprocessing, real_robots (0.1.16) never calls end_extrinsic_phase() method, so we have no idea when to terminate our subprocesses. (Maybe bug?)
Yes, it is a bug. I see now that at the end of the extrinsic phase, end_extrinsic_trial() is called again instead of end_extrinsic_phase().
It is too late now to release a fix (it might be disruptive with just a few hours for the final submissions), however you can still catch the end of the extrinsic_phase by detecting when end_extrinsic_trial is called two times in a row
The controller code might be like this:
self.trial_ends = 0
if self.trial_ends > 1:
print("Extrinsic phase has ended!")