-
Notifications
You must be signed in to change notification settings - Fork 8
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
soap_turbo may not be thread safe #7
Comments
I have indeed not thought about thread safety. The W and S variables are built during orthogonality construction and are (S is the matrix of overlap coefficients of the original [non orthonormal] basis, and W is the matrix of linear coefficients to express the orthonormal basis in terms of the original basis) |
Thanks. I'll think about it as well. |
Are these arrays only dependent on properties of the GAP itself, or do they sometimes need to be recomputed based on something which is only known at compute time, e.g. the specific composition of the configuration? I.e. if I knew I was only using one GAP+SOAP_turbo potential, could I do all the pre-computation once and count on it not changing during different compute calls? [I'm thinking of refactoring a bit of it to create a |
These arrays depend only on:
They only need to be recomputed if these details change between calls, which will not happen unless the descriptor definition changes. |
OK - I may try to make a PR that will create some sort of soap_turbo object that's explicitly initialized, like the potentials, so it can be thread safe. I can even have the argument be optional, so it can fall back to the current behavior and no code that uses soap_turbo has to change unless it wants to be thread safe. |
OK, sounds good! |
The use of function-local
save
variables breaks thread safety, andsoap_turbo
uses it forW
,S
, andmultiplicity_array
insoap_turbo.f90
(line 71).Has anyone thought about this issue yet? Can anyone explain what those variables are, and why they are
save
?The text was updated successfully, but these errors were encountered: