Hi -

I've been trying to adjust some code to work in parallel, but I've run into
a bit of a snag for one situation where I need to get faceCenters for a
computation (want to draw a convex hull around a shape on my plots).  When
I try to get global face centers on a mesh (mesh.faceCenters.globalValue)
and check the shape, I get different values for the shape of what should be
a global value depending on the number of mpi jobs started.

For example, I modified parallel.py:
from fipy import parallelComm, Grid2D

mesh = Grid2D(nx=10,ny=10)

fipy_info = "FiPy: %d on %d of %d. face shape %d x %d, cell shape: %d x %d"
% (mesh.numberOfCells,

   parallelComm.procID,

   parallelComm.Nproc,

   mesh.faceCenters.globalValue.shape[0],

   mesh.faceCenters.globalValue.shape[1],

   mesh.cellCenters.globalValue.shape[0],

   mesh.cellCenters.globalValue.shape[1])

print " :: ".join((fipy_info,))

I get:
m@ediacaran:~> mpirun -np 1 python parallel.py --trilinos
FiPy: 100 on 0 of 1. face shape 2 x 220, cell shape: 2 x 100
m@ediacaran:~> mpirun -np 2 python parallel.py --trilinos
FiPy: 70 on 0 of 2. face shape 2 x 157, cell shape: 2 x 100
FiPy: 70 on 1 of 2. face shape 2 x 157, cell shape: 2 x 100
m@ediacaran:~> mpirun -np 4 python parallel.py --trilinos
FiPy: 40 on 0 of 4. face shape 2 x 136, cell shape: 2 x 100
FiPy: 60 on 1 of 4. face shape 2 x 136, cell shape: 2 x 100
FiPy: 60 on 2 of 4. face shape 2 x 136, cell shape: 2 x 100
FiPy: 60 on 3 of 4. face shape 2 x 136, cell shape: 2 x 100

Is there something I should be doing differently?  It seems like the global
cellCenters are consistent, but not the faceCenters.

I'm running what should be current out of trunk, fipy.__version__ is 3.1.
 It was build from 6e897df400126ff8b935dd7344469f7c762c8553.

-- 
James Snyder
Biomedical Engineering
Northwestern University
ph: (847) 448-0386
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to