-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed automatic append of py_ports and var_ports (#669)
* Fixed automatic append of py_ports and var_ports Added a check to prevent re-appending the same PyPort or VarPort that is already in a process model's py_ports or var_ports list. Adjusted CspRecvPort implementation to allocate numpy _result array once at initialization rather than on every update. Adjusted PyRefPortVectorDense to allocate header numpy arrays the first time they are used, rather than every time a value is sent. * Fixing flake formatting. * Reverting change to preallocate _result It seems that putting the result of the CspRecvPort.recv into a pre-allocated numpy _result leads to a hang due to shared memory between processes, specifically in cases where the user code grabs data from a Monitor. Reverting that change for now, though in the future it would be good to find a way to effectively preallocate to avoid memory allocations during every timestep. * Cleanup. * Fixing flake issue.
- Loading branch information
Showing
3 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters