System: MacOS 13.0.1 M1 Pro
Ide: Intellij
Dependencies:
org.jetbrains.kotlinx:multik-core:0.2.2
org.jetbrains.kotlinx:multik-openblas:0.2.2
Description:
Calling on any linear algebra method from multiple threads causes multiple calls on JvmNativeEngine -> Loader::load()
This then leads to a collision of Files.copy and an java.nio.file.FileAlreadyExistsException is thrown
To work around this I am pre initialising the library with a Synchronized annotation, but this can be done on the library level
Minimal sample to reproduce: https://github.com/MPopovych/MultikRaceConditionIssue/blob/main/src/main/kotlin/Main.kt
System: MacOS 13.0.1 M1 Pro Ide: Intellij Dependencies:
Description: Calling on any linear algebra method from multiple threads causes multiple calls on JvmNativeEngine -> Loader::load() This then leads to a collision of Files.copy and an java.nio.file.FileAlreadyExistsException is thrown
To work around this I am pre initialising the library with a Synchronized annotation, but this can be done on the library level