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

fft_3d is not thread safe #145

Open
sangallidavide opened this issue Oct 28, 2024 · 1 comment
Open

fft_3d is not thread safe #145

sangallidavide opened this issue Oct 28, 2024 · 1 comment
Assignees

Comments

@sangallidavide
Copy link
Member

https://github.com/yambo-code/yambo/blob/master/src/wf_and_fft/fft_3d_fftw.F is not thread safe if fftw_plan=0.

In yambo, by chance, the subroutine, when called inside multi-thread loops, seems to always be in the situation with fftw_plan\=0.

Still, the subroutine is not thread safe and it is called deep insided OpenMP loops

@andrea-ferretti
Copy link
Member

I think a possible fix is to have a routine dedicated to the initialization of the FFTs, to be explicitly called in the drivers before the parallel regions where scatterBamp (to make an example is called).
At present this is sorted out by WF_load (which, most of the time, initializes FFTs), but it looks as a fragile situation.

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

3 participants