[R] non-reproducible eigen() output with MKL

smallepsilon @m@||ep@||on @end|ng |rom proton@me
Sun May 4 17:57:52 CEST 2025


I am using MKL with R 4.5.0 on Linux, and eigen() is producing different results with identical calls. Specifically, when I run the code below, I get "FALSE" from identical(). Just in case it had something to do with a random number generator, I put identical set.seed() calls immediately before each eigen() call, but that did not help. Has anyone seen this behavior before?

(When n is 5, the identical() call almost always returns "TRUE". As n increases, the proportion of FALSE results increases, and it is nearly always FALSE when n is 50.)

Jesse

***

n <- 50
set.seed(20250504)
Sigma <- rWishart(1, df = n, Sigma = diag(n))[,,1]
e1 <- eigen(Sigma)
e2 <- eigen(Sigma)
identical(e1, e2)



More information about the R-help mailing list