GMLC-TDC / HELICS-Examples

Examples for using HELICS with a variety of the supported programming languages
BSD 3-Clause "New" or "Revised" License
21 stars 19 forks source link

fail to run the fundamental_default example #69

Closed SenHuang19 closed 1 year ago

SenHuang19 commented 2 years ago

When running default example with the instruction, I got the following error from the log of the Charger:

Requesting time 6480.0 Granted time 9223372036.854774 EV 1 time 9223372036.854774 Charging current: 3.87 from input Battery/EV1_current Traceback (most recent call last): File "/home/developer/HELICS-Examples/user_guide_examples/fundamental/fundamental_default/Charger.py", line 184, in h.helicsPublicationPublishDouble(pubid[j], charging_voltage[j]) File "/usr/local/lib/python3.10/site-packages/helics/capi.py", line 7750, in helicsPublicationPublishDouble raise HelicsException("[" + str(err.error_code) + "] " + ffi.string(err.message).decode()) helics.capi.HelicsException: [-10] publications not allowed outside of execution and initialization state

The log of helic_cli is:

helics-cli [info]: Running federation: fundamental_default helics-cli [info]: Running federate Charger as a background process helics-cli [info]: Running federate Battery as a background process helics-cli [info]: Waiting for 3 processes to finish ... Error: Process Charger has failed, killing other processes helics-cli [error]: Process broker exited with return code -9 helics-cli [error]: Process Charger exited with return code 1 helics-cli [error]: Process Battery exited with return code 1 helics-cli [info]: Done. Exception in thread Thread-1: Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/site-packages/helics_cli/status_checker.py", line 40, in run raise HELICSRuntimeError("Error has occurred") helics_cli.exceptions.HELICSRuntimeError: Error has occurred

Environment: a Docker container based on python:3-slim

trevorhardy commented 2 years ago

Sorry for not catching this sooner; I wasn't paying as close attention to this repo as I should have. Is this still a pending problem?

trevorhardy commented 2 years ago

Last chance, @SenHuang19; should I keep this open or close it out?

SenHuang19 commented 2 years ago

Yes, it is still a problem on my end. Could you please take a look at it? Thank you so much!

trevorhardy commented 2 years ago

I just ran this example and it was working fine for me. Can you run helics --version and post the results here? Also, can you post the contents of broker.log here?

trevorhardy commented 1 year ago

@SenHuang19, do you still need help with this?

trevorhardy commented 1 year ago

No response so I'm calling it.