GMLC-TDC / HELICS

Hierarchical Engine for Large-scale Infrastructure Co-Simulation (HELICS)
https://docs.helics.org/en/latest/
BSD 3-Clause "New" or "Revised" License
127 stars 41 forks source link

pysender.py and pyreceiver.py do not work with pyhelics #1824

Open bpalmintier opened 3 years ago

bpalmintier commented 3 years ago

Describe the bug The pysender.py and pyreciever.py examples in the main HELICS repository do not work with the new pyhelics interface. This is problematic since the "Hello World" directions in the on-line documentation suggest copying the code from the main helics repo files and running, but the now preferred way to install helics for python through various channels uses pyhelics

What is the expected behavior? basic python example should work easily with consistent documentation

To Reproduce See above

Environment (please complete the following information):

Additional context and information

bpalmintier commented 3 years ago

Note: workaround is to use the pysender.py and pyreciever.py from the pyhelics repo (https://github.com/GMLC-TDC/pyhelics)

kdheepak commented 3 years ago

Hi @bpalmintier, can you clarify which files you used? And what was the error that occurred?

The files located here seem to work fine for me using pyhelics:

https://github.com/GMLC-TDC/HELICS-Examples/tree/master/python/pi-exchange

Screenshot of running on my Mac

Screen Shot 2021-04-06 at 7 45 20 PM
bpalmintier commented 3 years ago

Ah... the documentation text at: https://docs.helics.org/en/latest/introduction/python.html does not include the broker as a separate python script. So the fix is either:

(And ideally per #1823 would also be good to add, perhaps as a comment, options for chaning the IP address, port, and timeout of the broker)