CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   Failure to compile redistributeMeshPar (

schmidt_d August 22, 2007 16:49

Compilation of redistributeMes
Compilation of redistributeMeshPar failed due to an unresolved reference.

The failure occured with the following:
SUSE 8.1
OF 1.4.1
Itanium 2 (IA64)
gcc version 4.1.2

+ wmake redistributeMeshPar
Making dependency list for source file redistributeMeshPar.C
SOURCE=redistributeMeshPar.C ; g++ -DlinuxIA64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/parallelProce ssing/decompositionMethods/decompositionMethods/lnInclude -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linuxIA64GccDPOpt/redistributeMeshPar.o
g++ -DlinuxIA64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/parallelProce ssing/decompositionMethods/decompositionMethods/lnInclude -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC Make/linuxIA64GccDPOpt/redistributeMeshPar.o -L/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/lib/linuxIA64GccDPOpt \
-lfiniteVolume -ldecompositionMethods -lmeshTools -ldynamicMesh -lparMetisDecompositionMethod -lOpenFOAM -liberty -ldl -lm -o /home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxIA64GccDPOpt/red istributeMeshPar
/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/lib/linuxIA64GccDPOpt/ undefined reference to `__tls_get_addr'
collect2: ld returned 1 exit status
make: *** [/home/ac/dschmidt/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxIA64GccDPOpt/re distributeMeshPar] Error 1

msrinath80 August 22, 2007 16:52

Quoting from Mattijs in an ear
Quoting from Mattijs in an earlier post[1]:

Looks like your C++ compiler does not compile correctly (undefined reference to `___tls_get_addr' )

Try recompiling gcc from sources and see if you can compile&/link any (non-Foam) c++ program.


schmidt_d August 23, 2007 05:48

Srinath, Thanks for the sugge
Thanks for the suggestion. However, I don't think that it is this simple, for several reasons.

1) I did compile this g++ from sources a few months ago and used it to install OF1.4 previously.
2) I have successfully compiled OF1.4.1 up to this point.
3) Compiling a non-Foam (hello world) C++ test works fine.

I'll keep digging. I wonder if it has to do with METIS ? I think that is where libGKlib comes from. Could be a ./configure problem.


mattijs August 23, 2007 06:56

Looks like a metis related iss
Looks like a metis related issue. 'ldd $FOAM_LIBBIN/*' throws up libGKlib only in

schmidt_d August 27, 2007 10:36

Mattijs, You are probably cor
You are probably correct. Note that I upgraded to gcc 4.2.1 (compiled from sources) and I am still seeing the same problem.

schmidt_d August 28, 2007 15:29

Closure: After spending four
After spending four whole days trying to get the full code (OF and Metis) to compile on the Itanium 2 with any of:

gcc 4.2
gcc 4.1
gcc 3.2
Intel v. 8
Intel v. 9

...I am going back to OF 1.3. Compilation failed for different reasons with each compiler. The OF distribution has just gotten harder and harder to compile from sources.

msrinath80 August 28, 2007 17:44

It has been a while since I've
It has been a while since I've built OpenFOAM from sources. I was planning on doing it next week. I'll give it a try this weekend. Let's see how it goes.

schmidt_d August 28, 2007 20:48

It can be done with a little t
It can be done with a little trying on an Intel architecture machine or a machine where you are root (or where you can at least tell Mr. root what to do). If you are a remote non-Intel site where the sysadmin is not going to upgrade the OS or compilers, life gets more frustrating.


jens_klostermann August 29, 2007 10:50

Has anybody experience in comp
Has anybody experience in compiling OpenFOAM-1.4.1 with Intel compiler v 9.0? Especially the metis-5.0pre2 libs? I always get errors like
trunk/error.c(20): error: identifier "__thread" is undefined
__thread jmp_buf gk_return_to_entry;


With the gnu c-compiler this works all fine but not with the intel compiler?!

Any hints? Thanks!


henry August 29, 2007 11:34

I have successfully compiled a
I have successfully compiled and run OpenFOAM-1.4.1 with the Intel C++ compiler version 10.0 on a dual core, dual processor Xeon 5160 machine. Also I have compiled and runOpenFOAM-1.4 with Intel C++ compiler version 9.1 but neither with 9.0 which has too many problems.

To compile OpenFOAM-1.4.1 with Intel C++ version 10.0 you will need to apply the patch I posted in thread

msrinath80 August 31, 2007 07:00

And Done! I just finished comp
And Done! I just finished compiling OF 1.4.1 from scratch on Ubuntu Feisty Fawn 64-bit edition. I built binutils, then gcc and then paraview and finally OpenFOAM. Went very nicely. Hardware is my laptop Intel Core 2 duo - 2 GB RAM - Intel GMA 950 Graphics. This would not have been possible without the beautiful HOWTO on the wiki page[1]. Many thanks to the author!


isabelle February 20, 2008 19:01

Hi, I need to access the do

I need to access the document "How to compile OpenFOAM". As the wiki server is now down, is there another place to find it ?


mike_jaworski February 21, 2008 00:44

If you google search for the p
If you google search for the page and click:cached copy, you'll get something like this: o_compile_OpenFOAM+ n&gl=us&strip=1

All times are GMT -4. The time now is 07:52.