I have found an issue with the use of Thread_Init object, the following code does not work:
It seems to work! To avoid multiple instantiation of
thread_init, a solution is to break down the "omp parallel for" in two lines:
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
_______________________________________________ PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel