Under Linux compilation error

I get the following error when compiling under Linux:

g++ -o cavity2d cavity2d.o /home/mrohde/palabos-v1.5r1/lib/libplb.a
/home/mrohde/palabos-v1.5r1/lib/libplb.a(plbTimer.o): In function plb::global::PlbTimer::getTime() const': plbTimer.cpp:(.text+0x86): undefined reference toclock_gettime’
/home/mrohde/palabos-v1.5r1/lib/libplb.a(plbTimer.o): In function plb::global::PlbTimer::start()': plbTimer.cpp:(.text+0xbe): undefined reference toclock_gettime’
/home/mrohde/palabos-v1.5r1/lib/libplb.a(plbTimer.o): In function plb::global::PlbTimer::restart()': plbTimer.cpp:(.text+0xf5): undefined reference toclock_gettime’
/home/mrohde/palabos-v1.5r1/lib/libplb.a(plbTimer.o): In function plb::global::PlbTimer::stop()': plbTimer.cpp:(.text+0x146): undefined reference toclock_gettime’
collect2: ld returned 1 exit status
scons: *** [cavity2d] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2[/b]

How can I solve this?
Thanks!
Martin

Dear Martin,

I apologize for this error. It will be fixed in the next release of Palabos. Actually, you are the first to report it on a Linux platform. Usually it appears on Mac OS X. Anyway, please follow this post:

http://www.palabos.org/forum/read.php?11,7745

and I think it will solve your problems.

Enjoy Palabos!

Best,
Dimitris

Hi Dimitri,

Thanks. But unfortunately, this solution does not work on our Linux cluster (it works on my Mac). I get exactly the same error.

However, I found a solution by switching of the POSIX (usePOSIX = false). Then, the code compiles. I am not sure what this POSIX contributes to the entire Palabos code, hence I am not entirely sure what I do when I switch of this option?)

Best,
Martin

Hi,

It is strange that it does not work on your linux cluster. In any case, you can set usePOSIX to false and have no problem. The only issue I can think of right now is that you will not be able to export GIF images directly from Palabos. You will be able to export PPM images (and you can change them to GIF later if you wish).

Best,
Dimitris

Hi Dimitri

Will this have implications when running parallel?

Cheers, Martin

Hello Martin,

No it will not. Enjoy Palabos!

Cheers,
Dimitris