using MPI and "total size of new arraymust be unchanged"
12 weeks ago by
I met a problem while using MPI.
part of my code is like:
So I use mpirun -n number xxx.py and my error is:
Q = FunctionSpace(mesh, 'CG', 1) g = Function(Q) tg = TestFunction(Q) n = len(g.vector()) dgdx = assemble(tg*dx).get_local().copy().reshape([n,]) #<--here I have problem volume = dgdx.sum()
"ValueError: total size of new array must be unchanged"
I think this may be a very simple problem with mpi of python rather than of FEniCS.
but I am a new learner of HPC thus is there any suggestion about how to solve it?
Thanks a lot
Community: FEniCS Project
11 weeks ago by
n = len(g.vector().get_local())
Please login to add an answer/comment or follow this question.