Boost logo

Boost Users :

Subject: Re: [Boost-users] compilation errors of Parallel BGL
From: Zheng Da (zhengda1936_at_[hidden])
Date: 2011-04-07 14:31:32


Thanks for your reply. Could you tell me where the source code of PBGL is?
I checked the directory libs/graph_parallel/src/, and there are only 2
files. All of the code is in these 2 files?

zhengda_at_zhengda-desktop:~/graph/boost_1_46_1$ ls libs/graph_parallel/src/
mpi_process_group.cpp tag_allocator.cpp

Best,
Da

On Thu, Apr 7, 2011 at 2:18 AM, Nicholas Edmonds
<ngedmond_at_[hidden]> wrote:
> The 0.7 release is likely out of date with respect to some of the changes in
> Boost 1.46 (I think I generated that tarball against 1.44 but I can't
> remember for sure), try using the PBGL distributed with Boost 1.46.
>
> -Nick
>
> On Apr 7, 2011, at 12:38 AM, Da Zheng wrote:
>
>> Hello,
>>
>> I try to build Parallel BGL in Ubuntu. I use gcc version 4.4.5, boost
>> v1.46.1,
>> openmpi v1.4.1-3ubuntu1. I believe my environment fulfills your
>> requirements.
>> Then I download parallel-bgl-0.7.0.tar.gz, and try to compile it, but I
>> get some
>> compilation errors. Below shows all my steps of compiling the library.
>>
>> cmake works fine.
>>
>> zhengda_at_zhengda-desktop:~/graph/parallel-bgl-0.7.0$
>> BOOST_ROOT=/home/zhengda/graph/boost_1_46_1 cmake .
>> -- The C compiler identification is GNU
>> -- The CXX compiler identification is GNU
>> -- Check for working C compiler: /usr/bin/gcc
>> -- Check for working C compiler: /usr/bin/gcc -- works
>> -- Detecting C compiler ABI info
>> -- Detecting C compiler ABI info - done
>> -- Check for working CXX compiler: /usr/bin/c++
>> -- Check for working CXX compiler: /usr/bin/c++ -- works
>> -- Detecting CXX compiler ABI info
>> -- Detecting CXX compiler ABI info - done
>> -- Found MPI: /usr/lib/libmpichcxx.so
>> -- Boost version: 1.46.1
>> -- Found the following Boost libraries:
>> --   mpi
>> --   serialization
>> --   filesystem
>> --   system
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to:
>> /home/zhengda/graph/parallel-bgl-0.7.0
>>
>>
>> When I compile the code, it shows the following errors.
>>
>> zhengda_at_zhengda-desktop:~/graph/parallel-bgl-0.7.0$ make
>> Scanning dependencies of target boost_graph_mpi
>> [  2%] Building CXX object
>>
>> libs/graph_parallel/src/CMakeFiles/boost_graph_mpi.dir/mpi_process_group.cpp.o
>> In file included from
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/mpi_process_group.hpp:807,
>>                 from
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/libs/graph_parallel/src/mpi_process_group.cpp:13:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:
>> In function ‘int boost::graph::distributed::receive(const
>> boost::graph::distributed::mpi_process_group&, int, int, T&)’:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:722:
>> error: ‘stderr’ was not declared in this scope
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:724:
>> error: there are no arguments to ‘fprintf’ that depend on a template
>> parameter,
>> so a declaration of ‘fprintf’ must be available
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:724:
>> note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing
>> the
>> use of an undeclared name is deprecated)
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:
>> In function ‘typename boost::enable_if<boost::mpi::is_mpi_datatype<T>,
>> std::pair<int, unsigned int> >::type
>> boost::graph::distributed::receive(const
>> boost::graph::distributed::mpi_process_group&, int, int, T*, size_t)’:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:743:
>> error: ‘stderr’ was not declared in this scope
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:745:
>> error: there are no arguments to ‘fprintf’ that depend on a template
>> parameter,
>> so a declaration of ‘fprintf’ must be available
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:
>> In function ‘int boost::graph::distributed::receive(const
>> boost::graph::distributed::mpi_process_group&, int, int, T&) [with T =
>> int]’:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:609:
>>  instantiated from ‘void
>>
>> boost::graph::distributed::mpi_process_group::global_trigger_launcher<Type,
>> Handler>::receive(const boost::graph::distributed::mpi_process_group&,
>> int, int,
>> boost::graph::parallel::trigger_receive_context, int) const [with Type =
>> int,
>> Handler = void (*)(const boost::graph::distributed::mpi_process_group&,
>> int,
>> int, int, bool)]’
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/libs/graph_parallel/src/mpi_process_group.cpp:1110:
>>  instantiated from here
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:722:
>> error: ‘fprintf’ was not declared in this scope
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:
>> In function ‘int boost::graph::distributed::receive(const
>> boost::graph::distributed::mpi_process_group&, int, int, T&) [with T =
>> boost::graph::distributed::mpi_process_group::outgoing_messages]’:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:609:
>>  instantiated from ‘void
>>
>> boost::graph::distributed::mpi_process_group::global_trigger_launcher<Type,
>> Handler>::receive(const boost::graph::distributed::mpi_process_group&,
>> int, int,
>> boost::graph::parallel::trigger_receive_context, int) const [with Type =
>> boost::graph::distributed::mpi_process_group::outgoing_messages, Handler =
>> void
>> (*)(const boost::graph::distributed::mpi_process_group&, int, int,
>> boost::graph::distributed::mpi_process_group::outgoing_messages&, bool)]’
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/libs/graph_parallel/src/mpi_process_group.cpp:1110:
>>  instantiated from here
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/detail/mpi_process_group.tpp:722:
>> error: ‘fprintf’ was not declared in this scope
>> make[2]: ***
>>
>> [libs/graph_parallel/src/CMakeFiles/boost_graph_mpi.dir/mpi_process_group.cpp.o]
>> Error 1
>> make[1]: *** [libs/graph_parallel/src/CMakeFiles/boost_graph_mpi.dir/all]
>> Error 2
>> make: *** [all] Error 2
>>
>>
>>
>> So I modify boost/graph/distributed/detail/mpi_process_group.tpp, and
>> insert
>> "#include <stdio.h>". It seems the error above is solved, but I get a new
>> error.
>> This time I don't know how to fix this error.
>>
>> zhengda_at_zhengda-desktop:~/graph/parallel-bgl-0.7.0$ make
>> [  2%] Building CXX object
>>
>> libs/graph_parallel/src/CMakeFiles/boost_graph_mpi.dir/mpi_process_group.cpp.o
>> [  5%] Building CXX object
>> libs/graph_parallel/src/CMakeFiles/boost_graph_mpi.dir/tag_allocator.cpp.o
>> Linking CXX static library ../../../lib/libboost_graph_mpi.a
>> [  5%] Built target boost_graph_mpi
>> Scanning dependencies of target adjlist_build_test
>> [  8%] Building CXX object
>>
>> libs/graph_parallel/test/CMakeFiles/adjlist_build_test.dir/adjlist_build_test.cpp.o
>> In file included from
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/adjacency_list.hpp:3961,
>>                 from
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/libs/graph_parallel/test/adjlist_build_test.cpp:10:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/adjlist/serialization.hpp:
>> In function ‘std::vector<int, std::allocator<int> >
>> boost::detail::parallel::available_process_files(const std::string&)’:
>>
>> /home/zhengda/graph/parallel-bgl-0.7.0/boost/graph/distributed/adjlist/serialization.hpp:97:
>> error: conversion from ‘boost::filesystem3::path’ to non-scalar type
>> ‘std::string’ requested
>> make[2]: ***
>>
>> [libs/graph_parallel/test/CMakeFiles/adjlist_build_test.dir/adjlist_build_test.cpp.o]
>> Error 1
>> make[1]: ***
>> [libs/graph_parallel/test/CMakeFiles/adjlist_build_test.dir/all]
>> Error 2
>> make: *** [all] Error 2
>>
>> Did I do something wrong? Why can I not compile the library?
>>
>> Thanks,
>> Da
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net