The MPI program works correctly after setting the LD_LIBRARY_PATH.
[pragatheeswaran@prairiefire test]$ mpic++ -I ~/bin/boostpath/include adjlist_build_test.cpp -L ~/bin/boostpath/lib/ -lboost_mpi -lboost_serialization
/tmp/ccNyFVXh.o: In function `__static_initialization_and_destruction_0(int, int)':
adjlist_build_test.cpp:(.text+0xa22): undefined reference to `boost::system::get_system_category()'
adjlist_build_test.cpp:(.text+0xa2e): undefined reference to `boost::system::get_generic_category()'
adjlist_build_test.cpp:(.text+0xa3a): undefined reference to `boost::system::get_generic_category()'
adjlist_build_test.cpp:(.text+0xa46): undefined reference to `boost::system::get_generic_category()'
adjlist_build_test.cpp:(.text+0xa52): undefined reference to `boost::system::get_system_category()'
/tmp/ccNyFVXh.o: In function `test_main(int, char**)':
adjlist_build_test.cpp:(.text+0x1966): undefined reference to `boost::graph::distributed::mpi_process_group::mpi_process_group(boost::mpi::communicator)'
adjlist_build_test.cpp:(.text+0x2076): undefined reference to `boost::graph::distributed::communicator(boost::graph::distributed::mpi_process_group const&)'
adjlist_build_test.cpp:(.text+0x217b): undefined reference to `boost::graph::distributed::communicator(boost::graph::distributed::mpi_process_group const&)'
adjlist_build_test.cpp:(.text+0x2483): undefined reference to `boost::graph::distributed::communicator(boost::graph::distributed::mpi_process_group const&)'
adjlist_build_test.cpp:(.text+0x2690): undefined reference to `boost::graph::distributed::communicator(boost::graph::distributed::mpi_process_group const&)'
adjlist_build_test.cpp:(.text+0x2d8e): undefined reference to `boost::graph::distributed::communicator(boost::graph::distributed::mpi_process_group const&)'
/tmp/ccNyFVXh.o:adjlist_build_test.cpp:(.text+0x2e93): more undefined references to `boost::graph::distributed::communicator(boost::graph::distributed::mpi_process_group const&)' follow
/tmp/ccNyFVXh.o: In function `test_main(int, char**)':
adjlist_build_test.cpp:(.text+0x34cc): undefined reference to `boost::graph::distributed::mpi_process_group::~mpi_process_group()'
adjlist_build_test.cpp:(.text+0x34e8): undefined reference to `boost::graph::distributed::mpi_process_group::~mpi_process_group()'