scalapack.Scalapack Class Reference
+ Inheritance diagram for scalapack.Scalapack:

Public Member Functions

def __init__ (self)
 
def write_slmakeinc (self)
 
def down_install (self)
 
- Public Member Functions inherited from framework.Frame
def __init__ (self, argv)
 
def usage (self)
 
def parse_args (self, argv)
 
def look_for_mpibinaries (self)
 
def look_for_mpih (self)
 
def check_mpicc (self)
 
def check_mpif77 (self)
 
def set_mangling (self)
 
def check_linking (self)
 
def set_download (self)
 
def set_ranlib (self)
 
def detect_compilers (self)
 
def fc_is_intel (self)
 
def fc_is_gnu (self)
 
def fc_is_pgi (self)
 
def cc_is_intel (self)
 
def cc_is_gnu (self)
 
def cc_is_pgi (self)
 
def resume (self)
 
def cleanup (self)
 

Public Attributes

 testing
 
 scalapacklib
 

Additional Inherited Members

- Static Public Attributes inherited from framework.Frame
string prefix = ''
 
 ccflags
 
 fcflags
 
 noopt
 
string mpibindir = ''
 
string mpiincdir = ''
 
 mpicc
 
 mpif77
 
string make = 'make'
 
string plat = 'LINUX'
 
string mangling = ''
 
string blaslib = ''
 
string blacslib = ''
 
string blacsClib = ''
 
string blacsF77lib = ''
 
string lapacklib = ''
 
string scalapacklib = ''
 
int proxy = 0
 
int downblas = 0
 
int downblacs = 1
 
int downlapack = 0
 
string ldflags_c = ''
 
string ldflags_f77 = ''
 
int testing = 1
 
string downcmd = ''
 
string blasurl = 'http://netlib.org/blas/blas.tgz'
 
string lapackurl = 'http://netlib.org/lapack/lapack.tgz'
 
string blacsurl = 'http://netlib.org/blacs/mpiblacs.tgz'
 
string scalapackurl = 'http://netlib.org/scalapack/scalapack-1.8.0.tgz'
 
string ranlib = ''
 
int clean = 0
 

Detailed Description

 This class takes care of the BLACS installation. 

Constructor & Destructor Documentation

◆ __init__()

def scalapack.Scalapack.__init__ (   self)
19  def __init__(self):
20  print('\n','='*40)
21  print('ScaLAPACK installer is starting now. Buckle up!')
22  print('='*40)
23 
24  self.down_install()
25 
26 
27 
28 
29 
30 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet print(const Packet &a)
Definition: GenericPacketMath.h:1166

References scalapack.Scalapack.down_install(), and Eigen::internal.print().

Member Function Documentation

◆ down_install()

def scalapack.Scalapack.down_install (   self)
 Downloads ind installs ScaLAPACK 
97  def down_install(self):
98  """ Downloads ind installs ScaLAPACK """
99 
100  savecwd = os.getcwd()
101 
102  # creating the build and lib dirs if don't exist
103  if(not os.path.isdir(os.path.join(os.getcwd(),'build'))):
104  os.mkdir(os.path.join(os.getcwd(),'build'))
105 
106  if(not os.path.isdir(os.path.join(os.getcwd(),'lib'))):
107  os.mkdir(os.path.join(os.getcwd(),'lib'))
108 
109  if(not os.path.isdir(os.path.join(os.getcwd(),'log'))):
110  os.mkdir(os.path.join(os.getcwd(),'log'))
111 
112  # chdir into the build directory
113  os.chdir(os.path.join(os.getcwd(),'build'))
114 
115  if(not os.path.isfile(os.path.join(os.getcwd(),getURLName(self.scalapackurl)))):
116  downloader(self.scalapackurl, self.downcmd)
117 
118  comm = 'gunzip -f scalapack-1.8.0.tgz'
119  (output, error, retz) = runShellCommand(comm)
120  if(retz != 0):
121  print('\n\nScaLAPACK: cannot unzip scalapack-1.8.0.tgz')
122  print('stderr:\n','*'*40,'\n',error,'\n','*'*40)
123  sys.exit()
124 
125 
126  comm = 'tar xf scalapack-1.8.0.tar'
127  (output, error, retz) = runShellCommand(comm)
128  if(retz != 0):
129  print('\n\nScaLAPACK: cannot untar scalapack-1.8.0.tar')
130  print('stderr:\n','*'*40,'\n',error,'\n','*'*40)
131  sys.exit()
132  os.remove('scalapack-1.8.0.tar')
133 
134  os.chdir(os.path.join(os.getcwd(),'scalapack-1.8.0'))
135 
136  self.write_slmakeinc()
137 
138  print('Compiling ScaLAPACK...', end=' ')
139  sys.stdout.flush()
140  comm = self.make
141  (output, error, retz) = runShellCommand(comm)
142  if(retz != 0):
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)
146  sys.exit()
147 
148  fulllog = os.path.join(savecwd,'log/scalog')
149  writefile(fulllog, output+error)
150  print('Installation of ScaLAPACK successful..')
151  print('(log is in ',fulllog,')')
152 
153  if(self.testing == 1):
154  print('Compiling test routines...')
155  sys.stdout.flush()
156  comm = self.make+' exe'
157  (output, error, retz) = runShellCommand(comm)
158  if(retz != 0):
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)
162  sys.exit()
163  print('done')
164 
165 
166  os.rename('libscalapack.a',os.path.join(savecwd,'lib/libscalapack.a'))
167 
168  self.scalapacklib = os.path.join(savecwd,'lib/libscalapack.a ')
169  Frame.scalapacklib = os.path.join(savecwd,'lib/libscalapack.a ')
170 
171  os.chdir(savecwd)
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__().

