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 compilation with OPENMP=1 #607

Merged
merged 5 commits into from
May 31, 2023
Merged

Fix compilation with OPENMP=1 #607

merged 5 commits into from
May 31, 2023

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented May 25, 2023

Fixes a bug reported in #592.
The fix for compiling with OpenMP was easy, but it revealed a problem with random generators.

This PR solves the problem of compilation failure with OPENMP=1, but OpenMP is disabled in the BndMPoleSymplectic4QuantPass, StrMPoleSymplectic4QuantPass and QuantDiffPass passmethods until the random generation of quantum emission is validated with OpenMP.

I keep the issue #592 open because it documents the remaining problem. A dummy passmethod called TestRandomPass is temporarily added to the repository: it checks the random generators with and without OpenMP. The direct output of Gaussian distribution looks correct.

@lfarv lfarv added Matlab For Matlab/Octave AT code Python For python AT code bug fix labels May 25, 2023
@lfarv lfarv requested a review from swhite2401 May 25, 2023 16:23
@swhite2401
Copy link
Contributor

Ok for for me, any idea on the problem with the RNG?

@lfarv
Copy link
Contributor Author

lfarv commented May 31, 2023

Ok for for me, any idea on the problem with the RNG?

It looks very strange. The results of TestRandomPass show the mean and std values of the generated numbers are correct and identical with and without OpenMP. The common and thread-specific behaviours are also correct.

A next step will be to check if the problem lies in getting the number of emitted photons, or in computing their energy…

@lfarv lfarv merged commit 3e829a4 into master May 31, 2023
@lfarv lfarv deleted the fix_openmp branch May 31, 2023 11:40
@lfarv lfarv mentioned this pull request Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Matlab For Matlab/Octave AT code Python For python AT code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants