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

IPC core not working with PyHELICS? #2621

Open
trevorhardy opened this issue Feb 14, 2024 · 1 comment
Open

IPC core not working with PyHELICS? #2621

trevorhardy opened this issue Feb 14, 2024 · 1 comment
Labels
bug Issue concerning incorrect code operation

Comments

@trevorhardy
Copy link
Contributor

Describe the bug
Switching the advanced default example to use the IPC core fails to create federates

What is the expected behavior?
Since I'm running the example on a single compute node, IPC should run just as well as ZMQ.

To Reproduce
Change the "core_type" in the JSON config files of the Battery, Charger, and Controller of the advanced default to "ipc" and attempt to run.

Environment (please complete the following information):
Tested on

  • Operating System: macOS 14.3.1
  • Language Extension: Python
  • Build/Install process: installed HELICS v3.5.0 via pre-compiled binaries distributed on HELICS Github page
  • HELICS version: 3.5.0
$ helics_app --version
3.5.0 (2024-02-06)

Error message(s):
Battery

[2024-02-14 11:04:05.033] [console] [error] commERROR||battery_core (0)[connected_error]::transmitter connection failure
[2024-02-14 11:04:05.033] [console] [error] battery_core (0)[connected_error]::Unable to open broker connection -> timed out waiting for the queue to become available
Traceback (most recent call last):
  File "/Users/hard312/src/HELICS/HELICS-Examples/user_guide_examples/advanced/advanced_default/Battery.py", line 78, in <module>
    fed = h.helicsCreateValueFederateFromConfig("BatteryConfig.json")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hard312/anaconda3/envs/helics_350/lib/python3.11/site-packages/helics/capi.py", line 3635, in helicsCreateValueFederateFromConfig
    raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode())
helics.capi.HelicsException: [-1] Unable to connect to broker->unable to register federate

Charger

[2024-02-14 11:04:05.043] [console] [error] charger_core (0)[connected_error]::Unable to open broker connection -> timed out waiting for the queue to become available
[2024-02-14 11:04:05.043] [console] [error] commERROR||charger_core (0)[connected_error]::transmitter connection failure
Traceback (most recent call last):
  File "/Users/hard312/src/HELICS/HELICS-Examples/user_guide_examples/advanced/advanced_default/Charger.py", line 142, in <module>
    fed = h.helicsCreateCombinationFederateFromConfig("ChargerConfig.json")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hard312/anaconda3/envs/helics_350/lib/python3.11/site-packages/helics/capi.py", line 3723, in helicsCreateCombinationFederateFromConfig
    raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode())
helics.capi.HelicsException: [-1] Unable to connect to broker->unable to register federate

Controller

[2024-02-14 11:14:41.232] [console] [error] controller_core (0)[connected_error]::Unable to open broker connection -> timed out waiting for the queue to become available
[2024-02-14 11:14:41.232] [console] [error] commERROR||controller_core (0)[terminating_error]::transmitter connection failure
Traceback (most recent call last):
  File "/Users/hard312/src/HELICS/HELICS-Examples/user_guide_examples/advanced/advanced_default/Controller.py", line 52, in <module>
    fed = h.helicsCreateMessageFederateFromConfig("ControllerConfig.json")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hard312/anaconda3/envs/helics_350/lib/python3.11/site-packages/helics/capi.py", line 3678, in helicsCreateMessageFederateFromConfig
    raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode())
helics.capi.HelicsException: [-1] Unable to connect to broker->unable to register federate

@trevorhardy trevorhardy added the bug Issue concerning incorrect code operation label Feb 14, 2024
@trevorhardy
Copy link
Contributor Author

Retested under HELICS and PyHELICS 3.6.0 and still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue concerning incorrect code operation
Projects
None yet
Development

No branches or pull requests

1 participant