Minuit2 with openmp

Hi!

I was trying to get minuit2 with the openmp-support running and built the library with ROOT v5.23/02. There are no problems so far, but every time I want to link libMinuit2.so to any program (even to the test-code coming with ROOT), I get an “undefined reference” error which is really strange because the method which “is missing” should be in the library.
Have I overlooked something or is this a bug in Minuit2?

Anyway here are some details:

[quote]/apps/cern/root/math/minuit2/test$ make
g++ -O2 -Wall -fPIC -pthread -m64 -I/apps/cern/root/include -g -D_GLIBCXX_PARALLEL -fopenmp -c testUserFunc.cxx
g++ -O2 -m64 -fopenmp testUserFunc.o -L/apps/cern/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -lMinuit2 -o testUserFunc
/apps/cern/root/lib/libMinuit2.so: undefined reference to
`ROOT::Minuit2::Numerical2PGradientCalculator::operator()(std::vector<double, std::allocator > const&) const’
collect2: ld returned 1 exit status
make: *** [testUserFunc] Erreur 1[/quote]

[quote]g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Debian 4.3.3-5’ --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.3 (Debian 4.3.3-5)[/quote]

Cheers,
Marvin

Hello Marvin,

I could reproduce your problem on 4.3, but not on 4.2, which I tested before. I need to investigate this further.
In addition, you need first to link your application with -fopenmp, otherwise will not work.

Best Regards

Lorenzo