Dear Enea, Dear all,


I tried recently to implement a multi-thread version of my thesis code using PPL library. I used OpenMP and the last version of ppl on devel git branch as I read you have been working on a thread-safe implementation (thread-safe option with configure). I didn't succeed in writing a correct program; see for instance this simple code that return a segmentation fault :


#include <omp.h>

namespace PPL = Parma_Polyhedra_Library;


int main(){

#pragma omp parallel for
    for(int i=0; i<1000; i++){
        PPL::C_Polyhedron ph1(3);  // => segmentation fault at line 83 of Linear_Expression.cc
        PPL::C_Polyhedron ph2(3);
        ph1.intersection_assign(ph2);
    }
    return 0;
}

Would you have any idea about what is wrong? Is PPL compatible with using OpenMP?


Thanks a lot in advance,

Thomas