[petsc-users] How to create a quadrature object?

Andrew Ho andrewh0 at uw.edu
Fri Jul 29 11:54:02 CDT 2016


Thanks, this fix works.

On Thu, Jul 28, 2016 at 8:58 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Thu, Jul 28, 2016 at 7:08 PM, Andrew Ho <andrewh0 at uw.edu> wrote:
>
>>
>> On Thu, Jul 28, 2016 at 4:35 PM, Matthew Knepley <knepley at gmail.com>
>> wrote:
>>
>>>
>>> This is strange. First, you should only have uninitialized classids if
>>> you build without dynamics libraries. Did you? If you
>>> include the entire error output, it would show us.
>>>
>>>
>> This is pretty much the entire error output; I trimmed off the ending
>> "MPI Abort called" message (it's the standard message printed by OpenMPI
>> when MPIAbort is called). The code snippet I had is a complete working
>> example which is able to give me this error.
>>
>>
>>> If so, then PetscInitialize should set the value of this classid, unless
>>> you built this with PETSC_HAVE_DYNAMIC_LIBRARIES,
>>> but linked against static libraries, as the error message says. Do you
>>> have multiple versions of PETSc on your machine?
>>>
>>
>> I have a single install of PETSc at any one time. I've tried builds with
>> --with-shared-libraries on and off with the same results (I made sure to
>> purge any previous install first). Here's a diff if you want to test the
>> same configs I tried running.
>>
>
> Crap. We changed the way initialization works, but this was left behind.
> You can make this change
>
> diff --git a/src/dm/dt/interface/dt.c b/src/dm/dt/interface/dt.c
> index 5d12959..d6f3454 100644
> --- a/src/dm/dt/interface/dt.c
> +++ b/src/dm/dt/interface/dt.c
> @@ -50,7 +50,7 @@ PetscErrorCode PetscQuadratureCreate(MPI_Comm comm,
> PetscQuadrature *q)
>
>    PetscFunctionBegin;
>    PetscValidPointer(q, 2);
> -  ierr = DMInitializePackage();CHKERRQ(ierr);
> +  ierr = PetscSysInitializePackage();CHKERRQ(ierr);
>    ierr =
> PetscHeaderCreate(*q,PETSC_OBJECT_CLASSID,"PetscQuadrature","Quadrature","DT",comm,PetscQuadratureDestroy,PetscQuadratureView);CHKERRQ(ierr);
>    (*q)->dim       = -1;
>    (*q)->order     = -1;
>
> and then rebuild
>
>   cd $PETSC_DIR
>   make -f ./gmakefile
>
> and try running your example again.
>
> I will get this change in.
>
>   Thanks,
>
>      Matt
>
>
>> Just run *make ex4* in the src/dm/dt/examples/tests folder
>>
>> Configure command:
>>
>> ./configure --with-debugging=0 COPTFLAGS="-O3 -march=native"
>> CXXOPTFLAGS="-O3 -march=native" FOPTFLAGS="-O3 -march=native"
>>
>> --
>> Andrew Ho
>>
>
>
>
> --
> 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
>



-- 
Andrew Ho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160729/7cb7a9e6/attachment.html>


More information about the petsc-users mailing list