← Back to team overview

dolfin team mailing list archive

Re: Install Dolfin

 

I found a problem with the link to the PETSc in the dolfin.pc file.
The library link to PETSc missing the link to libmpiuni.a

I changed the link to PETSc in dolfin.pc from 

Libs: -L${libdir} -ldolfin -lncurses
-Wl,-rpath,/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug
-L/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug  -lpetscts
-lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc 

Adding -lmpiuni, i.e. 

 Libs: -L${libdir} -ldolfin -lncurses
-Wl,-rpath,/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug
-L/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug  -lpetscts
-lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec  -lmpiuni -lpetsc



IT TOOK CARE OF THE OLD ERRORS BUT NEW ONE APPEARED (see below).

What is the correct link to PETSC in dolfin.pc if PETSc compiled with
--with-mpi=0 option (i.e. no MPI)?

Thanks 
Sam




>>make 

`pkg-config --variable=compiler dolfin` -o dolfin-poisson main.o
`pkg-config --cflags dolfin` `pkg-config --libs dolfin`
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(eige.o)(.text+0x1af0): In function `KSPComputeEigenvaluesExplicitly':
/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/ksp/interface/eige.c:243:
undefined reference to `dgeev_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x2058): In function `KSPSolve_BCGSL':
/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/ksp/impls/bcgsl/bcgsl.c:17
8: undefined reference to `dpotrf_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x20b6):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:184: undefined reference to `dcopy_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x2115):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:185: undefined reference to `dpotrs_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x218e):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:191: undefined reference to `dpotrf_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x21ec):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:197: undefined reference to `dcopy_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x224b):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:198: undefined reference to `dpotrs_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x22cf):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:202: undefined reference to `dcopy_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x232e):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:203: undefined reference to `dpotrs_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o)(.text+0x23e0):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/k
sp/impls/bcgsl/bcgsl.c:208: undefined reference to `dgemv_'
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
a(bcgsl.o



-----Original Message-----
From: Matthew Knepley [mailto:knepley@xxxxxxxxx] 
Sent: Wednesday, November 29, 2006 12:26 PM
To: Naboulsi, Samir K CTR USAF ASC/HP
Cc: dolfin-dev@xxxxxxxxxx
Subject: Re: [DOLFIN-dev] Install Dolfin

It is possible that Dolfin is not linking against:

  $PETSC_DIR/lib/$PETSC_ARCH/libmpiuni.a

    Matt

On 11/29/06, Naboulsi, Samir K CTR USAF ASC/HP
<Samir.Naboulsi@xxxxxxxxxxxx> wrote:
>
> Dear All,
>
>
> As new user, I tried to compile the demo case poisson problem. IF I 
> compile the Poisson.form using ffc and do "make" I get Poisson.h:76:
> error: 'const class dolfin::Cell' has no member named 'vertexID'  
> which created by ffc. I am using ffc-0.3.3
>
> If I use the Poisson.h that came with dolfin 0.6.2-1, I get a 
> different error that has to do with PETSc running MPI
>
>
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
> a(bjacobi.o)(.text+0x12a): In function `PCSetUp_BJacobi':
> /workspace/naboulsk/FX/petsc-2.3.2-p4/src/ksp/pc/impls/bjacobi/bjacobi
> .c
> :26: undefined reference to `MPIUNI_TMP'
>
/workspace/naboulsk/FX/petsc-2.3.2-p4/lib/linux-gnu-c-debug/libpetscksp.
> a(bjacobi.o)(.text+0x197):/workspace/naboulsk/FX/petsc-2.3.2-p4/src/ks
> p/
> pc/impls/bjacobi/bjacobi.c:27: undefined reference to `MPIUNI_TMP'
>
>
> I have compiled PETSc disabling MPI (i.e. I am using single processor
> machine) and also when compiled Dolfin. i.e.
>
> >> ./config/configure.py 
> >> --prefix=/workspace/naboulsk/FX/petsc-2.3.2-p4
> --with-c++-support --with-fortran --with-mpi=0
> --with-blas-lapack-dir=/usr/lib
>
> >> ./configure.local --enable-debug
> --with-boost=/workspace/naboulsk/FX/local/include/boost-1_33_1
> --enable-petsc --with-petsc-dir=/workspace/naboulsk/FX/petsc-2.3.2-p4
> --enable-pydolfin --disable-mpi
>
>
> How can I fix these problems?
> Thanks
> Sam
>
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>


--
"Failure has a thousand explanations. Success doesn't need one" -- Sir
Alec Guiness


Follow ups

References