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

1167 Update some dependencies #1168

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

1167 Update some dependencies #1168

wants to merge 15 commits into from

Conversation

reneSchm
Copy link
Member

@reneSchm reneSchm commented Dec 19, 2024

Changes and Information

Please briefly list the changes (main added features, changed items, or corrected bugs) made:

  • Update minimum required cmake 3.11 -> 3.13
  • Update spdlog 1.11.0 -> 1.15.0
  • Update Eigen 3.3.9 -> 3.4.0
  • Update JsonCpp 1.9.5 -> 1.9.6

If need be, add additional information and what the reviewer should look out for in particular:

  • These updates help with support of recent compiler versions
  • cmake 3.13 was already required by install in cpp/CMakeLists.txt:183, prior versions are unable to install targets from a subdirectory
  • A newer spdlog version is required unless we want to silence several compiler warnings when including the library with gcc 14+. chose newest release, though we may use an older one if there is a reason for it
  • Eigen 3.4.0 is newest release, but already 2 years old. It adds more compatibility with STL, e.g. iterators and initializer list support.
    • IMPORTANT: now including Eigen as system library to avoid several compiler warnings from within the library. could use several pragmas to silence each error individually instead
    • Eigen 4.0.0 may be available soon(TM)
  • JsonCpp 1.9.6 has several bugfixes, though we are not affected by these bugs (AFAIK)
  • Check commits for steps taken to update the code to these versions. Updates are independent and can be selectively undone, if desired
    • changes to the serialization test are due to stricter is_container requirement, causing std::array to be serialized as tuple. deserialization of std::array was not supported anyways, so this is not a breaking change

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
  • New code adheres to coding guidelines
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • Tests are added for new functionality and a local test run was successful (with and without OpenMP)
  • Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added
  • (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.)
  • Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease)
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

Closes #1167

@reneSchm reneSchm added loc::backend This issue concerns the C++ backend implementation. class::improvement Cleanup that doesn't affect functionality loc::infrastructure General MEmilio Infrastructure related issues dependencies Pull requests that update a dependency file labels Dec 19, 2024
@reneSchm reneSchm self-assigned this Dec 19, 2024
@reneSchm reneSchm requested review from mknaranja and dabele December 19, 2024 16:26
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.97%. Comparing base (754675b) to head (a9a8701).

Files with missing lines Patch % Lines
cpp/memilio/utils/logging.h 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
+ Coverage   96.95%   96.97%   +0.01%     
==========================================
  Files         148      148              
  Lines       13715    13710       -5     
==========================================
- Hits        13298    13295       -3     
+ Misses        417      415       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mknaranja
Copy link
Member

@reneSchm Please update readmes :)

Copy link
Member

@mknaranja mknaranja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates. I gave some more or less informed comments. Maybe check for them, update the readmes and then it should be OK.

cpp/memilio/math/stepper_wrapper.h Show resolved Hide resolved
cpp/memilio/math/stepper_wrapper.h Show resolved Hide resolved
* Resize all dimensions.
* @param new_dims new dimensions.
* @brief Resize all dimensions.
' Note that when increasing the overall size, new values may be uninitialized.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
' Note that when increasing the overall size, new values may be uninitialized.
* Note that when increasing the overall size, new values may be uninitialized.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens when reducing multi-dim arrays? Is the form kept or do information get mixed?

E.g.

3x3 of
1 2 3
4 5 6
7 8 9
changing to 2x2 becomes
1 2
4 5
or rather
1 2
3 4
?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The internal array is stored linearly and reduced (or extended) to the product of all dimensions. So your 3x3 matrix is really just an array (1 2 3 4 5 6 7 8 9), with matrix accessor. So resizing to 1x9 or 9x1 would leave the array untouched. If we cut that matrix to

  • 3x2, we get
    1 2
    3 4
    5 6
  • 3x1, we get
    1
    2
    3
  • 2x3, we get
    1 2 3
    4 5 6
  • 2x2, we get
    1 2
    3 4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting that. Is that really expected behavior for a (new) user? Shouldn't we avoid sizing down with keeping the values as this is normally not what you what want when reducing dimensions?

cpp/memilio/utils/custom_index_array.h Outdated Show resolved Hide resolved
cpp/memilio/utils/logging.h Show resolved Hide resolved
cpp/tests/abm_helpers.cpp Show resolved Hide resolved
cpp/memilio/utils/uncertain_value.h Outdated Show resolved Hide resolved
@reneSchm
Copy link
Member Author

reneSchm commented Jan 3, 2025

Thanks for the review @mknaranja. Please check the "additional information for reviewers", in case you haven't.

I had made Eigen a system library, so we do not need to manually add compiler diagnostics. I hadn't removed them before your review (see here).

I also replaced mio::Vector by Eigen::VectorX (new in 3.4.0) in that commit, so it is more obvious that Vector is a Eigen type and not something we wrote ourselves.

@reneSchm reneSchm requested a review from mknaranja January 3, 2025 16:29
Copy link
Member

@mknaranja mknaranja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There is just one comment / discussion we should agree on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class::improvement Cleanup that doesn't affect functionality dependencies Pull requests that update a dependency file loc::backend This issue concerns the C++ backend implementation. loc::infrastructure General MEmilio Infrastructure related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update some dependencies
2 participants