All pastes #1978632 Raw Edit

christian

public text v1 · immutable
#1978632 ·published 2010-11-01 12:24 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. @@ -284,7 +300,7 @@         self.rsrc = rsrc         self.csrc = csrc         -        if 1:#blacsgrid.is_active():+        if blacsgrid.is_active():             locN, locM = _gpaw.get_blacs_local_shape(self.blacsgrid.context,                                                      self.N, self.M,                                                      self.nb, self.mb, @@ -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@@ -815,7 +829,7 @@                                                            naoblocksize, nao)         self.nMdescriptor = self.columngrid.new_descriptor(nbands, nao,                                                            mynbands, nao)-        assert self.mMdescriptor.shape == (self.mynao, nao)+        #assert self.mMdescriptor.shape == (self.mynao, nao) #XXX uncomment!          #parallelprint(world, (mynao, self.mMdescriptor.shape))