pnnl / tesp

Other
39 stars 37 forks source link

Slow Performance of HELICS vs. FNCS #33

Closed temcdrm closed 1 year ago

temcdrm commented 3 years ago

For simulations of appreciable length, including GridLAB-D and/or EnergyPlus, the HELICS version takes 1.6 to 2.0 times as long as the FNCS version. Cause unknown. See TestCases.xlsx attached summary.

Yuanliang-Li commented 3 years ago

For simulations of appreciable length, including GridLAB-D and/or EnergyPlus, the HELICS version takes 1.6 to 2.0 times as long as the FNCS version. Cause unknown. See TestCases.xlsx attached summary.

Hi, Tom,

Currently, I am trying to run TE30 example based on HELICS since I am more familiar with HELICS than FNCS. So, I am wondering if the problem has been solved? Can I still use HELICS to develop my project based on TE30 example?

Thanks

temcdrm commented 3 years ago

I'm not sure. Trevor Hardy may be able to answer.

trevorhardy commented 3 years ago

We have an investigation on-going that has not been getting the attention we would like but we're getting there. Our preliminary find is seeming to point to tool integrations (HELICS + GridLAB-D, HELICS + EnergyPlus, etc) rather than HELICS itself.

We are planning to move away from FNCS, though, and would recommend any new projects that are starting using the HELICS integration.

Yuanliang-Li commented 3 years ago

We have an investigation on-going that has not been getting the attention we would like but we're getting there. Our preliminary find is seeming to point to tool integrations (HELICS + GridLAB-D, HELICS + EnergyPlus, etc) rather than HELICS itself.

We are planning to move away from FNCS, though, and would recommend any new projects that are starting using the HELICS integration.

Hi, Trevor,

Thank you for your reply. If you don’t mind, could you let me know the reason for moving away from FNCS since I need to consider the potential issues of developing new projects with FNCS integrated?

Thanks

trevorhardy commented 3 years ago

FNCS has been super-ceded by HELICS at the direction of those funding the development of co-simulation tools in the Department of Energy National Laboratory complex. TESP will be removing FNCS in this coming calendar year but FNCS itself will not cease to exist (as far as I know). FNCS is largely unsupported now and that's why I wouldn't recommend it for new projects but for existing work, particularly work that is wrapping up soon, it doesn't make sense to transition to HELICS.

HELICS has a lot of material to help you get up to speed: HELICS User Guide HELICS User Guide Examples HELICS Discussion Forum HELICS Developer Chat

If you have other specific questions I'd be happy to help in whatever way I can.

Yuanliang-Li commented 3 years ago

FNCS has been super-ceded by HELICS at the direction of those funding the development of co-simulation tools in the Department of Energy National Laboratory complex. TESP will be removing FNCS in this coming calendar year but FNCS itself will not cease to exist (as far as I know). FNCS is largely unsupported now and that's why I wouldn't recommend it for new projects but for existing work, particularly work that is wrapping up soon, it doesn't make sense to transition to HELICS.

HELICS has a lot of material to help you get up to speed: HELICS User Guide HELICS User Guide Examples HELICS Discussion Forum HELICS Developer Chat

If you have other specific questions I'd be happy to help in whatever way I can.

Thank you. I am clear now.

trevorhardy commented 2 years ago

Believe it or not, this investigation is still on-going though the latest version of TESP runs the autotest in HELICS at very comparable speeds to FNCS. This doesn't address what is going on (which is still being investigated) but it does point towards the gap between the two being closed.

d3j331 commented 2 years ago

Timing Info on TESP examples, * are not co-su examples Testing on the same platform

Test Case(s) FNCS Time HELICS Time ================== ====== ======= GridLAB-D Player/Recorder 0.017316 0.054029 Loadshed - ns-3 N/A 3.650501 Loadshed - Python 0.356355 0.922118 Loadshed - Java 0.92106 1.818699 PYPOWER 1.524397 2.197801 Baselines files 636.954038 937.635212 Generated all EMS/IDF files 1.564491 1.760344 EnergyPlus IDF 2.965247 N/A EnergyPlus EMS 3.627924 4.324345 Weather Agent 2.526809 4.470878 *Houses 146.220331 150.55928 TE30 Market 153.641804 304.20277 TE30 No Market 140.817042 302.350162 4 Feeders 550.425534 1233.037072 Eplus w/Comm - HELICS 197.62771 179.696373 No Comm Base 3276.790773 5967.539261 Eplus Restaurant 2043.614114 4555.805822 SGIP1c 2876.984833 5383.099525

d3j331 commented 1 year ago

The gap is closer using HELICS 3.4

Example HELICS FNCS ================ ======= ======== TE30 - HELICS Market 637.902195 525.220519 TE30 - HELICS No Market 650.325884 536.565695

trevorhardy commented 1 year ago

Final work on this is complete. Most performance gaps have been eliminated through a variety of measures including:

  1. Use of modern compliers where possible.
  2. Application of HELICS uninterruptible flag to more closely match FNCS operation
  3. Checking for updated values on interfaces rather than always fetching them (even if they haven't changed).

Documentation is largely complete and will be incorporated into HELICS documentation.