[petsc-dev] FFI trouble in instancing Vec's

Matthew Knepley knepley at gmail.com
Sat May 16 09:34:59 CDT 2015


On Sat, May 16, 2015 at 3:25 AM, Marco Zocca <zocca.marco at gmail.com> wrote:

> I have wrapped a couple of elementary Vec allocation functions which
> typecheck in the host language but are not seemingly accepted by the
> library.
> In the host language, I called "VecCreate" on communicator 1, then
> used VecSet to set it to value 1.0 .
>

You have to give a valid MPI communicator, not a random integer.

  Thanks,

     Matt


> What do errors #1 to #4 mean?
> In particular, error #4 points to this line in rvector.c :
>   PetscValidHeaderSpecific(x,VEC_CLASSID,1);
>
> Which one is parameter #1 referred to by "Null Object" ? Does "Null
> argument" in the line before refer to the same error as the Null
> Object? And, how may I fix it?
>
>
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Null argument, when expecting valid pointer
> [0]PETSC ERROR: Null Object: Parameter # 1
> [0]PETSC ERROR: Petsc Release Version 3.5.3, Jan, 31, 2015
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --with-fc=gfortran --with-shared-libraries=1 --download-mpich
> --download-fblaslapack
>
> [0]PETSC ERROR: #1 PetscCommDuplicate() line 140 in
> /Users/ocramz/petsc-3.5.3/src/sys/objects/tagm.c
> [0]PETSC ERROR: #2 PetscHeaderCreate_Private() line 59 in
> /Users/ocramz/petsc-3.5.3/src/sys/objects/inherit.c
> [0]PETSC ERROR: #3 VecCreate() line 37 in
> /Users/ocramz/petsc-3.5.3/src/vec/vec/interface/veccreate.c
> [0]PETSC ERROR: #4 VecSet() line 569 in
> /Users/ocramz/petsc-3.5.3/src/vec/vec/interface/rvector.c
>



-- 
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-dev/attachments/20150516/bd3e55ab/attachment.html>


More information about the petsc-dev mailing list