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

advanced_default and fundamental_integration produce different values #54

Closed trevorhardy closed 1 year ago

trevorhardy commented 3 years ago

Describe the bug advanced_default and fundamental_integration are intended to be two implementations of the same functionality and thus should produce the identical results.

Environment (please complete the following information):

trevorhardy commented 2 years ago

Not resolved under 3.1.0

trevorhardy commented 2 years ago

Not resolved under 3.2.0

nightlark commented 2 years ago

Are you sure this is a bug in HELICS? I'm looking at the code for the two examples, and fundamental_integration has a Controller.py federate that fundamental_default doesn't have.

trevorhardy commented 2 years ago

Good catch. The two models that should be very similar (identical?) are fundamental_integration and advanced_defaults. I'm retroactively changing the issue title and description

eranschweitzer commented 2 years ago

@nightlark or @kdheepak: I noticed that the registration calls in fundamental integration Battery.py file are helicsFederateRegisterGlobalTypePublication() and helicsFederateRegistrerSubscription().

  1. Is there a difference between helicsFederateRegisterGlobalTypePublication() and helicsFederateRegisterGlobalPublication()? They are both in the PyHELICS reference (see links) but appear to be identical
  2. If one uses helicsFederateRegisterPublication() instead of one of the two mentioned above will the only difference be that the global property be set to false?
  3. It seems like there is no helicsFederateRegisterGlobalSubscription() if I want to register a global subscription is helicsFederateRegisterGlobalInput() the appropriate call?
  4. Same as question 1 but for helicsFederateRegisterGlobalInput() vs. helicsFederateRegisterGlobalTypeInput()
trevorhardy commented 1 year ago

After reviewing the code it is clear that the two examples are similar but not identical. For the purposes of this documentation and example suite, this is acceptable.