Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel simulation results is very different from serial simulation #45

Open
syifan opened this issue Mar 6, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@syifan
Copy link
Contributor

syifan commented Mar 6, 2024

To Reproduce
MGPUSim version of commit ID:

Command that recreates the problem

Command

Current behavior
A clear and concise description of what is wrong.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@syifan syifan added the bug Something isn't working label Mar 6, 2024
@MaxKev1n
Copy link

MaxKev1n commented Mar 6, 2024

This is parallel engine.
image

This is serial engine.
image

In terms of this bug, I print the information about the event scheduling and handling. In a common situation, the endpoint[0] pops the msg in the output buffer at 0.0000000030, then the driver checks whether the port could send new message at the same tick (0.0000000030). In serial engine, although these two events are scheduled at the same tick, the simulator handles the endpoint event (ID: 133) before the driver event (ID: 134), therefore the driver could send new message successfully. However, in parallel engine, the simulator handles the driver event (ID: 134) first instead of endpoint event (ID: 134), so the driver could not send new message due to the output buffer of endpoint is full.

Briefly, in the parallel engine, the event with larger ID may be handled earlier than the event with smaller ID, which is contrary to the behavior of serial engine. I think this may cause the bug that parallel simulation results is very different from serial simulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants