Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing windows tests with 2023.2 #130

Closed
ViralBShah opened this issue Aug 8, 2023 · 1 comment · Fixed by #132
Closed

Failing windows tests with 2023.2 #130

ViralBShah opened this issue Aug 8, 2023 · 1 comment · Fixed by #132

Comments

@ViralBShah
Copy link
Contributor

Almost all the tests fail with this. Not sure what is happening here and if it is a Julia issue or something else in MKL.

Seen in #123 and logs in https://github.com/JuliaLinearAlgebra/MKL.jl/actions/runs/5786517472/job/15681397696

     From worker 3:	┌ Error: The `LinearAlgebra/bidiag` test set mutated ENV and did not restore the original values
      From worker 3:	│   testset_name = "LinearAlgebra/bidiag"
      From worker 3:	│   testset_path = "C:\\hostedtoolcache\\windows\\julia\\nightly\\x64\\share\\julia\\stdlib\\v1.11\\LinearAlgebra\\test\\bidiag"
      From worker 3:	└ @ Main C:\Users\RUNNER~1\AppData\Local\Temp\jl_HEpvLY\testdefs.jl:56
LinearAlgebra/bidiag               (3) |         failed at 2023-08-07T15:10:53.520
Error During Test at C:\Users\RUNNER~1\AppData\Local\Temp\jl_HEpvLY\testdefs.jl:22
  Got exception outside of a @test
  The `LinearAlgebra/bidiag` test set mutated ENV and did not restore the original values
@imciner2
Copy link
Contributor

imciner2 commented Aug 9, 2023

Its tripping up because MKL is leaving the __KMP_REGISTERED_LIB_<PID> variable in the environment after the tests are run. This isn't unique to the test environment either, it happens if you just download and run the pinv.jl test file with MKL as well. Changing the threading layer (using MKL.set_threading_layer(MKL.THREADING_TBB) for instance) before calling it doesn't change anything, so it appears it is always going to be loading the OpenMP library when the shared library is used now.

Probably, the MKL tests should be run with the environment variable JULIA_TEST_CHECK_MUTATED_ENV set to false to just ignore that check.

imciner2 added a commit to imciner2/MKL.jl that referenced this issue Aug 9, 2023
The test suite needs to ignore any changes to the environment because loading MKL's shared library on some platforms (such as Windows) can create environment variables for OpenMP (e.g. __KMP_REGISTERED_LIB_<PID>) that live the entire Julia session and make the environment appear modified. 

Fixes JuliaLinearAlgebra#130
DilumAluthge added a commit to JuliaLang/julia that referenced this issue Aug 21, 2023
PR #47148 added the ability to ignore changes to the environment in a
testsuite (using the `JULIA_TEST_CHECK_MUTATED_ENV` environment
variable), but didn't hide the printing of the error message. This hides
the actual error message so that the terminal isn't cluttered with them
when they should be ignored. This is needed because in the MKL.jl
testsuite, the error is hit for basically every linear algebra test
(JuliaLinearAlgebra/MKL.jl#130), and so even
when we have already disabled the error, printing the error message
causes lots of noise on the terminal that can possibly hide other
problems.

Co-authored-by: Dilum Aluthge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants