From f776722842807e4dfd0f2e5763705fd660dce822 Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Mon, 19 Sep 2022 22:44:19 +0200 Subject: [PATCH] Added basic support for mpich, added build logs to install dir --- libinstaller.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libinstaller.py b/libinstaller.py index d32db85..d14c1f9 100755 --- a/libinstaller.py +++ b/libinstaller.py @@ -8,7 +8,7 @@ import json import time import shutil -SCRIPT_VERSION="v0.1" +SCRIPT_VERSION="v0.2" def progressbar(it, prefix="", size=60, out=sys.stdout): # Python3.3+ count = len(it) @@ -49,6 +49,9 @@ def getMpiVersion(mpi): elif (mpi == "intelmpi"): rawstr = getFromCommand(["ompi_info"]).splitlines()[0] mpistr = rawstr[rawstr.find("Version")+8:rawstr.find("Build")-1] + elif (mpi == "mpich"): + rawstr = getFromCommand(["mpirun","--version"]) + mpistr = rawstr.split()[4] return mpistr def bordered(text): @@ -217,6 +220,10 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver print("See "+logfilePath+" for details") sys.exit(1) print("Library "+libName+" has been installed successfully!\n") + buildOutputPath = instDir+"/"+"build_info" + if (not os.path.exists(buildOutputPath)): + os.makedirs(buildOutputPath) + shutil.copyfile(logfilePath,buildOutputPath+"/"+libName+".log") #MAIN @@ -291,7 +298,7 @@ instDir=prefix+"/"+instStr # setting MPI wrappers: if (compiler == "gnu"): - if (mpi == "hpcx" or mpi == "openmpi"): + if (mpi == "hpcx" or mpi == "openmpi" or mpi == "mpich"): CC="mpicc" CXX="mpic++" FC="mpifort"