TimeLoopAdaptive + PostOperation Convergence Criterion + MPI --> PetSC Error
Hi @geuzaine,
It seems that the combination of TimeLoopAdaptive
and PostOperation
-based convergence criterion does not work with MPI.
I've attached a simple .pro
and .geo
below to reproduce the behavior. When calling mpirun -n 2 getdp mpi_test_adaptive_postpro.pro -solve resolution -pos postop
, I get the following error message:
Error Message
Warning : [rank 0] PETSc error: Object is in wrong state Warning : [rank 1] PETSc error: Object is in wrong state [0]PETSC ERROR: #1 VecAXPY() at /petsc-3.19.4/src/vec/vec/interface/rvector.c:595 [0]PETSC ERROR: #2 _try() at /cerngetdp/src/kernel/LinAlg_PETSC.cpp:58 #1 VecAXPY() at /petsc-3.19.4/src/vec/vec/interface/rvector.c:595 [1]PETSC ERROR: #2 _try() at /cerngetdp/src/kernel/LinAlg_PETSC.cpp:58 Warning : [rank 0] Time step 1 Try 17 Time = 2.3283064e-12 s rejected: Warning : [rank 0] No valid solution found (PETSc-Error: 73)! Info : Time step 1 Try 18 Time = 1e-12 s Stepsize = 1e-12 s Integr. Order = 1 Warning : [rank 1] Time step 1 Try 17 Time = 2.3283064e-12 s rejected: Warning : [rank 1] No valid solution found (PETSc-Error: 73)! [0]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [0]PETSC ERROR: Object is in wrong state [0]PETSC ERROR: Not for unassembled vector, did you call VecAssemblyBegin()/VecAssemblyEnd()? [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.19.4, Jul 31, 2023 [0]PETSC ERROR: init_from_res_mpi_test.pro on a real_mumps_mpi named 1c96e047515d by Unknown Fri Dec 29 19:51:45 2023 [0]PETSC ERROR: [1]PETSC ERROR: --------------------- Error Message -------------------------------------------------------------- [1]PETSC ERROR: Object is in wrong state [1]PETSC ERROR: Not for unassembled vector, did you call VecAssemblyBegin()/VecAssemblyEnd()? [1]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. [1]PETSC ERROR: Petsc Release Version 3.19.4, Jul 31, 2023 [1]PETSC ERROR: init_from_res_mpi_test.pro on a real_mumps_mpi named 1c96e047515d by Unknown Fri Dec 29 19:51:45 2023 [1]PETSC ERROR: Configure options --with-blaslapack-lib=/usr/lib64/libopenblasp.so --with-clanguage=cxx --with-debugging=0 --download-mumps=1 --download-metis=1 --download-parmetis=1 --download-scalapack=1 --download-blacs=1 --with-shared-libraries=0 --with-x=0 --with-scalar-type=real --download-suitesparse Configure options --with-blaslapack-lib=/usr/lib64/libopenblasp.so --with-clanguage=cxx --with-debugging=0 --download-mumps=1 --download-metis=1 --download-parmetis=1 --download-scalapack=1 --download-blacs=1 --with-shared-libraries=0 --with-x=0 --with-scalar-type=real --download-suitesparse [0]PETSC ERROR: #1 VecAXPY() at /petsc-3.19.4/src/vec/vec/interface/rvector.c:595 [0]PETSC ERROR: #2 _try() at /cerngetdp/src/kernel/LinAlg_PETSC.cpp:58 [1]PETSC ERROR: #1 VecAXPY() at /petsc-3.19.4/src/vec/vec/interface/rvector.c:595 [1]PETSC ERROR: #2 _try() at /cerngetdp/src/kernel/LinAlg_PETSC.cpp:58
Removing the PostOperation
inside the TimeLoopAdaptive
gets rid of the error message. Furthermore, running the .pro
without MPI
works fine.
Thank you very much for your help!
Erik