Skip to content

Add iteration counts to MPP protocol#378

Draft
IrisvdWerf wants to merge 52 commits into
multiscale:developfrom
IrisvdWerf:timelines
Draft

Add iteration counts to MPP protocol#378
IrisvdWerf wants to merge 52 commits into
multiscale:developfrom
IrisvdWerf:timelines

Conversation

@IrisvdWerf

@IrisvdWerf IrisvdWerf commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

See issue #373

@maarten-ic maarten-ic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Comment thread libmuscle/python/libmuscle/communicator.py
Comment thread libmuscle/python/libmuscle/communicator.py
if isinstance(mpp_message.data, ClosePort):
port.set_closed(slot)
else:
self._timeline_manager.check_receive(port_name, slot)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this check the first thing you should do when the user calls receive(...)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines -87 to -94
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.
"""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To discuss: do we want to remove this InstanceFlag and force users to update their codes if they use this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread libmuscle/python/libmuscle/instance.py Outdated
Comment thread libmuscle/python/libmuscle/timeline_manager.py
Comment thread libmuscle/python/libmuscle/timeline_manager.py
Comment thread libmuscle/python/libmuscle/timeline_manager.py
Comment thread libmuscle/python/libmuscle/timeline_manager.py
Comment thread libmuscle/python/libmuscle/timeline_manager.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants