MPI test do not select the correct (system) MPI implementation
Testing MPI v0.20-dev (master) branch on Linux (Ubuntu 20.04) with system MPI
julia> MPIPreferences.use_system_binary()
┌ Info: MPI implementation
│ libmpi = "libmpi"
│ version_string = "Open MPI v4.1.2, package: Open MPI luraess@superzack Distribution, ident: 4.1.2, repo rev: v4.1.2, Nov 24, 2021\0"
│ impl = "OpenMPI"
│ version = v"4.1.2"
└ abi = "OpenMPI"
does not pick up the correct MPI implementation although LocalPreferences.toml contains the above info. Tests would always pick up MPICH_jll
┌ Info: Running MPI tests
│ ArrayType = Array
│ nprocs = 1
│ MPIPreferences.abi = "MPICH"
└ MPIPreferences.binary = "MPICH_jll"
Copying manually LocalPreferences.toml does not solve the issue.
Note that MPI selects the correct implementation outside of test
julia> MPI.MPI_LIBRARY_VERSION_STRING
"Open MPI v4.1.2, package: Open MPI luraess@superzack Distribution, ident: 4.1.2, repo rev: v4.1.2, Nov 24, 2021\0"
What version of Julia are you using?
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD EPYC 7282 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, znver2)
Same issue with Spack-built v1.7.1
Is this worth fixing, or should we just add a section to the docs on how to run the tests (copy the LocalPreferences.jl into your test directory)
Is this now fixed by #564? Seems that https://github.com/JuliaPackaging/Preferences.jl/pull/37#event-6460508912 and https://github.com/JuliaLang/Pkg.jl/pull/3061, as flagged some months ago to me by @vchuravy got merged (don't know the up to date status though @simonbyrne).