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

Marco Zocca zocca.marco at gmail.com
Sat May 16 03:25:08 CDT 2015


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 .

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



More information about the petsc-dev mailing list