Closed loeiten closed 7 years ago
Can you try the next-petsc-laplace-fixes
I've just pushed? It compiles for me, but I don't have a suitable test case.
Both building and running the tests works without any problems on the mentioned branch :)
Do you have a nice test case for petsc-laplace, by any chance?
...but not written by me. I tried to do a MES test of it a while back, but had problems with the solver throwing KSPConvergedReason -4 - "Laplacian inversion took too many iterations."
. The test can probably be simplified and fixed for special cases of the mesh though. However, to just check that the petsc-laplace
works, one can try
examples/blob2d/
- just change boussinesq = false
in BOUT.inp
The test could also be working for examples/blob2d-laplacexz
if one would like to try PETSc
with external libraries for the preconditioner. With the current configuration, this throws
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: No support for this operation for this object type!
[0]PETSC ERROR: Matrix format mpiaij does not have a built-in PETSc LU!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.4.5, Jun, 29, 2014
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: ./blob2d on a arch-linux2-cxx-debug named radegast by mmag Thu Nov 3 16:25:52 2016
[0]PETSC ERROR: Libraries linked from /home/mmag/petsc-3.4.5/arch-linux2-cxx-debug/lib
[0]PETSC ERROR: Configure run at Mon Aug 15 22:31:11 2016
[0]PETSC ERROR: Configure options --with-clanguage=cxx --with-mpi=1 --with-precision=double --with-scalar-type=real --with-shared-libraries=0 --download-fblaslapack=1 --download-f2cblaslapack=1
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: MatGetFactor() line 3966 in src/mat/interface/matrix.c
[0]PETSC ERROR: PCSetUp_LU() line 125 in src/ksp/pc/impls/factor/lu/lu.c
[0]PETSC ERROR: PCSetUp() line 890 in src/ksp/pc/interface/precon.c
[0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: KSPSolve() line 399 in src/ksp/ksp/interface/itfunc.c
Error encountered
====== Exception thrown ======
LaplaceXZ failed to converge. Reason 0
====== Back trace ======
-> LaplaceXZpetsc::solve on line 572 of 'laplacexz-petsc.cxx'
====== Exception path ======
[bt] #1 ./blob2d() [0x46127f]
BoutException::BoutException(char const*, ...) at ??:?
[bt] #2 ./blob2d() [0x489daa]
LaplaceXZpetsc::solve(Field3D const&, Field3D const&) at ??:?
[bt] #3 ./blob2d() [0x409dd6]
physics_run(double) at ??:?
[bt] #4 ./blob2d() [0x45e0f2]
Solver::run_rhs(double) at ??:?
[bt] #5 ./blob2d() [0x45ea86]
Solver::solve(int, double) at ??:?
[bt] #6 ./blob2d() [0x46c938]
bout_run(Solver*, int (*)(double)) at ??:?
[bt] #7 ./blob2d() [0x40b5b5]
main at ??:?
[bt] #8 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f165c1d2830]
?? ??:0
[bt] #9 ./blob2d() [0x409a09]
_start at ??:?
or
[0]PETSC ERROR: Matrix format mpiaij does not have a solver package superlu_dist for LU. Perhaps you must ./configure with --download-superlu_dist!
if bousinesq = false
in BOUT.inp
.
The same goes for examples/test-laplacexz
This is (hopefully) fixed in #370.
Fixed in release candidate. Still needs a good test in examples though
I'm trying building the
next
branch withPETSc
, but it seems to be not working.The summary of
reads
but
returns
However, this works on the
master
branch