Hi Lawrence, ah, if I also call vwr.create() it works and generates a .dat file with the matrix. Running this file through ex6 works on 1 core but crashes with a PETSc segfault on 24 cores. Eike
On 16 May 2015, at 11:49, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> wrote:
On 16 May 2015, at 11:39, Eike Mueller <E.Mueller@bath.ac.uk> wrote:
Thanks, I guess that is
A = full.M[0,0].handle B = full.M[0,1].handle C = full.M[1,0].handle D = full.M[1,1].handle
but it still crashes with a segfault in PETSc in
do vwr.setFromOptions() i think
vwr.setType(vwr.Type.BINARY)
If I comment out the lines
#vwr.setType(vwr.Type.BINARY) #vwr.setFileName("filename.dat") #vwr.setFileMode(vwr.Mode.WRITE)
it prints to the screen ok
Eike
On 16 May 2015, at 11:06, Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> wrote:
On 16 May 2015, at 10:37, Eike Mueller <E.Mueller@bath.ac.uk> wrote:
Hi Lawrence,
as an additional test I just tried to re-run PETSc’s ex6 on 24 cores with Euclid. Here it does seem to work, the command I use is:
mpirun -n 24 ./ex6 -f -f helmholtz-sphere.dat -ksp_type cg -ksp_convergence_test skip -ksp_max_it 2 -ksp_monitor -pc_hypre_type boomeramg -pc_type hypre -pc_hypre_boomeramg_smooth_type Euclid -log_summary -ksp_view
As a sanity check, is there a way of writing out the pressure matrix for the system that I currently solve with the fieldsplit preconditioner and run it through ex6 exactly like above?
Yes.
full = assemble(mixed_operator)
A = A.M[0, 0].handle B = A.M[0, 1].handle C = A.M[1, 0].handle D = A.M[1, 1].handle
Adiag = A.getDiagonal()
Adiag.reciprocal()
Ainv = A.duplicate() Ainv.setDiagonal(Adiag)
tmp = Ainv.matMult(B) tmp = C.matMult(tmp)
S = D.copy()
S.axpy(-1, tmp)
from firedrake.petsc import PETSc
vwr = PETSc.Viewer()
vwr.setType(vwr.Type.BINARY) vwr.setFileName("filename.dat") vwr.setFileMode(vwr.Mode.WRITE) S.view(vwr)
Lawrence _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake