nm -D output

[pragatheeswaran@prairiefire lib]$ nm -D libboost_mpi.a

broadcast.o:
nm: broadcast.o: No symbols

Yes I am looking at  ~/bin/boostpath/lib directory for the specified library files.

Thanks,
Praga.


On Wed, Nov 25, 2009 at 1:00 PM, praga <mail2praga@gmail.com> wrote:
I guess you are right.. I have some problems with some basic boost mpi stuffs itself..

I ran a simple program using boost mpi but I found some problems with that. I have given the code and actions I have done. The ldd clearly says it cant find many libraries. I am not sure how to fix this. Could you please help me ?

main.cpp

#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;
}



[pragatheeswaran@prairiefire ~]$ mpic++ -I bin/boostpath/include main.cpp -L bin/boostpath/lib/ -lboost_mpi -lboost_serialization
[pragatheeswaran@prairiefire ~]$ ldd a.out 
libboost_mpi.so.1.41.0 => not found
libboost_serialization.so.1.41.0 => not found
libmpi_cxx.so.0 => not found
libmpi.so.0 => not found
libopen-rte.so.0 => not found
libopen-pal.so.0 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x0000003b54200000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003b57200000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003b64400000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003c63800000)
libm.so.6 => /lib64/libm.so.6 (0x0000003b54600000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003c66600000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003b54a00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003b53e00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003b53a00000)
[pragatheeswaran@prairiefire ~]$ mpirun -np 4 a.out 
a.out: error while loading shared libraries: libboost_mpi.so.1.41.0: cannot open shared object file: No such file or directory
a.out: error while loading shared libraries: libboost_mpi.so.1.41.0: cannot open shared object file: No such file or directory
a.out: error while loading shared libraries: libboost_mpi.so.1.41.0: cannot open shared object file: No such file or directory
a.out: error while loading shared libraries: libboost_mpi.so.1.41.0: cannot open shared object file: No such file or directory
[pragatheeswaran@prairiefire ~]$ 




Thanks,
Praga.


On Wed, Nov 25, 2009 at 12:52 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
On Wed, 25 Nov 2009, praga wrote:

When I did a install I indeed saw the graph_parallel being linked but when I did an ls I didnt find any extra files. Could you please let me know where I
went wrong?

pragatheeswaran@prairiefire boost_1_41_0]$ bjam --with-mpi --with-graph_parallel install --prefix=~/bin/boostpath/
warning: No toolsets are configured.
warning: Configuring default toolset "gcc".
warning: If the default is wrong, your build may not work correctly.
warning: Use the "toolset=xxxxx" option to override our guess.
warning: For more configuration options, please consult
warning: http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html
...patience...
...patience...
...found 17726 targets...
...updating 3 targets...
common.copy ~/bin/boostpath/lib/libboost_graph_parallel.a
common.copy ~/bin/boostpath/lib/libboost_graph_parallel.so.1.41.0
ln-UNIX ~/bin/boostpath/lib/libboost_graph_parallel.so
...updated 3 targets...

ls output

[pragatheeswaran@prairiefire lib]$ ls
libboost_mpi.a   libboost_mpi.so.1.41.0    libboost_serialization.so
libboost_mpi.so  libboost_serialization.a  libboost_serialization.so.1.41.0

Do you get the warning about MPI not being found?  Does your libboost_mpi.{a,so} contain any symbols (use nm -D on the .so file)? Which lib directory are you looking in?  The one in ~/bin/boostpath/lib? I'm just checking the "obvious" things to look for simple problems first.

-- Jeremiah Willcock

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users