Skip to content

Optimize standalone printout #107

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

Merged
merged 2 commits into from
Apr 29, 2025
Merged

Conversation

Zehvogel
Copy link
Contributor

@Zehvogel Zehvogel commented Feb 1, 2025

BEGINRELEASENOTES

  • Optimize standalone printout

ENDRELEASENOTES

fixes #106 I hope?

WARNING: I did not test this yet

tested :)
new output:

[lreichen@pcphsft121 k4EDM4hep2LcioConv]$ lcio2edm4hep ../enuW/data/gen/whizard_sw_semi_250_truth_templates/ww_eLpR_100k.slcio /dev/null
Number of events in file: 100000
Number of runs in file: 1
processing RunHeader: 0
processed amount of events: 10% (event: 9999)
processed amount of events: 20% (event: 19999)
processed amount of events: 30% (event: 29999)
processed amount of events: 40% (event: 39999)
processed amount of events: 50% (event: 49999)
processed amount of events: 60% (event: 59999)
processed amount of events: 70% (event: 69999)
processed amount of events: 80% (event: 79999)
processed amount of events: 90% (event: 89999)
processed amount of events: 100% (event: 99999)

@tmadlener
Copy link
Contributor

Let me know when you think this is ready.

@Zehvogel
Copy link
Contributor Author

Ready? I don't know what happened to the Ubuntu test, I was sure it passed before I fixed my missing pre-commit formatting stuff... :(

@andresailer
Copy link
Contributor

Ready? I don't know what happened to the Ubuntu test, I was sure it passed before I fixed my missing pre-commit formatting stuff... :(

Did you try to have copilot explain the error?

@Zehvogel
Copy link
Contributor Author

Did you try to have copilot explain the error?

The test failures in Pull Request #107 of the key4hep/k4EDM4hep2LcioConv repository are due to two main issues:

  1. Symbol Lookup Error:

    • The error compare-contents: symbol lookup error: libedmCompare.so: undefined symbol: _ZN7edm4hep5utils15TrackPIDHandler7addCollERKNS_17RecDqdxCollectionE indicates that the library libedmCompare.so is missing a symbol (TrackPIDHandler::addColl).
    • This could be caused by mismatched library versions or missing implementations for the required symbol.
  2. LCRelation Conversion Issue:

    • The test standalone_ild_rec_file failed with the error: LCRelation collection RelationLcalHit has missing FromType or ToType parameters. Cannot convert it without this information. This suggests that the required metadata (FromType or ToType) is missing, which is necessary for converting the collection.

Recommendations for Fixing the Issues

  1. Resolve the Symbol Lookup Error:

    • Ensure that libedmCompare.so is built with all required dependencies and includes the implementation for TrackPIDHandler::addColl.
    • Verify that all linked libraries are up-to-date and consistent with the version of the code being tested.
  2. Handle Missing Parameters in LCRelation:

    • Update the test data or the conversion logic to include the required FromType or ToType parameters.
    • If the parameters cannot be provided, modify the conversion logic to handle their absence gracefully (e.g., by skipping the conversion or providing default values).

Would you like further assistance with debugging any specific part of this failure?

@jmcarcell
Copy link
Member

That has been failing since building on ubuntu24 was added. I'll try to have a look but feel free to ignore for this PR.

Co-authored-by: Andre Sailer <andre.philippe.sailer@cern.ch>
@andresailer andresailer merged commit 1bad29e into key4hep:main Apr 29, 2025
4 of 5 checks passed
@Zehvogel Zehvogel deleted the Zehvogel-patch-1 branch April 29, 2025 14:11
int percEvt = i * 100 / (nEvt - 1);
if (percEvt % 10 == 0) {
std::cout << "processed amount of events: " << percEvt << "% (event: " << i << ")" << std::endl;
if ((i + 1) % tenPercent == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

If nEvt < 10 then tenPercent is zero and % 0 can't be done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if ((i + 1) % tenPercent == 0) {
if (tenPercent && ((i + 1) % tenPercent == 0)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve standalone printout further
4 participants