Added basic support for mpich, added build logs to install dir

This commit is contained in:
Patrick Lipka 2022-09-19 22:44:19 +02:00
parent eb719c0457
commit f776722842
1 changed files with 9 additions and 2 deletions

View File

@ -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"