Added basic support for mpich, added build logs to install dir
This commit is contained in:
parent
eb719c0457
commit
f776722842
|
@ -8,7 +8,7 @@ import json
|
||||||
import time
|
import time
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
SCRIPT_VERSION="v0.1"
|
SCRIPT_VERSION="v0.2"
|
||||||
|
|
||||||
def progressbar(it, prefix="", size=60, out=sys.stdout): # Python3.3+
|
def progressbar(it, prefix="", size=60, out=sys.stdout): # Python3.3+
|
||||||
count = len(it)
|
count = len(it)
|
||||||
|
@ -49,6 +49,9 @@ def getMpiVersion(mpi):
|
||||||
elif (mpi == "intelmpi"):
|
elif (mpi == "intelmpi"):
|
||||||
rawstr = getFromCommand(["ompi_info"]).splitlines()[0]
|
rawstr = getFromCommand(["ompi_info"]).splitlines()[0]
|
||||||
mpistr = rawstr[rawstr.find("Version")+8:rawstr.find("Build")-1]
|
mpistr = rawstr[rawstr.find("Version")+8:rawstr.find("Build")-1]
|
||||||
|
elif (mpi == "mpich"):
|
||||||
|
rawstr = getFromCommand(["mpirun","--version"])
|
||||||
|
mpistr = rawstr.split()[4]
|
||||||
return mpistr
|
return mpistr
|
||||||
|
|
||||||
def bordered(text):
|
def bordered(text):
|
||||||
|
@ -217,6 +220,10 @@ def installLib(lib,srcDir,workDir,instDir,compCC,compCXX,compFC,buildThreads,ver
|
||||||
print("See "+logfilePath+" for details")
|
print("See "+logfilePath+" for details")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print("Library "+libName+" has been installed successfully!\n")
|
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
|
#MAIN
|
||||||
|
@ -291,7 +298,7 @@ instDir=prefix+"/"+instStr
|
||||||
|
|
||||||
# setting MPI wrappers:
|
# setting MPI wrappers:
|
||||||
if (compiler == "gnu"):
|
if (compiler == "gnu"):
|
||||||
if (mpi == "hpcx" or mpi == "openmpi"):
|
if (mpi == "hpcx" or mpi == "openmpi" or mpi == "mpich"):
|
||||||
CC="mpicc"
|
CC="mpicc"
|
||||||
CXX="mpic++"
|
CXX="mpic++"
|
||||||
FC="mpifort"
|
FC="mpifort"
|
||||||
|
|
Loading…
Reference in New Issue