oseledets/ttpy

TTPy is not Thread-Safe

Opened this issue · 0 comments

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.