On Wed, Aug 9, 2023 at 11:09 AM Ilya Fursov <ilya.foursov....@gmail.com> wrote:
> Hello, > > I have a problem running src/snes/tutorials/ex17.c in parallel, > given the specific runtime options (these options are actually taken from > the test example ex17_3d_q3_trig_elas). > > *The serial version works fine:* > ./ex17 -dm_plex_box_faces 1,1,1 -sol_type elas_trig -dm_plex_dim 3 > -dm_plex_simplex 0 -displacement_petscspace_degree 3 -dm_refine 0 > -convest_num_refine 1 -snes_convergence_estimate -snes_monitor > > *The parallel version fails:* > mpirun -n 2 ./ex17 -dm_plex_box_faces 1,1,1 -sol_type elas_trig > -dm_plex_dim 3 -dm_plex_simplex 0 -displacement_petscspace_degree 3 > -dm_refine 0 -convest_num_refine 1 -snes_convergence_estimate -snes_monitor > *with the error message (--with-debugging=1):* > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: Argument out of range > [0]PETSC ERROR: Cell 0 has not been assigned a cell type > Yes, I need to put some more checks for corner cases. You have a 1 element mesh on 2 processes, so there is no cell 0, but I am expecting at least one cell during setup. Give -dm_refine 1 or -dm_plex_box_faces 2,2,2 or something like that. Thanks, Matt > [0]PETSC ERROR: WARNING! There are option(s) set that were not used! Could > be the program crashed before they were used or a spelling mistake, etc! > [0]PETSC ERROR: Option left: name:-convest_num_refine value: 1 source: > command line > [0]PETSC ERROR: Option left: name:-displacement_petscspace_degree value: > 3 source: command line > [0]PETSC ERROR: Option left: name:-snes_convergence_estimate (no value) > source: command line > [0]PETSC ERROR: Option left: name:-snes_monitor (no value) source: > command line > [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.19.4, unknown > [0]PETSC ERROR: ./ex17 on a DEBUG named ilya-HP-Notebook by ilya Wed Aug > 9 19:23:02 2023 > [0]PETSC ERROR: Configure options PETSC_ARCH=DEBUG > PETSC_DIR=/home/ilya/build/petsc-09aug-debug/petsc > --with-blaslapack-dir=/home/ilya/progs/OpenBLAS-0.3.21 > --with-mpi-dir=/home/ilya/progs/openmpi-4.1.4 --with-debugging=1 > --download-hdf5 --download-hypre --download-chaco --download-metis > --download-parmetis --download-suitesparse --download-moab --download-mumps > --download-scalapack --download-superlu --download-superlu_dist > --download-triangle --download-ml --download-giflib --download-libjpeg > --download-libpng --download-zlib --download-spai --download-tchem > --download-party --download-cmake --download-hwloc --download-ptscotch > --download-revolve --download-cams --download-spai > [0]PETSC ERROR: #1 DMPlexGetCellType() at > /home/ilya/build/petsc-09aug-debug/petsc/src/dm/impls/plex/plex.c:5169 > [0]PETSC ERROR: #2 SetupFE() at ex17.c:621 > [0]PETSC ERROR: #3 main() at ex17.c:654 > [0]PETSC ERROR: PETSc Option Table entries: > [0]PETSC ERROR: -convest_num_refine 1 (source: command line) > [0]PETSC ERROR: -displacement_petscspace_degree 3 (source: command line) > [0]PETSC ERROR: -dm_plex_box_faces 1,1,1 (source: command line) > [0]PETSC ERROR: -dm_plex_dim 3 (source: command line) > [0]PETSC ERROR: -dm_plex_simplex 0 (source: command line) > [0]PETSC ERROR: -dm_refine 0 (source: command line) > [0]PETSC ERROR: -snes_convergence_estimate (source: command line) > [0]PETSC ERROR: -snes_monitor (source: command line) > [0]PETSC ERROR: -sol_type elas_trig (source: command line) > [0]PETSC ERROR: ----------------End of Error Message -------send entire > error message to petsc-ma...@mcs.anl.gov---------- > > *And when --with-debugging=0, it fails with segmentation violation:* > [0]PETSC ERROR: > ------------------------------------------------------------------------ > [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, > probably memory access out of range > [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger > [0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and > https://petsc.org/release/faq/ > [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and > run > [0]PETSC ERROR: to get more information on the crash. > [0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is > causing the crash. > > Regards, > Ilya > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>