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

Yield values when using multiple cores #222

Open
juanma-cano-vila opened this issue Apr 10, 2024 · 1 comment
Open

Yield values when using multiple cores #222

juanma-cano-vila opened this issue Apr 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@juanma-cano-vila
Copy link
Collaborator

I have noticed that for the weights in the analysis their computation and access is done through the SrcDetSigYieldWeightsService object.

This object has 2 different methods form computing the weights (.calculate() ) and for retrieving the values ( .get_weights() ).
When working with multiple processors, the same SrcDetSigYieldWeightsService is called by all processors, so it might happen that the values from .get_weights() might be not the correct ones if another processor made a .calculate() before.

These would potentially give wrong results for analysis using more than one processor.

A potential fix would be to generate a copy of SrcDetSigYieldWeightsService for each processor used, similar to what is done with other objects such as FluxModels and ParamGridSet.

@juanma-cano-vila juanma-cano-vila self-assigned this Apr 10, 2024
@juanma-cano-vila juanma-cano-vila added the bug Something isn't working label Apr 10, 2024
@martwo
Copy link
Collaborator

martwo commented Apr 10, 2024

Because Python cannot really run things in parallel while using the same data, a copy will be made automatically when data is changed. So I'm quite certain that there is no bug. But feel free to prove me wrong ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants