Kotlin / Kotlin/multik

Flaky: PLU decomposition ComplexDouble returns wrong result on Linux

Open
#289 0 comments 0 reactions 0 assignees View on GitHub
ai-generated bug
Dominant language
Kotlin
Stars
734
Forks
51
Avg merge
9h 52m
Merged PRs (30d)
6

Description

### Multik version

0.3.0

### Module

multik-openblas

### Platform

JVM

### Operating System

Linux

### Description

`NativeLinAlgEx.pluC` for `ComplexDouble` matrices produces incorrect PLU decomposition intermittently on Linux (Ubuntu 22.04.5 LTS, gcc-12 12.3.0, JDK 21 Temurin). The test generates a 4x4 random ComplexDouble matrix (seeded with `Random(42)`), decomposes it into P, L, U, and verifies `P*L*U = A` with epsilon `1e-8`. Failed in 2 out of 4 CI runs.

### Reproducer

```kotlin
val a = data.getComplexDoubleM(4) // deterministic 4x4 ComplexDouble matrix from Random(42)
val (p, l, u) = NativeLinAlgEx.pluC(a)

val lu = NativeLinAlgEx.dotMMComplex(l, u)
val plu = NativeLinAlgEx.dotMMComplex(p, lu)
assertComplexFloatingNDArray(a, plu, epsilon = 1e-8) // Fails intermittently
```

### Additional information

```text
Flaky — failed in 2/4 CI runs.
AssertionFailedError at NativeLinAlgTest.kt:415.
CI runs: 22511673326, 22511741037.
Environment: Ubuntu 22.04.5 LTS, gcc-12 (12.3.0), g++-12, JDK 21 Temurin, x86_64.
```

Contributor guide

Open the contributing guide

Research direction

Start with NativeLinAlgTest.kt at line 415 and reproduce the seeded 4x4 ComplexDouble case through NativeLinAlgEx.pluC, dotMMComplex, and assertComplexFloatingNDArray. Compare successful and failed runs in the listed Linux CI environment, then verify that the decomposition consistently satisfies P*L*U = A within epsilon 1e-8.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.