This class takes care of the BLACS installation.
| def scalapack.Scalapack.down_install |
( |
|
self | ) |
|
Downloads ind installs ScaLAPACK
97 def down_install(self):
98 """ Downloads ind installs ScaLAPACK """
100 savecwd = os.getcwd()
103 if(
not os.path.isdir(os.path.join(os.getcwd(),
'build'))):
104 os.mkdir(os.path.join(os.getcwd(),
'build'))
106 if(
not os.path.isdir(os.path.join(os.getcwd(),
'lib'))):
107 os.mkdir(os.path.join(os.getcwd(),
'lib'))
109 if(
not os.path.isdir(os.path.join(os.getcwd(),
'log'))):
110 os.mkdir(os.path.join(os.getcwd(),
'log'))
113 os.chdir(os.path.join(os.getcwd(),
'build'))
115 if(
not os.path.isfile(os.path.join(os.getcwd(),
getURLName(self.scalapackurl)))):
118 comm =
'gunzip -f scalapack-1.8.0.tgz'
121 print(
'\n\nScaLAPACK: cannot unzip scalapack-1.8.0.tgz')
122 print(
'stderr:\n',
'*'*40,
'\n',error,
'\n',
'*'*40)
126 comm =
'tar xf scalapack-1.8.0.tar'
129 print(
'\n\nScaLAPACK: cannot untar scalapack-1.8.0.tar')
130 print(
'stderr:\n',
'*'*40,
'\n',error,
'\n',
'*'*40)
132 os.remove(
'scalapack-1.8.0.tar')
134 os.chdir(os.path.join(os.getcwd(),
'scalapack-1.8.0'))
136 self.write_slmakeinc()
138 print(
'Compiling ScaLAPACK...', end=
' ')
143 print(
'\n\nScaLAPACK: error building ScaLAPACK')
144 print(
'stderr:\n',
'*'*40,
'\n',error,
'\n',
'*'*40)
145 writefile(os.path.join(savecwd,
'log/scalog'), output+error)
148 fulllog = os.path.join(savecwd,
'log/scalog')
150 print(
'Installation of ScaLAPACK successful..')
151 print(
'(log is in ',fulllog,
')')
153 if(self.testing == 1):
154 print(
'Compiling test routines...')
156 comm = self.make+
' exe'
159 print(
'\n\nScaLAPACK: error building ScaLAPACK test routines')
160 print(
'stderr:\n',
'*'*40,
'\n',error,
'\n',
'*'*40)
161 writefile(os.path.join(savecwd,
'log/scalog'), output+error)
166 os.rename(
'libscalapack.a',os.path.join(savecwd,
'lib/libscalapack.a'))
168 self.scalapacklib = os.path.join(savecwd,
'lib/libscalapack.a ')
169 Frame.scalapacklib = os.path.join(savecwd,
'lib/libscalapack.a ')
172 print(
"done. ScaLAPACK is installed. Use it in moderation :-)")
if(UPLO(*uplo)==INVALID) info
Definition: level3_impl.h:428
def downloader(uri, cmd)
Definition: utils.py:150
def runShellCommand(command)
Definition: utils.py:87
def getURLName(url)
Definition: utils.py:137
def writefile(fname, fill)
Definition: utils.py:17
References framework.Frame.downcmd, utils.downloader(), utils.getURLName(), if(), Eigen::internal::TensorBlockDescriptor< NumDims, Index >::DestinationBuffer.make(), Eigen::internal::TensorBlockDescriptor< NumDims, IndexType >::DestinationBuffer.make(), framework.Frame.make, Eigen::internal.print(), utils.runShellCommand(), framework.Frame.scalapackurl, scalapack.Scalapack.write_slmakeinc(), and utils.writefile().
Referenced by scalapack.Scalapack.__init__().
| def scalapack.Scalapack.write_slmakeinc |
( |
|
self | ) |
|
Writes the SLmake.inc file for ScaLAPACK installation
31 def write_slmakeinc(self):
32 """ Writes the SLmake.inc file for ScaLAPACK installation """
35 print(
'Writing SLmake.inc...', end=
' ')
42 PLAT = """+self.plat+
"""
44 USEMPI = -DUsingMpiBlacs
47 BLACSFINIT = """+self.blacsF77lib+
"""
48 BLACSCINIT = """+self.blacsClib+
"""
49 BLACSLIB = """+self.blacslib+
"""
50 TESTINGdir = $(home)/TESTING
53 CBLACSLIB = $(BLACSCINIT) $(BLACSLIB) $(BLACSCINIT)
54 FBLACSLIB = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT)
56 PBLASdir = $(home)/PBLAS
58 TESTdir = $(home)/TESTING
59 PBLASTSTdir = $(TESTINGdir)
60 TOOLSdir = $(home)/TOOLS
61 REDISTdir = $(home)/REDIST
62 REDISTTSTdir = $(TESTINGdir)
64 F77 = """+self.mpif77+
"""
65 CC = """+self.mpicc+
"""
66 NOOPT = """+self.noopt+
"""
67 F77FLAGS = $(NOOPT) """+self.fcflags+
"""
68 CCFLAGS = """+self.ccflags+
"""
72 F77LOADFLAGS = """+self.ldflags_f77+
"""
73 CCLOADFLAGS = """+self.ldflags_c+
"""
75 CDEFS = -DNO_IEEE $(USEMPI) """+self.mangling+
"""
79 RANLIB = """+self.ranlib+
"""
81 SCALAPACKLIB = $(home)/libscalapack.a
82 BLASLIB = """+self.blaslib+
"""
83 LAPACKLIB = """+self.lapacklib+
"""
85 PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(LAPACKLIB) $(BLASLIB) $(SMPLIB)
86 PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
87 RLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(CBLACSLIB) $(LAPACKLIB) $(BLASLIB) $(SMPLIB)
References blacs.Blacs.blacsClib, framework.Frame.blacsClib, blacs.Blacs.blacsF77lib, framework.Frame.blacsF77lib, blacs.Blacs.blacslib, framework.Frame.blacslib, blas.Blas.blaslib, framework.Frame.blaslib, framework.Frame.ccflags, framework.Frame.fcflags, framework.Frame.lapacklib, lapack.Lapack.lapacklib, framework.Frame.ldflags_c, framework.Frame.ldflags_f77, framework.Frame.mangling, framework.Frame.mpicc, framework.Frame.mpif77, framework.Frame.noopt, framework.Frame.plat, Eigen::internal.print(), framework.Frame.ranlib, and utils.writefile().
Referenced by scalapack.Scalapack.down_install().