Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cellVariable.min() broken in parallel #302

Closed
wd15 opened this issue Sep 19, 2014 · 2 comments
Closed

cellVariable.min() broken in parallel #302

wd15 opened this issue Sep 19, 2014 · 2 comments

Comments

@wd15
Copy link
Contributor

wd15 commented Sep 19, 2014

The following breaks on bunter in parallel

from fipy import Grid2D, CellVariable
mesh = Grid2D(nx=5, ny=5)
v = CellVariable(mesh=mesh)
print v.min()

with

 (trunk)bunter[wd15]: mpirun -np 2 python tmp.py --trilinos
Traceback (most recent call last):
  File "tmp.py", line 7, in <module>
print v.min()
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/variable.py", line 361, in __str__
Traceback (most recent call last):
  File "tmp.py", line 7, in <module>
return str(self.value)
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/variable.py", line 538, in _getValue
print v.min()
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/variable.py", line 361, in __str__
value = self._calcValue()
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/operatorVariable.py", line 73, in _calcValue
return self._calcValue_()
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/unaryOperatorVariable.py", line 40, in _calcValue_
return str(self.value)
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/variable.py", line 538, in _getValue
return self.op(self.var[0].value)
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/meshVariable.py", line 427, in minParallel
value = self._calcValue()
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/operatorVariable.py", line 73, in _calcValue
fn=a.min, fnParallel=self.mesh.communicator.epetra_comm.MinAll)
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/meshVariable.py", line 409, in _maxminparallel_
return self._calcValue_()
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/unaryOperatorVariable.py", line 40, in _calcValue_
return fnParallel(nodeVal)
  File "/users/wd15/.virtualenvs/trunk/lib/python2.6/site-packages/PyTrilinos/Epetra.py", line 4914, in MinAll
return self.op(self.var[0].value)
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/meshVariable.py", line 427, in minParallel
fn=a.min, fnParallel=self.mesh.communicator.epetra_comm.MinAll)
  File "/users/wd15/work/matforge/fipy/trunk/fipy/variables/meshVariable.py", line 409, in _maxminparallel_
return _Epetra.Comm_MinAll(self, *args)
TypeError: Require int, long or double array, got notype array
return fnParallel(nodeVal)
  File "/users/wd15/.virtualenvs/trunk/lib/python2.6/site-packages/PyTrilinos/Epetra.py", line 4914, in MinAll
return _Epetra.Comm_MinAll(self, *args)
TypeError: Require int, long or double array, got notype array

Imported from trac ticket #421, created by wd15 on 01-13-2012 at 18:34, last modified: 01-31-2012 at 15:54

@wd15
Copy link
Contributor Author

wd15 commented Sep 19, 2014

If this gets fixed go back and fix trunk/examples/cahnHilliard/mesh2D.py?rev=5112#L131 so it uses phi.min().

Trac comment by wd15 on 01-13-2012 at 18:36

@wd15
Copy link
Contributor Author

wd15 commented Sep 19, 2014

Fixed on bunter with r5146.

Trac comment by wd15 on 01-31-2012 at 15:54

@wd15 wd15 closed this as completed Sep 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants