Skip to content

Commit

Permalink
Add optional io argument to versioninfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst committed Aug 15, 2023
1 parent bfaa7ca commit 5e473b9
Showing 1 changed file with 24 additions and 24 deletions.
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])
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

0 comments on commit 5e473b9

Please sign in to comment.