All pastes #1978631 Raw Edit

christian

public text v1 · immutable
#1978631 ·published 2010-11-01 12:20 UTC
rendered paste body
Index: blacs.py===================================================================--- blacs.py	(revision 7254)+++ blacs.py	(working copy)@@ -197,6 +197,22 @@             _gpaw.blacs_destroy(self.context)  +class DryRunBlacsGrid(BlacsGrid):+    def __init__(self, comm, nprow, npcol, order='R'):+        assert isinstance(comm, SerialCommunicator) #DryRunCommunicator is subclass+        self.context = INACTIVE+        self.comm = comm+        self.nprow = nprow+        self.npcol = npcol+        self.ncpus = nprow * npcol+        self.mycol, self.myrow = -1, -1+        self.order = order++#XXX A MAJOR HACK HERE:+from gpaw import dry_run+if dry_run:+    BlacsGrid = DryRunBlacsGrid+ class BlacsDescriptor(MatrixDescriptor):     """Class representing a 2D matrix distribution on a blacs grid. @@ -515,8 +531,6 @@            'BlacsOrbitalLayouts': BlacsOrbitalLayouts,            'OrbitalLayouts':      OrbitalLayouts,             }[name](*args, **kwargs)-    if 0: #XXX debug-        print 'USING KSL: %s' % repr(ksl)     assert isinstance(ksl, KohnShamLayouts)     assert isinstance(ksl, BlacsLayouts) == (sl is not None)     return ksl