Boost logo

Boost Users :

Subject: Re: [Boost-users] boost MPI error
From: Jack Bryan (dtustudy68_at_[hidden])
Date: 2010-06-13 19:06:32


Hi :

Thanks for all your replies.

I fixed the problem by :
adding the "-" before I.

(1) removing "/" from the include header file "/boost/mpi/communicator.hpp".
(2) compile it by :
mpic++ -o testp2p test_p2p.cpp -I/lustre/jxding/boost_2010_6_8/boost_1_43_0 -L/lustre/jxding/boost_2010_6_8/boost_1_43_0/stage/lib -lboost_mpi -lboost_serialization
 
(3) The libboost_mpi.a is really in the stage/lib .

How to avoid this kind of simple problem happen again ?

Actually, I have tried to search for answer online in the past 4 days without finding any hints.

I really appreciate all of your help.

Jack

June 13 2010

> Date: Sun, 13 Jun 2010 21:38:40 +0200
> From: riccardo.murri_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] boost MPI error
>
> Hi Jack,
>
> actually bjam is giving you a hint about what you should add to your
> compiler command line:
>
> On Sun, Jun 13, 2010 at 8:25 PM, Jack Bryan <dtustudy68_at_[hidden]> wrote:
> > The following directory should be added to compiler include paths:
> >
> > /lustre/jxding/boost_2010_6_8/boost_1_43_0
> >
> > The following directory should be added to linker library paths:
> >
> > /lustre/jxding/boost_2010_6_8/boost_1_43_0/stage/lib
>
> g++ option "-I" adds a directory to the include path and option "-L"
> adds a directory to the linker library path; in addition to that, to
> produce the actual executable file, you'll need to link against the
> "boost_mpi" and "boost_serialization" libraries: libraries are
> specified using the compiler's "-l" option.
>
> So, I'd guess that you need to invoke the mpic++ compiler this way::
>
> mpic++ -o testp2p test_p2p.cpp \
> -I/lustre/jxding/boost_2010_6_8/boost_1_43_0 \
> -L/lustre/jxding/boost_2010_6_8/boost_1_43_0/stage/lib \
> -lboost_mpi -lboost_serialization
>
>
> > It seems that I need to specify I need to use mpi for the bjam builder.
> >
> > But, I have added "using mpi ;" and "using mpi :
> > /opt/openmpi-gnu/bin/mpic++ ;" in the file
> > /home/myname/boost_2010_6_8/boost_1_43_0/user-config.jam.
> >
> > I have also added it in the file
> > /home/myname/boost_2010_6_8/boost_1_43_0/tools/build/v2/user-config.jam.
> >
> > But, I still got the same error. It seems that there is something wrong with
> > the package ?
> > or the compiler cannot understand the "using mpi ;" in the user-config.jam ?
> >
>
> I had to add the "using mpi ;" line to the file "project-config.jam";
> creating a "user-config.jam" did not work for me (but I didn't really
> look into the issue, so likely I did something wrong).
>
> Anyway, there is a simple check to see if the Boost.MPI library has
> been built: search for a file named "libboost_mpi.a" into
> /lustre/jxding/boost_2010_6_8/boost_1_43_0/stage/lib (or whatever
> directory "bjam" suggests that you add to the linker library path).
> If the file is there, MPI support has been built.
>
> Best regards,
> Riccardo
>
> --
> Riccardo Murri, Hadlaubstr. 150, 8006 Zürich (CH)
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
                                               
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net