[MPICH] RE: a question about compile
Jayesh Krishna
jayesh at mcs.anl.gov
Fri Nov 9 10:19:31 CST 2007
Hi,
mpicc is a simple shell script which sets the compiler/linker
flags/directories (and more...) etc for you. We recommend that you use the
mpicc script to compile MPI programs. However you could incorporate the
necessary changes into your makefile too.
(PS: Try compiling a simple MPI program, eg: icpi.c, from command line using
g++. The following works for me,
g++ -I../../mpich2-install/include -L../../mpich2-install/lib/ icpi.c
-lmpichcxx -lmpich -lpthread -lssl -o icpi
)
Regards,
Jayesh
_____
From: menglige [mailto:menglige at gmail.com]
Sent: Thursday, November 08, 2007 9:24 PM
To: jayesh
Subject: a question about compile
Hi,
i want to compile my program on LINUX with 'make',i have add MPIDIR\include
and MPIDIR\lib to 'Makefile',but when i 'make',there are some erroes.why??
thank you!
erro:
g++ -m64 -Wl,-rpath,/soft/software/qt-4.3.0/lib -o calculator button.o
calculato r.o main.o moc_button.o moc_calculator.o
-L/soft/software/qt-4.3.0/lib -lQtGu i -L/soft/software/qt-4.3.0/lib
-L/usr/X11R6/lib64 -lpng -lSM -lICE -pthread -pt hread -lXi -lXrender
-lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontcon fig -lXext -lX11
-lQtCore -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -ldl -l pthread
-L/soft/software/mpich2/lib -lmpich -lmpichcxx
main.o(.gnu.linkonce.t._ZN4PMPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb+0x19): In
fun ction `PMPI::Op::Init(void (*)(void const*, void*, int, PMPI::Datatype
const&), bool)':
: undefined reference to `op_intercept'
main.o(.gnu.linkonce.t._ZNK4PMPI9Intracomm6ReduceEPKvPviRKNS_8DatatypeERKNS_
2OpE i+0x1c): In function `PMPI::Intracomm::Reduce(void const*, void*, int,
PMPI::Dat atype const&, PMPI::Op const&, int) const':
: undefined reference to `PMPI::Intracomm::current_op'
main.o(.gnu.linkonce.t._ZNK4PMPI9Intracomm6ReduceEPKvPviRKNS_8DatatypeERKNS_
2OpE i+0x3a): In function `PMPI::Intracomm::Reduce(void const*, void*, int,
PMPI::Dat atype const&, PMPI::Op const&, int) const':
: undefined reference to `PMPI::Intracomm::current_op'
main.o(.gnu.linkonce.t._ZNK4PMPI9Intracomm4ScanEPKvPviRKNS_8DatatypeERKNS_2O
pE+0 xd): In function `PMPI::Intracomm::Scan(void const*, void*, int,
PMPI::Datatype const&, PMPI::Op const&) const':
: undefined reference to `PMPI::Intracomm::current_op'
main.o(.gnu.linkonce.t._ZNK4PMPI9Intracomm4ScanEPKvPviRKNS_8DatatypeERKNS_2O
pE+0 x2d): In function `PMPI::Intracomm::Scan(void const*, void*, int,
PMPI::Datatype const&, PMPI::Op const&) const':
: undefined reference to `PMPI::Intracomm::current_op'
main.o(.gnu.linkonce.t._ZNK4PMPI9Intracomm14Reduce_scatterEPKvPvPiRKNS_8Data
type ERKNS_2OpE+0xd): In function `PMPI::Intracomm::Reduce_scatter(void
const*, void* , int*, PMPI::Datatype const&, PMPI::Op const&) const':
: undefined reference to `PMPI::Intracomm::current_op'
...........
...........
_____
menglige
2007-11-09
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20071109/7f7ed18d/attachment.htm>
More information about the mpich-discuss
mailing list