CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OF141dev undefined reference to METIS symbols on SUSE Enterprise (

matthias August 28, 2008 19:27

Hi all, I checked out the l
Hi all,

I checked out the latest OF-1.4.1-dev version from svn repository. I can compile it on our Fedora systems without any problems but if I try to compile OF on a SUSE Enterprise System I'm getting always a linker error during the build of decomposePar and redistributeMeshPar .
There is no error in the decomposition libs or METIS libs and also there is no build error during the compiler run of the binaries however linking the binaries doesn't work.

g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I../decompositionMethods/lnInclude -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/finiteVolume/lnInclude -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/finiteArea/lnInclude -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/lagrangian/basic/lnInclude -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/tetDecompositionFiniteElement /lnInclude -DFACE_DECOMP -IlnInclude -I. -I/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude -fPIC Make/linux64GccDPOpt/decomposeMesh.o Make/linux64GccDPOpt/decomposePar.o Make/linux64GccDPOpt/domainDecomposition.o Make/linux64GccDPOpt/distributeCells.o Make/linux64GccDPOpt/faMeshDecomposition.o Make/linux64GccDPOpt/fvFieldDecomposer.o Make/linux64GccDPOpt/faFieldDecomposer.o Make/linux64GccDPOpt/pointFieldDecomposer.o Make/linux64GccDPOpt/tetPointFieldDecomposer.o Make/linux64GccDPOpt/lagrangianFieldDecomposer.o -L/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linux64GccDPOpt \
-ldecompositionMethods -lfiniteVolume -lfiniteArea -llagrangian -lmeshTools -lfaceDecompFiniteElement -lfaceDecompositionMotionSolver -lOpenFOAM -liberty -ldl -lm -o /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/applications/bin/linux64GccDPOpt/de composePar
/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linux64GccDPOpt/libdecompositio undefined reference to `METIS_PartGraphKway(int*, int*, int*, int*, int*, int*, int*, int*, int*, int*, int*)'
/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linux64GccDPOpt/libdecompositio undefined reference to `METIS_WPartGraphRecursive(int*, int*, int*, int*, int*, int*, int*, int*, float*, int*, int*, int*)'
/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linux64GccDPOpt/libdecompositio undefined reference to `METIS_WPartGraphKway(int*, int*, int*, int*, int*, int*, int*, int*, float*, int*, int*, int*)'
/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linux64GccDPOpt/libdecompositio undefined reference to `METIS_PartGraphRecursive(int*, int*, int*, int*, int*, int*, int*, int*, int*, int*, int*)'
collect2: ld returned 1 exit status
make: *** [/home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/applications/bin/linux64GccDPOpt/d ecomposePar] Error 1

I used the gcc 4.1.2, gcc-4.3.1 and gcc-4.4 for compilation with the same result!
Furthermore I installed the latest binutils but also with no success. I used different flex versions and I changed the compilation, linking order of the decomposition lib (another order of the metis libs) but it didn't help!

So any suggestions are welcome!


mbeaudoin August 28, 2008 21:08

Hello Matthias, What is the
Hello Matthias,

What is the output of the 2 following commands on your system:



nm -a $FOAM_LIB/$WM_OPTIONS/ | grep METIS_


mbeaudoin August 29, 2008 08:29

Hello Matthias, The output
Hello Matthias,

The output of your commands looks normal enough.

The "undefined references" are indeed defined in, which itself is dragged along by the library So your linker should be able to finalize the compilation.

Last questions because I don't have a clue for you:

What version of SUSE Enterprise System are you using?

Are you compiling on a real PC or on a virtual machine (VMWare, etc)?

What is the output of:

which ldd
ldd --version

which g++
g++ --version


matthias August 29, 2008 10:04

Hi Martin, g++ --version:
Hi Martin,

g++ --version:
g++ (GCC) 4.3.1
Copyright (C) 2008 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.

ldd --version :
ldd (GNU libc) 2.4
Copyright © 2006 Free Software Foundation, Inc.
Dies ist freie Software; in den Quellen befinden sich die Lizenzbedingungen.
Es gibt KEINERLEI Garantie; nicht einmal für die TAUGLICHKEIT oder
Written by Roland McGrath and Ulrich Drepper.

ld --version:
GNU ld (GNU Binutils) 2.18
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

uname -a :
Linux #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

Yes I use a real PC and no virtual machine!
It is strange!


matthias August 29, 2008 10:13

@Martin Maybe this informat

Maybe this information helps, it seems that the linker doesn't include libmetis and libparmetis:

nm /home/b/mvimixer/OpenFOAM/OpenFOAM-1.4.1-dev/lib/linux64GccDPOpt/libdecompositio | grep METIS
U ParMETIS_V3_PartGeomKway
U _Z19METIS_PartGraphKwayPiS_S_S_S_S_S_S_S_S_S_
U _Z20METIS_WPartGraphKwayPiS_S_S_S_S_S_S_PfS_S_S_
U _Z24METIS_PartGraphRecursivePiS_S_S_S_S_S_S_S_S_S_
U _Z25METIS_WPartGraphRecursivePiS_S_S_S_S_S_S_PfS_S _S_


mbeaudoin August 29, 2008 10:55

@Matthias: Your setup looks

Your setup looks fine.

Your version of ld is newer than mine, but I am using openSuse 10.3, not SUSE Enterprise.

As for the undefined symbols in, this is quite normal, those symbols are defined in, and marked as required in, but undefined in that library.

The linker "ld" should find those missing symbols when dynamically loading because this library is required by

Out of curiosity, have you tried to explicitely add the library libmetis and libparmetis in the options file for decomposePar?

You said that you were able to complete the compilition on your Fedora systems; what version of ld do you have on those systems?


All times are GMT -4. The time now is 17:13.