Error in max(eigen(t(m) %*% m)$val) : invalid 'type' (complex) of argument
nmattia opened this issue · comments
Nicolas Mattia commented
I'm failing to run the tests inline-r 0.9.2 with GHC 8.4.3 and R 3.4.3:
running tests
Running 3 test suites...
Test suite test-shootout: RUNNING...
Quoted shootout programs
tests/shootout/binarytrees.R: OK (1.35s)
tests/shootout/fasta.R: OK (0.40s)
tests/shootout/fastaredux.R: OK (0.37s)
tests/shootout/mandelbrot-noout.R: OK (0.38s)
tests/shootout/nbody.R: OK (0.46s)
tests/shootout/pidigits.R: OK (5.34s)
tests/shootout/spectralnorm-math.R: FAIL
Exception: R Runtime Error: Error in max(eigen(t(m) %*% m)$val) :
invalid 'type' (complex) of argument
tests/shootout/spectralnorm.R: OK (1.13s)
1 out of 8 tests failed (10.82s)
Test suite test-shootout: FAIL
Test suite logged to: dist/test/inline-r-0.9.2-test-shootout.log
Test suite tests: RUNNING...
Test suite tests: PASS
Test suite logged to: dist/test/inline-r-0.9.2-tests.log
Test suite test-qq: RUNNING...
Test suite test-qq: PASS
Test suite logged to: dist/test/inline-r-0.9.2-test-qq.log
2 of 3 test suites (2 of 3 test cases) passed.
Reproduce with the following:
let
owner = "NixOS";
repo = "nixpkgs-channels";
rev = "c06f5302f63af92c9ba0e10401f366e0c7bd7d49";
nixpkgs = fetchTarball {
url =
"https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
sha256 = "01fnr797a6iv3cy8gmddmm5gdlrijjdm66y9v14jai3np8fx1nyz";
};
in (import nixpkgs {}).haskellPackages.inline-r
and run nix-build
.
Alexander Vershilov commented
The issue seems because of non-total isolation of the tests here, if I try to run following tests in R itself, it fails:
[nix-shell:~/workspace/tweag/HaskellR/inline-r]$ cat tests/shootout/mandelbrot-noout.R tests/shootout/spectralnorm-math.R | R --slave
P4
200 200
Error in max(eigen(t(m) %*% m)$val) :
invalid 'type' (complex) of argument
Calls: spectralnorm_math -> cat
Execution halted
Alexander Vershilov commented
Fixed in 6873b81 . It's not in master yet trying to make CI pass for other issues.
Alexander Vershilov commented
Fix is on master