Add iteration counts to MPP protocol#378
Conversation
…ion per port which can be updated
maarten-ic
left a comment
There was a problem hiding this comment.
Large PR, so a large list of comments 😅
Let me know if anything is not clear and/or you'd like to discuss any of the comments!
| if isinstance(mpp_message.data, ClosePort): | ||
| port.set_closed(slot) | ||
| else: | ||
| self._timeline_manager.check_receive(port_name, slot) |
There was a problem hiding this comment.
Isn't this check the first thing you should do when the user calls receive(...)?
There was a problem hiding this comment.
We can call this after determining whether the incoming message is a ClosePort. We only know that after the client.receive() and decode step. This could potentially be moved earlier in the future if we switch from ClosePort messages to milestones.
| SKIP_MMSF_SEQUENCE_CHECKS = auto() | ||
| """Disable the checks whether the MMSF is strictly followed when sending/receiving | ||
| messages. | ||
|
|
||
| See :class:`~libmuscle.mmsf_validator.MMSFValidator` for a detailed description of | ||
| the checks. | ||
| """ | ||
|
|
There was a problem hiding this comment.
To discuss: do we want to remove this InstanceFlag and force users to update their codes if they use this?
There was a problem hiding this comment.
I removed this because if I understood you and Lourens correctly we would like to remove the possibility to skip the checks such that simulations can always work with well-defined timelines. However, now I removed this whole instance check but I can also re-add this and then give an error that you cannot skip the checks? Or would you like to give this possibility?
See issue #373