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

TTPy is not Thread-Safe #93

Open
daskol opened this issue Oct 22, 2022 · 0 comments
Open

TTPy is not Thread-Safe #93

daskol opened this issue Oct 22, 2022 · 0 comments
Labels

Comments

@daskol
Copy link
Collaborator

daskol commented Oct 22, 2022

Bridging layer tt/core/tt_f90.f90 between ttpy and tt-fort uses global variables core and zcore which are used to convert cores from single array format to array-per-core representation and vice versa which is also named as sdv. Common pattern look like the following.

ranks, ptrs = tt_f90.dtt_add(self.n, self.r, other.r, self.ps, other.ps, self.core, other.core)
core = tt_f90.core.copy()
tt_f90.tt_dealloc()

The code above is not thread-safe since read-write accesses to core or zcore allocated arrays are not serialized.

@daskol daskol added the bug label Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant