|
Boost-Build : |
Subject: Re: [Boost-build] problem in running c++ program on Boost.MPI
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-09-30 14:58:58
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
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk