On Wednesday, September 13 at 01:07 PM, quoth Guiyuan Lei:
>(2)in the new cluster, the LAM/MPI header file is in the directory
>/usr/
>include, so I use the following command
>g++ -c gibbsreg.cpp -I/usr/include
>mpif77 -llammpi++ -lstdc++ gibbsreg.o -lblas -llapack -lg2c -lm
>
>When I use "locate lammpi++", I got
>/usr/lib64/liblammpi++.a
>/usr/lib64/liblammpi++.la
>
>
>When use above compile command, in new cluster, I got the following error
>message:
>gibbsreg.o(.gnu.linkonce.r._ZTVN3MPI2OpE+0x20): undefined reference to `MPI::Op
>::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
Did you put those libraries there yourself, or did you compile LAM
with --libdir=/usr/lib64? I suspect you did the former, which is why
mpf77 isnât finding those libraries.
In any case, adding -L/usr/lib64 to your mpf77 command will probably
fix it, like so:
mpf77 -L/usr/lib64 -llammpi++ -lstdc++ gibbsreg.o -lblas -llapack
-lg2c -lm
--
Kyle B. Wheeler Scalable Computing Systems (1423)
Student Intern Sandia National Laboratories
kbwheel_at_[hidden] 505-844-7179
MS: 1319 CSRI/237
- application/pgp-signature attachment: stored
|