[petsc-users] Error with SNESVISetVariableBounds

Khai Hong Pham khaipham at utexas.edu
Wed Jul 30 10:41:19 CDT 2014


Dear Matt,

I tried to find the source of the error from ex53.
If I add *"CHKERRQ(ierr);"* after line 926 in the file
 src/ksp/ksp/interface/iterativ.c :
"*ierr = DMGetGlobalVector(ksp->dm,&vecr);  /* don't check for errors -- if
any errors, pass down to next block */ *".
The error message becomes:

----------------------------------------

 ./ex53
Vec Object: 1 MPI processes
  type: seq
1
1
1
1
1
-1
-1
0
-1
-1
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR:
[0]PETSC ERROR: Must call DMShellSetGlobalVector() or
DMShellSetCreateGlobalVector()
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.5.1, Jul, 24, 2014
[0]PETSC ERROR: ./ex53 on a arch-linux2-c-debug named khp by khp Wed Jul 30
10:24:05 2014
[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
--with-fc=gfortran --download-fblaslapack --download-mpich  --download-hdf5
--download-parmetis --download-metis
[0]PETSC ERROR: #1 DMCreateGlobalVector_Shell() line 245 in
/home/petsc-3.5.1/src/dm/impls/shell/dmshell.c
[0]PETSC ERROR: #2 DMCreateGlobalVector() line 681 in
/home/petsc-3.5.1/src/dm/interface/dm.c
[0]PETSC ERROR: #3 DMGetGlobalVector() line 154 in
/home/petsc-3.5.1/src/dm/interface/dmget.c
[0]PETSC ERROR: #4 KSPGetVecs() line 926 in
/home/petsc-3.5.1/src/ksp/ksp/interface/iterativ.c
[0]PETSC ERROR: #5 KSPSetUp_GMRES() line 87 in
/home/petsc-3.5.1/src/ksp/ksp/impls/gmres/gmres.c
[0]PETSC ERROR: #6 KSPSetUp() line 268 in
/home/petsc-3.5.1/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #7 SNESSolve_VINEWTONRSLS() line 507 in
/home/petsc-3.5.1/src/snes/impls/vi/rs/virs.c
[0]PETSC ERROR: #8 SNESSolve() line 3743 in
/home/petsc-3.5.1/src/snes/interface/snes.c
[0]PETSC ERROR: #9 main() line 49 in src/main.cpp
[0]PETSC ERROR: ----------------End of Error Message -------send entire
error message to petsc-maint at mcs.anl.gov----------

----------------------------

Does it say anything about the source of the error? Thanks.

Khai



On Tue, Jul 29, 2014 at 1:21 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, Jul 29, 2014 at 1:19 PM, Que Cat <quecat001 at gmail.com> wrote:
>
>> I also used the ghosted vector (VecCreateGhost). Does it have any
>> relation to the DMGetGlobalVector() ?
>>
>
> We clearly have the problem that a full stack in not being printed. I am
> open to the idea that it is a problem
> in our SNESVI, but we need a way to track it down. Could you produce a
> test example small enough to send
> us?
>
>   Thanks,
>
>      Matt
>
>
>> Que
>>
>>
>> On Tue, Jul 29, 2014 at 12:42 PM, Que Cat <quecat001 at gmail.com> wrote:
>>
>>> Yes, I don't use DM at all and no information about who is calling
>>> DMGetGlobalVector(). When I use snesnewtonls (without constraint on the
>>> solution), the code worked fine. I only changed one of code :
>>> ierr = SNESSetType(snes,SNESNEWTONTR );CHKERRQ(ierr);
>>> --- > ierr = SNESSetType(snes,SNESVINEWTONSSLS );CHKERRQ(ierr);
>>> and added :
>>> ierr = SNESVISetVariableBounds(snes, low_b, up_b);CHKERRQ(ierr);
>>>
>>> and the errors appeared.
>>>
>>> Que
>>>
>>>
>>> On Tue, Jul 29, 2014 at 12:29 PM, Jed Brown <jed at jedbrown.org> wrote:
>>>
>>>> Que Cat <quecat001 at gmail.com> writes:
>>>>
>>>> > Hi Jed,
>>>> >
>>>> > I removed only one line from the error message that indicated the
>>>> > unnecessary information like directory path, program name, processor
>>>> type.
>>>> >
>>>> > In this problem, I created the vector using VecCreateMPI, not with
>>>> DM. Does
>>>> > it cause such problem? I have the unstructured grid and can not use DM
>>>>
>>>> There should be more lines, like who is calling DMGetGlobalVector().
>>>> Maybe that is your code and you don't check errors, but why are you
>>>> calling that function if you don't use DM (so the DMShell is created
>>>> automatically)?
>>>>
>>>> >
>>>> > Que
>>>> >
>>>> >
>>>> > On Tue, Jul 29, 2014 at 12:09 PM, Jed Brown <jed at jedbrown.org> wrote:
>>>> >
>>>> >> Que Cat <quecat001 at gmail.com> writes:
>>>> >>
>>>> >> > Dear Petsc-Users,
>>>> >> >
>>>> >> > I called the SNESVISetVariableBounds
>>>> >> > <
>>>> >>
>>>> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESVISetVariableBounds.html#SNESVISetVariableBounds
>>>> >> >
>>>> >> > and
>>>> >> > received the following error:
>>>> >> >
>>>> >> > [0]PETSC ERROR: Must call DMShellSetGlobalVector() or
>>>> >> > DMShellSetCreateGlobalVector()
>>>> >> > [0]PETSC ERROR: See
>>>> http://www.mcs.anl.gov/petsc/documentation/faq.html
>>>> >> for
>>>> >> > trouble shooting.
>>>> >> > [0]PETSC ERROR: Petsc Release Version 3.5.0, Jun, 30, 2014
>>>> >> > ....
>>>> >>
>>>> >> It looks like you are truncating the error message.  Please don't
>>>> ever
>>>> >> do that.
>>>> >>
>>>> >> > [0]PETSC ERROR: Configure options --with-x=0 -with-pic
>>>> >> >
>>>> >>
>>>> --with-external-packages-dir=/opt/apps/intel13/mvapich2_1_9/petsc/3.5/externalpackages
>>>> >> > --with-mpi-compilers=1
>>>> --with-mpi-dir=/opt/apps/intel13/mvapich2/1.9
>>>> >> > --with-scalar-type=real --with-shared-libraries=1 --with-matlab
>>>> >> > --with-matlab-dir=/work/apps/matlab/2013a --with-spai=1
>>>> --download-spai
>>>> >> > --with-hypre=1 --download-hypre --with-mumps=1 --download-mumps
>>>> >> > --with-scalapack=1 --download-scalapack --with-blacs=1
>>>> --download-blacs
>>>> >> > --with-spooles=1 --download-spooles --with-superlu=1
>>>> --download-superlu
>>>> >> > --with-superlu_dist=1 --download-superlu_dist --with-parmetis=1
>>>> >> > --download-parmetis --with-metis=1 --download-metis --with-hdf5=1
>>>> >> > --with-hdf5-dir=/opt/apps/intel13/mvapich2_1_9/phdf5/1.8.9
>>>> >> > --with-debugging=no
>>>> >> >
>>>> >>
>>>> --with-blas-lapack-dir=/opt/apps/intel/13/composer_xe_2013.3.163/mkl/lib/intel64
>>>> >> > --with-mpiexec=mpirun_rsh --COPTFLAGS= --CXXOPTFLAGS= --FOPTFLAGS=
>>>> >> > [
>>>> >> > 0]PETSC ERROR: #1 DMCreateGlobalVector_Shell() line 245 in
>>>> >> >
>>>> /opt/apps/intel13/mvapich2_1_9/petsc/3.5/src/dm/impls/shell/dmshell.c
>>>> >> > [0]PETSC ERROR: #2 DMCreateGlobalVector() line 681 in
>>>> >> > /opt/apps/intel13/mvapich2_1_9/petsc/3.5/src/dm/interface/dm.c
>>>> >> > [0]PETSC ERROR: #3 DMGetGlobalVector() line 154 in
>>>> >> > /opt/apps/intel13/mvapich2_1_9/petsc/3.5/src/dm/interface/dmget.c
>>>> >> >
>>>> >> > Could anyone give me a hint to the source of the error? Thank you.
>>>> >> >
>>>> >> > Que
>>>> >>
>>>>
>>>
>>>
>>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140730/624909c0/attachment.html>


More information about the petsc-users mailing list