[petsc-users] PetscQuadratureCreate and PETSC_OBJECT_CLASSID

Dave May dave.mayhem23 at gmail.com
Tue Nov 18 16:09:04 CST 2014


Okay - maybe you meant PetscSysInitializePackage() needs to get first?

In this simple test I was running, I essentially called

PetscInitialize
PetscDTGaussTensorQuadrature
PetscFinalize

and thus no one call PetscSysInitializePackage() before
PetscDTGaussTensorQuadrature().

Thanks - my test works now.

Cheers,
  Dave



On 18 November 2014 22:51, Dave May <dave.mayhem23 at gmail.com> wrote:

> Okay, thanks Matt. It now makes sense why it failed, but I don't
> understand your logic.
> The PetscQuadrature class is so small and doesn't depend on DM (at least
> not in the definition of the structure described PetscQuadrature). Hence,
> why should DMInitializePackage() have to be called at all?
> I realize you how are you using PetscDT, but it should be available for
> everyone - even if they don't ever create a DM.
>
>
> Cheers,
>   Dave
>
> On 18 November 2014 22:46, Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Tue, Nov 18, 2014 at 1:49 PM, Dave May <dave.mayhem23 at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I was trying to use some of DT functionality (in particular
>>> PetscDTGaussTensorQuadrature()) in petsc 3.5.2 and I encountered this error:
>>>
>>
>> I did not anticipate someone calling that before anything by itself. You
>> need a call to
>>
>>   DMInitializePackage()
>>
>> This is called by PetscQuadratureCreate().
>>
>>    Matt
>>
>>
>>>
>>> [0]PETSC ERROR: --------------------- Error Message
>>> --------------------------------------------------------------
>>> [0]PETSC ERROR: Invalid argument
>>> [0]PETSC ERROR: Invalid object classid 0
>>> This could happen if you compile with PETSC_HAVE_DYNAMIC_LIBRARIES, but
>>> link with static libraries.
>>> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
>>> for trouble shooting.
>>> [0]PETSC ERROR: Petsc Release Version 3.5.2, Sep, 08, 2014
>>> [0]PETSC ERROR: ./dmdadg.app on a arch-darwin-c-mpi-debug-f2c named
>>> nikkan.local by dmay Tue Nov 18 20:34:56 2014
>>> [0]PETSC ERROR: Configure options --download-openmpi=yes
>>> --with-debugging=yes --with-fc=0 --download-f2cblaslapck=yes
>>> PETSC_ARCH=arch-darwin-c-mpi-debug-f2c
>>> [0]PETSC ERROR: #1 PetscClassRegLogGetClass() line 290 in
>>> /Users/dmay/software/petsc-3.5.2/src/sys/logging/utils/classlog.c
>>> [0]PETSC ERROR: #2 PetscLogObjCreateDefault() line 317 in
>>> /Users/dmay/software/petsc-3.5.2/src/sys/logging/utils/classlog.c
>>> [0]PETSC ERROR: #3 PetscQuadratureCreate() line 35 in
>>> /Users/dmay/software/petsc-3.5.2/src/dm/dt/interface/dt.c
>>> [0]PETSC ERROR: #4 PetscDTGaussTensorQuadrature() line 322 in
>>> /Users/dmay/software/petsc-3.5.2/src/dm/dt/interface/dt.c
>>> [0]PETSC ERROR: #5 DMDGSpace_ex4_quadrature() line 480 in dmdadg.c
>>> [0]PETSC ERROR: #6 main() line 503 in dmdadg.c
>>> [0]PETSC ERROR: ----------------End of Error Message -------send entire
>>> error message to petsc-maint at mcs.anl.gov----------
>>>
>>> --------------------------------------------------------------------------
>>> MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
>>> with errorcode 1.
>>>
>>> NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
>>> You may or may not see output from other processes, depending on
>>> exactly when Open MPI kills them.
>>>
>>> --------------------------------------------------------------------------
>>>
>>> Snooping around in the source tree, the only place where I can find
>>> PetscHeaderCreate being passed PETSC_OBJECT_CLASSID is within
>>> src/dm/dt/interface/dt.c in the function PetscQuadratureCreate().
>>>
>>> Is this is a bug or is my petsc build broken??
>>>
>>> I'm sure I am linking against a dynamic library (or whatever you want to
>>> call a dylib on OSX)
>>>
>>> dmay at nikkan:~/codes/dgspace$ otool -L dmdadg.app
>>> dmdadg.app:
>>> *
>>> /Users/dmay/software/petsc-3.5.2/arch-darwin-c-mpi-debug-f2c/lib/libpetsc.3.5.dylib
>>> (compatibility version 3.5.0, current version 3.5.2)*
>>>
>>> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
>>> (compatibility version 1.0.0, current version 1.0.0)
>>>
>>> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>> (compatibility version 1.0.0, current version 1.0.0)
>>>     /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current
>>> version 10.0.0)
>>>     /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
>>> version 1197.1.1)
>>>     /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current
>>> version 50.0.0)
>>>     /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current
>>> version 50.0.0)
>>>
>>> /Users/dmay/software/petsc-3.5.2/arch-darwin-c-mpi-debug-f2c/lib/libmpi_cxx.1.dylib
>>> (compatibility version 3.0.0, current version 3.3.0)
>>>     /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
>>> version 120.0.0)
>>>
>>> /Users/dmay/software/petsc-3.5.2/arch-darwin-c-mpi-debug-f2c/lib/libmpi.1.dylib
>>> (compatibility version 7.0.0, current version 7.0.0)
>>>
>>>
>>>
>>> Cheers,
>>>   Dave
>>>
>>
>>
>>
>> --
>> 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/20141118/25624120/attachment.html>


More information about the petsc-users mailing list