
Hi All:
I have installed boost lib also including mpi.
I am trying to run some simple mpi program to test it.
my program: (test_p2p.cpp)-------------------------------------------------------
#include

Hi Jack,
On Wed, Jun 9, 2010 at 7:39 PM, Jack Bryan
my compile command: g++ -o testp2p test_p2p.cpp I got error : /boost/mpi/environment.hpp:16:32: error: boost/mpi/config.hpp: No such file or directory
quite likely you have to add "-I./" to the compiler command line:: g++ -o testp2p -I./ test_p2p.cpp Regards, Riccardo -- Riccardo Murri, Hadlaubstr. 150, 8006 Zürich (CH)

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 #include #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. thanks, Jack June 9 2010
Date: Wed, 9 Jun 2010 21:37:36 +0200 From: riccardo.murri@gmail.com To: boost-users@lists.boost.org Subject: Re: [Boost-users] boost.MPI test error
Hi Jack,
On Wed, Jun 9, 2010 at 7:39 PM, Jack Bryan
wrote: my compile command: g++ -o testp2p test_p2p.cpp I got error : /boost/mpi/environment.hpp:16:32: error: boost/mpi/config.hpp: No such file or directory
quite likely you have to add "-I./" to the compiler command line::
g++ -o testp2p -I./ test_p2p.cpp
Regards, Riccardo
-- Riccardo Murri, Hadlaubstr. 150, 8006 Zürich (CH) _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-userks,
_________________________________________________________________ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

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 #include #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

Hi, thanks It works, but I got new error. mpic++ -o tp2p -I/home/mypath/boost_2010_6_8/boost_1_43_0 test_p2p.cppinput in flex scanner failed Is there something wrong with the parsing translator "flex" ? I can compile other mpi program without any problems. Is this a special problem of boost ? Any help is appreciated. Thanks Jack June 9 2010
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 #include #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
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_________________________________________________________________ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:W...

thanks I need to compile a boot mpi program. mpic++ -o tp2p -I/home/mypath/boost_2010_6_8/boost_1_43_0 test_p2p.cpp But I got error: input in flex scanner failed It seems that mpic++ cannot accept the compiling command. I cannot find man page or help document for mpic++. Any help is appreciated. thanks Jack June 9 2010
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 #include #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
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_________________________________________________________________ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:W...

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.t... 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@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 #include #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
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. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:W...
participants (3)
-
Jack Bryan
-
Riccardo Murri
-
Steven Watanabe