Boost logo

Boost Users :

Subject: Re: [Boost-users] boost.MPI test error
From: Jack Bryan (dtustudy68_at_[hidden])
Date: 2010-06-10 12:01:52


Hi thanks
Although I added the link for the library, I still got the same error:----------------------------------------------------------------------------- mpic++ -o tp2p test_p2p.cpp -I/home/mypath/boost_2010_6_8/boost_1_43_0test_p2p.cpp:6:38: error: /boost/mpi/environment.hpp: No such file or directorytest_p2p.cpp: In function âint main(int, char**)â:test_p2p.cpp:18: error: âenvironmentâ is not a member of âmpiâtest_p2p.cpp:18: error: expected `;' before âenvâ------------------------------------------------------------------------------
According to the instruction of boost.mpi:
http://www.boost.org/doc/libs/1_43_0/doc/html/mpi/getting_started.html#mpi.testing
I also tried :mpic++ -I/path/to/boost/mpi my_application.cpp -Llibdir -lboost_mpi-gcc-mt-1_35 -lboost_serialization-gcc-d-1_35.a
But also errors: ----------------------------------------------------------------------------------------------------- mpic++ -I/home/mypath/boost_2010_6_8/boost_1_43_0/boost/mpi -o tp2p test_p2p.cpp -Llibdir -lboost_mpi-gcc-mt-1_35 -lboost_serialization-gcc-d-1_35.atest_p2p.cpp:6:38: error: /boost/mpi/environment.hpp: No such file or directorytest_p2p.cpp:11:38: error: boost/mpi/communicator.hpp: No such file or directorytest_p2p.cpp:14: error: âboostâ has not been declaredtest_p2p.cpp:14: error: âmpiâ is not a namespace-nametest_p2p.cpp:14: error: expected namespace-name before â;â tokentest_p2p.cpp: In function âint main(int, char**)â:test_p2p.cpp:18: error: âmpiâ has not been declaredtest_p2p.cpp:18: error: expected `;' before âenvâtest_p2p.cpp:19: error: âmpiâ has not been declaredtest_p2p.cpp:19: error: expected `;' before âworldâtest_p2p.cpp:20: error: âworldâ was not declared in this scope-----------------------------------------------------------------------------------------------------------
I have built and installed mpi libraries.
Why ?
Any help is appreciated.

thanks
Jack

> Date: Wed, 9 Jun 2010 15:00:33 -0700
> From: watanabesj_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] boost.MPI test error
>
> AMDG
>
> Jack Bryan wrote:
> > Thanks for your reply.
> > I added it, but the same error.
> > I found the possible reason is that the compiler cannot find the header files in the program.
> > This is my program got from the boost download package. --------------------------------------------------------------------------------#include </home/mypath/boost_2010_6_8/boost_1_43_0/boost/mpi/environment.hpp>
> > #include </home/mypath/boost_2010_6_8/boost_1_43_0/boost/mpi/communicator.hpp>
> > #include <iostream>namespace mpi = boost::mpi;
> > int main(int argc, char* argv[]){ mpi::environment env(argc, argv); mpi::communicator world; std::cout << "I am process " << world.rank() << " of " << world.size() << "." << std::endl; return 0;}-----------------------------------------------------------------------------------
> > The g++ compiler can find "environment.hpp" because I have indicated the absolute path. But, inside the "environment.hpp", it needs other header files such as " boost/mpi/config.hpp".
> > I have installed the boost lib in mypath with the prefix=mypath.
> > I have also update the PATH and LD_LIBRARY_PATH variable name with the boost path in my shell.
> > Why does the compiler not find them ?
> > Any help is appreciated.
>
> Use the option -I/home/mypath/boost_2010_6_8/boost_1_43_0
>
> Then, you should be able to
> #include <boost/mpi/communicator.hpp>
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> 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