All pastes #1883058 Raw Edit

christian

public text v1 · immutable
#1883058 ·published 2010-06-14 18:21 UTC
rendered paste body
Index: c/blacs.c===================================================================--- c/blacs.c	(revision 6589)+++ c/blacs.c	(working copy)@@ -543,29 +543,19 @@   PyArrayObject* b; // destination matrix   PyArrayObject* desca; // source descriptor   PyArrayObject* descb; // destination descriptor-  PyObject* comm_obj = Py_None; // intermediate communicator, must-                                // encompass adesc + bdesc-  char order='R';+   char uplo;   char diag='N'; // copy the diagonal-  int nprocs;-  int iam;   int c_ConTxt;   int isreal;   int m;   int n;   int one = 1; -  if (!PyArg_ParseTuple(args, "OOOOOiiic", &desca, &descb, &a, &b,-                        &comm_obj, &m, &n, &isreal, &uplo))+  if (!PyArg_ParseTuple(args, "OOOOiiiic", &desca, &descb, &a, &b,+                        &c_ConTxt, &m, &n, &isreal, &uplo))     return NULL; -  // Create intermediate blacs grid on this communicator-  MPI_Comm comm = ((MPIObject*)comm_obj)->comm;-  Cblacs_pinfo_(&iam, &nprocs);-  MPI_Comm_size(comm, &nprocs);-  c_ConTxt = Csys2blacs_handle(comm);-  Cblacs_gridinit(&c_ConTxt, &order, 1, nprocs);   if (uplo == 'G') // General matrix     {       if(isreal)@@ -585,7 +575,6 @@ 		   (void*)COMPLEXP(b), one, one, INTP(descb), c_ConTxt);           }     -  Cblacs_gridexit(c_ConTxt);   Py_RETURN_NONE; } Index: gpaw/blacs.py===================================================================--- gpaw/blacs.py	(revision 6589)+++ gpaw/blacs.py	(working copy)@@ -431,6 +431,7 @@         triangular and L for lower triangular. The latter two are useful         for symmetric matrices."""         self.supercomm = supercomm+        self.supercomm_bg = BlacsGrid(self.supercomm, self.supercomm.size, 1)         self.srcdescriptor = srcdescriptor         self.dstdescriptor = dstdescriptor         assert uplo in ['G', 'U', 'L'] @@ -467,7 +468,7 @@         _gpaw.scalapack_redist(srcdescriptor.asarray(),                                 dstdescriptor.asarray(),                                src_mn, dst_mn,-                               self.supercomm.get_c_object(),+                               self.supercomm_bg.context,                                subN, subM, isreal, uplo)          def redistribute(self, src_mn, dst_mn):