On Thu, Jul 28, 2016 at 4:35 PM, Matthew Knepley <knep...@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. 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
2 files changed, 18 insertions(+), 1 deletion(-) src/dm/dt/examples/tests/ex4.c | 14 ++++++++++++++ src/dm/dt/examples/tests/makefile | 5 ++++- new file src/dm/dt/examples/tests/ex4.c @@ -0,0 +1,14 @@ +static char help[] = "Tests quadrature.\n\n"; + +#include <petscdt.h> + +int main(int argc, char** argv) +{ + CHKERRQ(PetscInitialize(&argc, &argv, PETSC_NULL, help)); + PetscQuadrature quad; + CHKERRQ(PetscQuadratureCreate(PETSC_COMM_SELF, &quad)); + CHKERRQ(PetscQuadratureDestroy(&quad)); + CHKERRQ(PetscFinalize()); + return 0; +} + modified src/dm/dt/examples/tests/makefile @@ -4,7 +4,7 @@ FFLAGS = CPPFLAGS = FPPFLAGS = LOCDIR = src/dm/dt/examples/tests/ -EXAMPLESC = ex1.c ex2.c ex3.c +EXAMPLESC = ex1.c ex2.c ex3.c ex4.c EXAMPLESF = MANSEC = DM @@ -20,6 +20,9 @@ ex2: ex2.o chkopts ex3: ex3.o chkopts -${CLINKER} -o ex3 ex3.o ${PETSC_DM_LIB} ${RM} -f ex3.o +ex4: ex4.o chkopts + -${CLINKER} -o ex4 ex4.o ${PETSC_DM_LIB} + ${RM} -f ex4.o #------------------------------------------------------------------------------- runex1: