problem in running c++ program on Boost.MPI

View: New views
2 Messages — Rating Filter:   Alert me  

problem in running c++ program on Boost.MPI

by Vineet Pratap (Vampaier) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

 i write simple hello.cpp program that is

#include <boost/mpi/environment.hpp>
#include <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;
}

my problem is "when i compile this using
mpicxx -I /home/vineet/boost_1_40_0/ hello.cpp -o h.out -L /home/vineet/boost_1_40_0/stage/lib/*
it compile successfully but when run by using:

 mpirun -np 4 ./h.out
./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0: cannot open shared object file: No such file or directory
./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0: cannot open shared object file: No such file or directory
./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0: cannot open shared object file: No such file or directory
./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0: cannot open shared object file: No such file or directory

note: mpich2 is bulid successful
please tell me what is worng with me.


THANKs


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: problem in running c++ program on Boost.MPI

by Steven Watanabe-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

AMDG

Vineet Pratap (Vampaier) wrote:

>  i write simple hello.cpp program that is
>
> #include <boost/mpi/environment.hpp>
> #include <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;
> }
>
> my problem is "when i compile this using
> mpicxx -I /home/vineet/boost_1_40_0/ hello.cpp -o h.out -L
> /home/vineet/boost_1_40_0/stage/lib/*
> it compile successfully but when run by using:
>
>  mpirun -np 4 ./h.out
> ./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0:
> cannot open shared object file: No such file or directory
> ./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0:
> cannot open shared object file: No such file or directory
> ./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0:
> cannot open shared object file: No such file or directory
> ./h.out: error while loading shared libraries: libboost_mpi.so.1.40.0:
> cannot open shared object file: No such file or directory
>
> note: mpich2 is bulid successful
> please tell me what is worng with me.
>  

Try adding the location of the libraries to LD_LIBRARY_PATH

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build