Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Issues with pyrtma bench #1

Open
tjmadonna opened this issue Sep 21, 2021 · 6 comments
Open

Issues with pyrtma bench #1

tjmadonna opened this issue Sep 21, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@tjmadonna
Copy link
Contributor

pyrtma_bench.py needs to be updated to use the latest pyrtma class names (ex: rtmaClient -> Client). There may be more.

@tjmadonna tjmadonna added the bug Something isn't working label Sep 21, 2021
@jmw182
Copy link
Member

jmw182 commented Sep 24, 2021

The examples may also need to be updated (e.g. I changed types -> internal_types).

@jmw182
Copy link
Member

jmw182 commented Sep 28, 2021

The examples seem to work now. @tjmadonna can this issue be closed?
EDIT: Nevermind, now I see that pyrtma_bench has not been updated yet.

@jmw182
Copy link
Member

jmw182 commented Sep 29, 2021

I updated pyrtma_bench in 9b1b9fc. It mostly works again, but still fails if configured to run with publishers but no subscribers. I'm not sure why subscribers are required to avoid this error:

Traceback (most recent call last):
File "pyrtma_bench.py", line 225, in
msg = mod.read_message(timeout=0.100)
File "c:\git\pyrtma\pyrtma\client.py", line 233, in read_message
), "Did not send all the header to message manager."
AssertionError: Did not send all the header to message manager.

@jmw182
Copy link
Member

jmw182 commented Sep 29, 2021

The above error does not occur when using the c++ message manager. Running with 1 publisher and 0 subscribers works with the c++ manager, but using > 1 publisher and 0 subscribers or 0 publishers and subscribers causes the test to hang in the main while loop. It sends the Exit signal after the timeout period, but this does not do anything since there are no subscribers to receive it.

@jmw182 jmw182 changed the title Update pyrtma bench with latest class names Issues with pyrtma bench Jan 6, 2022
@jmw182
Copy link
Member

jmw182 commented Jan 6, 2022

I renamed this issue since the remaining bugs I described on September 29 are unrelated to class names.

@jmw182
Copy link
Member

jmw182 commented Jan 14, 2022

Recap from debugging this week and meeting with both Tylers today:
At this point the issue seems to happen with both message managers, and with either pyrtma_bench.py or rtma_bench.exe.
The issue appears to be related to unsynchronized subprocesses. When one publisher process finishes before the others even begin, the main process does not get all of the publisher done signals and hangs. This is more likely to happen when there are no subscribers (as the publisher thread normally waits for all subscribers to be ready prior to their send loops), or when the number of messages per publisher is small (such that the processes can finish very quickly).

Adding a pause BEFORE sending the publisher done signal can resolve the issue, but a pause AFTER the signal and before disconnecting does NOT resolve the issue.

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

No branches or pull requests

2 participants