libmuscle.mmsf_validator module
- class libmuscle.mmsf_validator.MMSFValidator(port_manager: PortManager)[source]
Bases:
objectThe MMSF Validator checks whether Instances are following the Multiscale Modelling and Simulation Framework when sending and receiving messages.
In particular it checks that in order:
reuse_instance() is called
Messages are received on all F_INIT ports
The following sub-items happen in order, 0 or more times:
Messages are sent on all O_I ports
Messages are received on all S ports
Messages are sent on all O_F ports
If any message is sent or received out of order, a warning is logged to indicate that the instance is not following the MMSF pattern. In some cases (for example the time bridge in
examples/python/interact_coupling.py) this is expected and the warnings can be disabled by setting theSKIP_MMSF_SEQUENCE_CHECKSflag.Note
Checks on vector ports are not implemented. When the instance uses vector ports, the MMSF Validator will be disabled.
- check_receive(port_name: str, slot: int | None) None[source]
Check that receiving on the provided port adheres to the MMSF.