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

Multiple warnings when compiling the sampler #35

Open
RobinSattler opened this issue Jan 21, 2025 · 4 comments
Open

Multiple warnings when compiling the sampler #35

RobinSattler opened this issue Jan 21, 2025 · 4 comments
Assignees

Comments

@RobinSattler
Copy link
Member

RobinSattler commented Jan 21, 2025

I get multiple warnings when compiling the sampler on my local itp machine as well as on the cluster (see attached screenshots). This should be looked into.

I have no ROOT installation neither on the itp machine nor on the cluster. So I used a container (more specifically the latest SMASH-3.2rc) for the compilation.

Image Image Image
@RobinSattler RobinSattler self-assigned this Jan 21, 2025
@yukarpenko
Copy link
Collaborator

Most of the warnings come from einhard, I believe it is a library used by SMASH (the sampled doesn't use it per se). The first warning might be relevant though - there is some mismatch between the declaration and a call to fillBoostMatrix() which I believe technically works due to the pointer arithmetics is C, plus the C array alignment. But there might be a more solid/modern way to pass a pointer to 4x4 array to a function?

@RobinSattler
Copy link
Member Author

Thanks for your reply! Yes, Einhard is a 3rd party library apparently used for logging (from Einhard README: Einhard is a simple logging API for small to medium sized C++ applications).
But I agree, the first three warnings regarding gen.cpp and the ones about the oscaroutput.h file should be tackled first.

@RobinSattler
Copy link
Member Author

@yukarpenko, in line 407 to 408 of src/gen.cpp the order of return npart[0]; and delete fthermal; is causing a warning. Is the delete statement needed at all? It never gets executed anyway due to the return statement. Should this be removed or should the order of the two statements be reversed?

@yukarpenko
Copy link
Collaborator

after a quick check I'd say it is the other way round: return npart[0] ; is a redundant operation since the return value is not used. The delete fthermal operator should be there since it destroys a dynamically created object, so in principle it isn't good style (although given that the generate() function is called only once, the associated memory leak is infinitesimal)

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

No branches or pull requests

2 participants