diff --git a/src/implementations.jl b/src/implementations.jl index 87d65adf9..ad11c6d1e 100644 --- a/src/implementations.jl +++ b/src/implementations.jl @@ -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