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

Multiproc bug #177

Merged
merged 3 commits into from Feb 11, 2022
Merged

Multiproc bug #177

merged 3 commits into from Feb 11, 2022

Conversation

mgkwill
Copy link
Contributor

@mgkwill mgkwill commented Feb 9, 2022

Issue Number: #176

Objective of pull request: Fix Multiprocessing AssertionError: can only join a child process

Pull request checklist

Your PR fulfills the following requirements:

Pull request type

Please check your PR type:

  • Bugfix

What is the current behavior?

  • When unit test are run the following error is present (see: https://github.com/lava-nc/lava/runs/5132279352?check_suite_focus=true#step:5:81 for example):
    packages/lava/magma/runtime/message_infrastructure/multiprocessing.py", line 79, in stop
    actor.join()
    File "/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/multiprocessing/process.py", line 147, in join
    assert self._parent_pid == os.getpid(), 'can only join a child process'
    AssertionError: can only join a child process

What is the new behavior?

  • actor processes can join successfully after a check, fixing "AssertionError: can only join a child process"

Does this introduce a breaking change?

  • No

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>
@mgkwill mgkwill self-assigned this Feb 9, 2022
@mgkwill mgkwill added 1-bug Something isn't working area: magma/runtime Issues with something in lava/magma/runtime labels Feb 9, 2022
@mgkwill mgkwill linked an issue Feb 9, 2022 that may be closed by this pull request
2 tasks
@mgkwill
Copy link
Contributor Author

mgkwill commented Feb 11, 2022

Thanks @PhilippPlank & @joyeshmishra

@mgkwill mgkwill merged commit 29fd444 into lava-nc:main Feb 11, 2022
mgkwill added a commit to mgkwill/lava that referenced this pull request Feb 15, 2022
Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>
joyeshmishra pushed a commit that referenced this pull request Feb 25, 2022
* Address review comments

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Improve mnist tutorial (#147)

* Minor: Removed a divide by zero warning from the fixed point LIF ProcessModel

Signed-off-by: Risbud, Sumedh <sumedh.risbud@intel.com>

* Improved to MNIST end-to-end tutorial
    - uses fixed point bit-accurate ProcessModels for LIF and Dense
    - resets internal neural state of all LIF neurons
    - these changes are needed to make the pre-trained networks parameters work, because the network was trained with these assumptions

Signed-off-by: Risbud, Sumedh <sumedh.risbud@intel.com>

* Post code review @awintel and @phstratmann

Signed-off-by: Risbud, Sumedh <sumedh.risbud@intel.com>

* Post code review @awintel and @phstratmann

Signed-off-by: Risbud, Sumedh <sumedh.risbud@intel.com>

* Post re-review by @phstratmann

Signed-off-by: Risbud, Sumedh <sumedh.risbud@intel.com>

Co-authored-by: PhilippPlank <32519998+PhilippPlank@users.noreply.github.com>

* Check process lineage before join (#177)

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Add NxSDKRuntimeService

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Fix unit test, linting

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Remove comments

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Handle nxsdk import exception

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Fix indentation issue

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Uncomment board.run in nc proc model

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Address review, rework NxSdkRuntime Service

Signed-off-by: Marcus G K Williams <168222+mgkwill@users.noreply.github.com>

* Fix unit tests, merge with main

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Remove nc/ports.py again

Remove commented code in compiler.py

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Update comments logging

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Update test Utils method name and document

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Update test name and docs for nxsdkruntimeservice

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Update docstrings for RuntimeService

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Update logging

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

* Remove unneeded logging import

Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>

Co-authored-by: Risbud, Sumedh <sumedh.risbud@intel.com>
Co-authored-by: PhilippPlank <32519998+PhilippPlank@users.noreply.github.com>
Co-authored-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-bug Something isn't working area: magma/runtime Issues with something in lava/magma/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Multiprocessing AssertionError: can only join a child process
3 participants