← Back to team overview

dolfin team mailing list archive

Re: Compiling with ParMETIS

 

On Mon, September 22, 2008 08:37, Johannes Ring wrote:
> On Fri, September 19, 2008 22:18, Johan Hake wrote:
>> On Friday 19 September 2008 16:28:21 Johannes Ring wrote:
>>> On Fri, September 19, 2008 10:44, Johannes Ring wrote:
>>> > On Fri, September 19, 2008 10:28, Garth N. Wells wrote:
>>> >> Johannes Ring wrote:
>>> >>> On Fri, September 19, 2008 10:19, Niclas Jansson wrote:
>>> >>>> Johannes Ring wrote:
>>> >>>>> On Thu, September 18, 2008 19:43, Anders Logg wrote:
>>> >>>>>> On Thu, Sep 18, 2008 at 06:52:30PM +0200, Johannes Ring wrote:
>>> >>>>>>> On Thu, September 18, 2008 18:35, Anders Logg wrote:
>>> >>>>>>>> We need to add a test/pkgconfig-generator for ParMETIS.
>>> >>>>>>>>
>>> >>>>>>>> I can build the test program in sandbox/passembly but I need
>>> to
>>> >>>>>>>> add
>>> >>>>>>>>
>>> >>>>>>>>   customCxxFlags=-DHAS_PARMETIS=1
>>> >>>>>>>>
>>> >>>>>>>> to scons when building DOLFIN and then manually add
>>> >>>>>>>>
>>> >>>>>>>>   -lparmetis -lmetis
>>> >>>>>>>>
>>> >>>>>>>> when linking the demo.
>>> >>>>>>>>
>>> >>>>>>>> Can someone who knows the build system better add this?
>>> >>>>>>>
>>> >>>>>>> I can do that.
>>> >>>>>>
>>> >>>>>> Thanks.
>>> >>>>>>
>>> >>>>>>> Do you use the libparmetis-dev package that comes with
>>> >>>>>>> Ubuntu or do you build ParMETIS yourself?
>>> >>>>>>
>>> >>>>>> I use the Ubuntu package.
>>> >>>>>
>>> >>>>> I have the pkg-config generator for ParMETIS ready but building
>>> >>>>> DOLFIN
>>> >>>>> fails with the following error message:
>>> >>>>>
>>> >>>>> mpic++ -o dolfin/mesh/MeshPartition.os -c -Wall -pipe -ansi
>>> -DDEBUG
>>> >>>>> -g
>>> >>>>> -Werror -DNDEBUG -O2 -DHAS_MPI=1 -DMPICH_IGNORE_CXX_SEEK
>>> >>>>> -DPACKAGE_VERSION=\"0.8.0\" -DHAS_PETSC=1 -DHAS_SLEPC=1
>>> >>>>> -DHAS_SCOTCH=1
>>> >>>>> -DHAS_UMFPACK=1 -DHAS_GTS=1 -DHAS_TRILINOS=1 -DHAS_CHOLMOD=1
>>> >>>>> -DHAS_MTL4=1
>>> >>>>> -DHAS_PARMETIS=1 -fPIC -I. -I/usr/local/include
>>> >>>>> -I/usr/include/libxml2
>>> >>>>> -I/usr/lib/petsc/bmake/linux-gnu-c-opt -I/usr/lib/petsc/include
>>> >>>>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -Idolfin
>>> >>>>> -I/home/johannr/src/slepc-2.3.3
>>> >>>>> -I/home/johannr/src/slepc-2.3.3/include
>>> >>>>> -I/usr/lib/petsc/bmake/linux-gnu-c-opt -I/usr/lib/petsc/include
>>> >>>>> -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -Idolfin
>>> >>>>> -I/home/johannr/src/scotch_5.0/bin -I/usr/include/suitesparse
>>> >>>>> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
>>> >>>>> -I/home/johannr/src/trilinos-8.0.3/local/include
>>> >>>>> -I/usr/include/suitesparse -I/home/johannr/src/svn/mtl4
>>> >>>>> dolfin/mesh/MeshPartition.cpp
>>> >>>>> dolfin/mesh/MeshPartition.cpp: In static member function ?static
>>> void
>>> >>>>> dolfin::MeshPartition::partitionGeom(dolfin::Mesh&,
>>> >>>>> dolfin::MeshFunction<unsigned int>&)?:
>>> >>>>> dolfin/mesh/MeshPartition.cpp:102: error: ?idxtype? was not
>>> declared
>>> >>>>> in
>>> >>>>> this scope
>>> >>>>> dolfin/mesh/MeshPartition.cpp:102: error: ?vtxdist? was not
>>> declared
>>> >>>>> in
>>> >>>>> this scope
>>> >>>>> dolfin/mesh/MeshPartition.cpp:102: error: expected type-specifier
>>> >>>>> before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:102: error: expected `;' before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:103: error: expected type-specifier
>>> >>>>> before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:103: error: expected `>' before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:103: error: expected `(' before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:103: error: expected `)' before ?;?
>>> >>>>> token
>>> >>>>> dolfin/mesh/MeshPartition.cpp:117: error: expected `;' before
>>> ?gdim?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:118: error: ?part? was not declared
>>> in
>>> >>>>> this
>>> >>>>> scope
>>> >>>>> dolfin/mesh/MeshPartition.cpp:118: error: expected type-specifier
>>> >>>>> before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:118: error: expected `;' before
>>> >>>>> ?idxtype?
>>> >>>>> dolfin/mesh/MeshPartition.cpp:119: error: ?gdim? was not declared
>>> in
>>> >>>>> this
>>> >>>>> scope
>>> >>>>> dolfin/mesh/MeshPartition.cpp:134: error: ?ParMETIS_V3_PartGeom?
>>> was
>>> >>>>> not
>>> >>>>> declared in this scope
>>> >>>>> dolfin/mesh/MeshPartition.cpp:143: error: type ?<type error>?
>>> >>>>> argument
>>> >>>>> given to ?delete?, expected pointer
>>> >>>>> dolfin/mesh/MeshPartition.cpp:144: error: type ?<type error>?
>>> >>>>> argument
>>> >>>>> given to ?delete?, expected pointer
>>> >>>>> scons: *** [dolfin/mesh/MeshPartition.os] Error 1
>>> >>>>> scons: building terminated because of errors.
>>> >>>>>
>>> >>>>> Any ideas?
>>> >>>>>
>>> >>>>> Johannes
>>> >>>>
>>> >>>> Seams like it doesn't find parmetis.h
>>> >>>
>>> >>> Yes, it seems so, but parmetis.h is located under /usr/include so
>>> it
>>> >>> can't
>>> >>> be missed. And it doesn't fail on this part of MeshPartition.cpp:
>>> >>>
>>> >>> #ifdef HAS_PARMETIS
>>> >>> #include <parmetis.h>
>>> >>> #endif
>>> >>
>>> >> Should it be
>>> >>
>>> >>    extern "C"
>>> >>    {
>>> >>    #ifdef HAS_PARMETIS
>>> >>    #include <parmetis.h>
>>> >>    #endif
>>> >>    }
>>> >> ?
>>> >
>>> > I tried it but it gave me the same error message.
>>>
>>> It seems to be a problem with SCOTCH. DOLFIN builds fine when I disable
>>> SCOTCH.
>>
>> I have scotch 5.1 and it works fine here.
>
> I had SCOTCH 5.0 but upgrading to 5.1 still gives me the error.

Sorry, upgrading to 5.1 seems fix the problem after all. I just forgot to
remove some old pkg-config files. Now DOLFIN builds without any problems.

Johannes



References