◆ write_slmakeinc()

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 """
33 
34  sdir = os.getcwd()
35  print('Writing SLmake.inc...', end=' ')
36  sys.stdout.flush()
37  writefile('SLmake.inc',"""
38 SHELL = /bin/sh
39 
40 home = """+sdir+"""
41 
42 PLAT = """+self.plat+"""
43 
44 USEMPI = -DUsingMpiBlacs
45 
46 SMPLIB =
47 BLACSFINIT = """+self.blacsF77lib+"""
48 BLACSCINIT = """+self.blacsClib+"""
49 BLACSLIB = """+self.blacslib+"""
50 TESTINGdir = $(home)/TESTING
51 
52 
53 CBLACSLIB = $(BLACSCINIT) $(BLACSLIB) $(BLACSCINIT)
54 FBLACSLIB = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT)
55 
56 PBLASdir = $(home)/PBLAS
57 SRCdir = $(home)/SRC
58 TESTdir = $(home)/TESTING
59 PBLASTSTdir = $(TESTINGdir)
60 TOOLSdir = $(home)/TOOLS
61 REDISTdir = $(home)/REDIST
62 REDISTTSTdir = $(TESTINGdir)
63 
64 F77 = """+self.mpif77+"""
65 CC = """+self.mpicc+"""
66 NOOPT = """+self.noopt+"""
67 F77FLAGS = $(NOOPT) """+self.fcflags+"""
68 CCFLAGS = """+self.ccflags+"""
69 SRCFLAG =
70 F77LOADER = $(F77)
71 CCLOADER = $(F77)
72 F77LOADFLAGS = """+self.ldflags_f77+"""
73 CCLOADFLAGS = """+self.ldflags_c+"""
74 
75 CDEFS = -DNO_IEEE $(USEMPI) """+self.mangling+"""
76 
77 ARCH = ar
78 ARCHFLAGS = cr
79 RANLIB = """+self.ranlib+"""
80 
81 SCALAPACKLIB = $(home)/libscalapack.a
82 BLASLIB = """+self.blaslib+"""
83 LAPACKLIB = """+self.lapacklib+"""
84 
85 PBLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(LAPACKLIB) $(BLASLIB) $(SMPLIB)
86 PRLIBS = $(SCALAPACKLIB) $(CBLACSLIB) $(SMPLIB)
87 RLIBS = $(SCALAPACKLIB) $(FBLACSLIB) $(CBLACSLIB) $(LAPACKLIB) $(BLASLIB) $(SMPLIB)
88 LIBS = $(PBLIBS)
89  """)
90  print('done.')
91 
92 
93 
94 
95 
96 

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().

Member Data Documentation

◆ scalapacklib

scalapack.Scalapack.scalapacklib

Referenced by framework.Frame.resume().

◆ testing

scalapack.Scalapack.testing

The documentation for this class was generated from the following file: