Boost logo

Boost :

Subject: [boost] is_convertible_basic_impl and OpenMP - compile error
From: Remi (therealremi_at_[hidden])
Date: 2010-10-17 21:45:34


Hi,
I'd like to report nasty behaviour of boost when used inside OpenMP loops.
In the following example compile error is generated under Visual 2008, if
"default(none)" is used for OpenMP variable data sharing attribute clauses
(which is the recommended choice).

#define BOOST_ALL_NO_LIB 1
#include <boost/graph/adjacency_list.hpp>
#include <omp.h>

int main(int argc, char* argv[])
{
    typedef boost::adjacency_list<boost::vecS, boost::vecS,
boost::undirectedS> GraphType;
    typedef GraphType::adjacency_iterator GraphAdjacencyIterator;
    const unsigned int vertex_count( 20 );
    typedef std::pair<int, int> EdgeType;
    std::vector<EdgeType> edges;
    const GraphType graph( edges.begin(), edges.end(), vertex_count,
edges.size() );

    int i( 0 );
    #pragma omp parallel for schedule(static, 1) default(none) private(i)
shared(vertex_count, graph)
    for ( i = 0; i < vertex_count; ++i )
    {
        const std::pair<GraphAdjacencyIterator, GraphAdjacencyIterator>
adjacent
        (
            boost::adjacent_vertices(i, graph)
        );
    }

    return 0;
}

"\boost\boost/type_traits/is_convertible.hpp(263) : error C3052: '_m_from' :
variable doesn't appear in a data-sharing clause under a default(none)
clause"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk