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

Fix #4885 - Rewrite MeasureManager in C++ #4920

Merged
merged 49 commits into from
Sep 28, 2023
Merged

Commits on Jul 4, 2023

  1. WIP

    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    742f682 View commit details
    Browse the repository at this point in the history
  2. WIP2

    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    5f54972 View commit details
    Browse the repository at this point in the history
  3. Implement getIdf

    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    fe0bf72 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7a0ef58 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6d4d3c2 View commit details
    Browse the repository at this point in the history
  6. passing http://localhost was binding to tcp6, not tcp4, change to 0.0…

    ….0.0: on unix at least it works wiht localhost, 0.0.0.0 and 127.0.0.1
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    f505532 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7ddca5d View commit details
    Browse the repository at this point in the history
  8. Add OSArgument::toJSON

    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    e436183 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    93b0b34 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    dc9d8bd View commit details
    Browse the repository at this point in the history
  11. Avoid crashing when trying to get location when ruby engine eval failed

    when "stack too deep" is the err string, the location `rb_eval_string("[email protected]_s");` will fail
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    8bd9138 View commit details
    Browse the repository at this point in the history
  12. Add MeasureType OSMeasure::measureType() const

    The child class Ctor will intialize it
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    bf70f1e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6837b05 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    2d8bb96 View commit details
    Browse the repository at this point in the history
  15. Dry it up: Use the new methods, and in the measuresubcommand use th…

    …e MeasureManager too
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    be003fa View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    f59cf9f View commit details
    Browse the repository at this point in the history
  17. Wrap the code that queries the measure in a try-catch after having it…

    … fail when calling arguments(model) for an OLD reporting measure
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    2dbba58 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    7602d91 View commit details
    Browse the repository at this point in the history
  19. Add a dynamic monkeypatch to support old ReportingMeasures that didn'…

    …t take model prior to 3.0.0
    
    Also unload the Ruby measures or it'll crash when trying to load it again
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    1e48a23 View commit details
    Browse the repository at this point in the history
  20. Remove now-useless getAndUpdateMeasure in MeasureeUpdateCommand becau…

    …se it uses the MeasureManager
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    3f0624f View commit details
    Browse the repository at this point in the history
  21. Add OSOutput::toJSON

    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    ecae640 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    790a6f3 View commit details
    Browse the repository at this point in the history
  23. Need a pointer to avoid a copy, otherwise when clearing measureInfos …

    …it has no effect and getMeasureInfo just fetches the previous one
    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    7588d12 View commit details
    Browse the repository at this point in the history
  24. Debug a SystemStackError...

    jmarrec committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    9ad3e3a View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    4cf93a2 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    83669aa View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    db32b90 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    6378003 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    7e4f358 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. Fix runtime errors in C++ MeasureManager Server

    The MeasureManager server uses the cpprest SDK, which is an asynchronous
    library that is implemented on top C++ threads. The challenge is that
    API endpoints involving Ruby and Python are not thread safe. (This is
    generally true for all conventional implementations of Ruby and Python,
    not just OpenStudio's encapsulation of the scripting engines) The
    solution implemented here, is to use a task queue so that all of the
    "work" done by the API endpoints is done on the common main thread.
    
    ref #4885
    kbenne committed Aug 10, 2023
    6 Configuration menu
    Copy the full SHA
    3c4a1c3 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    7c37fa0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29d7726 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eb1c3ca View commit details
    Browse the repository at this point in the history
  4. Add comments explaining the shenanigans done to ensure the **main** t…

    …hread does the actual ruby/python work
    jmarrec committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    eaeed53 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    449c70c View commit details
    Browse the repository at this point in the history
  6. Missing early return.

    jmarrec committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    3d1bf85 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b84a532 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3e228f9 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. Remove debug messages

    jmarrec committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    9b31f65 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. Configuration menu
    Copy the full SHA
    6343a48 View commit details
    Browse the repository at this point in the history
  2. Forgot a debug message

    jmarrec committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    2a7c1cf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b58c33d View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. Configuration menu
    Copy the full SHA
    13cbc82 View commit details
    Browse the repository at this point in the history
  2. Merge branch '4885_MeasureManager_c++' of github.com:NREL/OpenStudio …

    …into 4885_MeasureManager_c++
    kbenne committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    e1f5e0c View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. Update src/cli/MeasureManager.cpp

    Use `std::fflush(std::cout)` instead of `std::cout << std::flush`
    
    Co-authored-by: Julien Marrec <[email protected]>
    kbenne and jmarrec authored Sep 25, 2023
    Configuration menu
    Copy the full SHA
    dd55a86 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. Fix runtime error for Python/Ruby workflows

    This issue only pertained to Mac and was occuring when a Python Measure was run before a Ruby Measure.
    The fix is to set the dlopen flags to RTLD_LOCAL prior to importing OpenStudio in Python.
    
    Test OpenStudioCLI.Labs.Run_PythonRuby demonstrates the original issue and will now pass.
    
    close #4945
    kbenne committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    b2b5cf7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    109be9d View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. Fix fflush

    jmarrec committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    f4d43bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22d99c4 View commit details
    Browse the repository at this point in the history