On Mar 20, 2014, at 8:04 AM, Raeth . Peter <[email protected]> wrote:
>
> Am trying to build the code in a PETsc tutorial:
>
> http://www.mcs.anl.gov/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex7.c.html
The examples in this directory, denoted by petsc-dev, work with the
development version of PETSc. Sometimes they will be different than the
examples in the release of PETSc
http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex7.c.html
denoted by petsc-currant.
They shouldn’t be mixed together. So either use the PETSc release and the
examples in it or the development version of PETSc and the examples in it.
Barry
>
>
> Got past the compile error regarding KSPSetOperators by adding the fourth
> parameter:
>
> ierr = KSPSetOperators(ksp,A,A,SAME_PRECONDITIONER);CHKERRQ(ierr);
>
>
> Added the include file the man page said was needed:
>
> #include <petscsys.h>
>
>
> Using the following build command:
>
> gcc gmres_ex7.c -o gmres_ex7 -I $PET_HOME/pkgs/valgrind-3.6.1/include -I
> $PET_HOME/.unsupported/petsc-3.4.4/Installed/include -I
> $PET_HOME/.unsupported/mpich-3.0.3/Installed/include -L
> $PET_HOME/.unsupported/petsc-3.4.4/Installed/lib -l petsc
>
>
> Getting the following link error:
>
> undefined reference to `PetscMalloc1'
>
>
> Many thanks for any insights the group has to offer.
>
>
> Best,
>
> Peter.
>
>
> ________________________________
> This electronic message transmission and any attachments that accompany it
> contain information from DRC® (Dynamics Research Corporation) or its
> subsidiaries, or the intended recipient, which is privileged, proprietary,
> business confidential, or otherwise protected from disclosure and is the
> exclusive property of DRC and/or the intended recipient. The information in
> this email is solely intended for the use of the individual or entity that is
> the intended recipient. If you are not the intended recipient, any use,
> dissemination, distribution, retention, or copying of this communication,
> attachments, or substance is prohibited. If you have received this electronic
> transmission in error, please immediately reply to the author via email that
> you received the message by mistake and also promptly and permanently delete
> this message and all copies of this email and any attachments. We thank you
> for your assistance and apologize for any inconvenience.