[petsc-dev] errors for /petsc/src/ts/examples/tutorials/ex29.c

Barry Smith bsmith at mcs.anl.gov
Thu Sep 15 23:24:59 CDT 2016


> On Sep 15, 2016, at 11:14 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Lulu Liu <lulu.liu at kaust.edu.sa> writes:
> 
>> Hi,
>> 
>> How to fix this errors? Thanks!
>> 
>> mpirun -n 4 ./ex29 -da_refine 4 -ts_max_steps 10 -ts_rtol 1e-3 -ts_atol
>> 1e-3 -ts_type arkimex -ts_monitor -snes_monitor -snes_type aspin
>> -da_processors_x 2 -da_processors_y 2 -snes_type aspin -ts_max_steps 3
> 
> I think it is incorrect for DMDAGetReducedDMDA to call DMDACreate2d.  It
> should instead call the lower level functions and *not* call
> DMSetFromOptions.

  A perhaps better fix is to finally remove this from the DMDCreateNd() calls 

  /* This violates the behavior for other classes, but right now users expect negative dimensions to be handled this way */
  ierr = DMSetFromOptions(*da);CHKERRQ(ierr);
  ierr = DMSetUp(*da);CHKERRQ(ierr);

  Perhaps we could remove both of these lines from those calls and require every use of DMDCreateNd() to add the 
DMSetUp() call. Then the user is free to insert a DMSetFromOptions() in between or not. We remove the negative value business which is hokey anyway?

  So in the use of DMDAGetReducedDMDA() it could call DMDACreate2d() then the DMSetUp() but skip the DMSetFromOptions() line.

   Barry



> 
>> 0 TS dt 0.05 time 0.
>> [0]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [0]PETSC ERROR: Argument out of range
>> [0]PETSC ERROR: Too many processors in X direction: 2 1
>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [1]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [1]PETSC ERROR: Argument out of range
>> [1]PETSC ERROR: Too many processors in X direction: 2 1
>> [1]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [1]PETSC ERROR: Petsc Release Version 3.7.3, unknown
>> [1]PETSC ERROR: ./ex29 on a arch-darwin-c-debug named
>> 77-59-39-26.dclient.hispeed.ch by lulu Tue Sep 13 22:04:51 2016
>> [1]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
>> --with-fc=gfortran --download-fblaslapack --download-mpich --download-cmake
>> --download-superlu_dist --download-mumps --download-hypre
>> --download-scalapack --download-metis --download-parmetis
>> --download-superlu --download-triangle --download-exodusii
>> --download-netcdf --download-hdf5
>> [1]PETSC ERROR: [2]PETSC ERROR: --------------------- Error Message
>> --------------------------------------------------------------
>> [2]PETSC ERROR: Argument out of range
>> [2]PETSC ERROR: Too many processors in X direction: 2 1
>> [2]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
>> trouble shooting.
>> [2]PETSC ERROR: Petsc Release Version 3.7.3, unknown
>> [2]PETSC ERROR: ./ex29 on a arch-darwin-c-debug named
>> 77-59-39-26.dclient.hispeed.ch by lulu Tue Sep 13 22:04:51 2016
>> [2]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
>> --with-fc=gfortran --download-fblaslapack --download-mpich --download-cmake
>> --download-superlu_dist --download-mumps --download-hypre
>> --download-scalapack --download-metis --download-parmetis
>> --download-superlu --download-triangle --download-exodusii
>> --download-netcdf --download-hdf5
>> [2]PETSC ERROR: #1 DMSetUp_DA_2D() line 268 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/da2.c
>> [0]PETSC ERROR: Petsc Release Version 3.7.3, unknown
>> [0]PETSC ERROR: ./ex29 on a arch-darwin-c-debug named
>> 77-59-39-26.dclient.hispeed.ch by lulu Tue Sep 13 22:04:51 2016
>> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
>> --with-fc=gfortran --download-fblaslapack --download-mpich --download-cmake
>> --download-superlu_dist --download-mumps --download-hypre
>> --download-scalapack --download-metis --download-parmetis
>> --download-superlu --download-triangle --download-exodusii
>> --download-netcdf --download-hdf5
>> [0]PETSC ERROR: #1 DMSetUp_DA_2D() line 268 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/da2.c
>> [1]PETSC ERROR: #2 DMSetUp_DA() line 25 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/dareg.c
>> [1]PETSC ERROR: #3 DMSetUp() line 744 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> [1]PETSC ERROR: #4 DMDACreate2d() line 866 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/da2.c
>> [1]PETSC ERROR: #5 DMDAGetReducedDMDA() line 398 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/dacorn.c
>> [1]PETSC ERROR: #6 DMCreateCoordinateDM_DA() line 14 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/dacorn.c
>> [1]PETSC ERROR: #7 DMGetCoordinateDM() line 4293 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> [1]PETSC ERROR: #8 DMSubDomainHook_Coordinates() line 3989 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> [1]PETSC ERROR: [2]PETSC ERROR: #2 DMSetUp_DA() line 25 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/dareg.c
>> [2]PETSC ERROR: #3 DMSetUp() line 744 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> [2]PETSC ERROR: #4 DMDACreate2d() line 866 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/da2.c
>> [2]PETSC ERROR: #5 DMDAGetReducedDMDA() line 398 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/dacorn.c
>> [2]PETSC ERROR: #6 DMCreateCoordinateDM_DA() line 14 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/impls/da/dacorn.c
>> [2]PETSC ERROR: #7 DMGetCoordinateDM() line 4293 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> [2]PETSC ERROR: #8 DMSubDomainHook_Coordinates() line 3989 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> [2]PETSC ERROR: #9 DMCreateDomainDecomposition() line 1592 in
>> /Users/lulu/petsc/petsc-3.7.3/petsc/src/dm/interface/dm.c
>> 
>> -- 
>> 
>> ------------------------------
>> This message and its contents, including attachments are intended solely 
>> for the original recipient. If you are not the intended recipient or have 
>> received this message in error, please notify me immediately and delete 
>> this message from your computer system. Any unauthorized use or 
>> distribution is prohibited. Please consider the environment before printing 
>> this email.




More information about the petsc-dev mailing list