|
Boost Users : |
Subject: Re: [Boost-users] boost.MPI test error
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-09 18:00:33
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 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