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

Add optional io argument to versioninfo() #760

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/implementations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,41 +82,41 @@ const MPI_VERSION = Get_version()

using PkgVersion
"""
MPI.versioninfo()
MPI.versioninfo([io::IO=stdout])
lcw marked this conversation as resolved.
Show resolved Hide resolved

Print a summary of the curent MPI configuration.
"""
function versioninfo()
println("MPIPreferences:")
println(" binary: ", MPIPreferences.binary)
println(" abi: ", MPIPreferences.abi)
function versioninfo(io::IO=stdout)
println(io, "MPIPreferences:")
println(io, " binary: ", MPIPreferences.binary)
println(io, " abi: ", MPIPreferences.abi)
if MPIPreferences.binary == "system"
println(" libmpi: ", MPIPreferences.System.libmpi)
println(" mpiexec: ", MPIPreferences.System.mpiexec_path)
println(io, " libmpi: ", MPIPreferences.System.libmpi)
println(io, " mpiexec: ", MPIPreferences.System.mpiexec_path)
end
println()
println("Package versions")
println(" MPI.jl: ", PkgVersion.@Version)
println(" MPIPreferences.jl: ", PkgVersion.Version(MPIPreferences))
println(io)
println(io, "Package versions")
println(io, " MPI.jl: ", PkgVersion.@Version)
println(io, " MPIPreferences.jl: ", PkgVersion.Version(MPIPreferences))
if MPIPreferences.binary == "MPICH_jll"
println(" MPICH_jll: ", PkgVersion.Version(API.MPICH_jll))
println(io, " MPICH_jll: ", PkgVersion.Version(API.MPICH_jll))
elseif MPIPreferences.binary == "OpenMPI_jll"
println(" OpenMPI_jll: ", PkgVersion.Version(API.OpenMPI_jll))
println(io, " OpenMPI_jll: ", PkgVersion.Version(API.OpenMPI_jll))
elseif MPIPreferences.binary == "OpenMPI_jll"
println(" OpenMPI_jll: ", PkgVersion.Version(API.OpenMPI_jll))
println(io, " OpenMPI_jll: ", PkgVersion.Version(API.OpenMPI_jll))
elseif MPIPreferences.binary == "MicrosoftMPI_jll"
println(" MicrosoftMPI_jll: ", PkgVersion.Version(API.MicrosoftMPI_jll))
println(io, " MicrosoftMPI_jll: ", PkgVersion.Version(API.MicrosoftMPI_jll))
elseif MPIPreferences.binary == "MPItrampoline_jll"
println(" MPItrampoline_jll ", PkgVersion.Version(API.MPItrampoline_jll))
println(io, " MPItrampoline_jll ", PkgVersion.Version(API.MPItrampoline_jll))
end
println()
println("Library information:")
println(" libmpi: ", API.libmpi)
println(" libmpi dlpath: ", Libdl.dlpath(API.libmpi))
println(" MPI version: ", Get_version())
println(" Library version: ")

println(io)
println(io, "Library information:")
println(io, " libmpi: ", API.libmpi)
println(io, " libmpi dlpath: ", Libdl.dlpath(API.libmpi))
println(io, " MPI version: ", Get_version())
println(io, " Library version: ")
for line in split(Get_library_version(), '\n')
println(" ", line)
println(io, " ", line)
end
end
Loading