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_0
test_p2p.cpp:6:38: error: /boost/mpi/environment.hpp: No such file or directory
test_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.a
test_p2p.cpp:6:38: error: /boost/mpi/environment.hpp: No such file or directory
test_p2p.cpp:11:38: error: boost/mpi/communicator.hpp: No such file or directory
test_p2p.cpp:14: error: âboostâ has not been declared
test_p2p.cpp:14: error: âmpiâ is not a namespace-name
test_p2p.cpp:14: error: expected namespace-name before â;â token
test_p2p.cpp: In function âint main(int, char**)â:
test_p2p.cpp:18: error: âmpiâ has not been declared
test_p2p.cpp:18: error: expected `;' before âenvâ
test_p2p.cpp:19: error: âmpiâ has not been declared
test_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@gmail.com
> To: boost-users@lists.boost.org
> 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@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how.