<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p style="margin-top:0; margin-bottom:0">Dear <span>Enea, Dear all,</span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span>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 :</span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span><span>#include <omp.h></span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span><span>namespace PPL = Parma_Polyhedra_Library;</span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span><span>int main(){</span><br>
</span></p>
<p style="margin-top:0; margin-bottom:0"><span></p>
<div>#pragma omp parallel for<br>
    for(int i=0; i<1000; i++){<br>
        <span><span>PPL</span></span>::C_Polyhedron ph1(3);  // => segmentation fault
<span>at line 83 of Linear_Expression.cc</span><br>
        <span><span>PPL</span></span>::C_Polyhedron ph2(3);<br>
        ph1.intersection_assign(ph2);<br>
    }</div>
<div>    return 0;</div>
<div>}<br>
</div>
</span><br>
<p></p>
<p style="margin-top:0; margin-bottom:0">Would you have any idea about what is wrong? Is PPL compatible with using OpenMP?</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Thanks a lot in advance,</p>
<p style="margin-top:0; margin-bottom:0">Thomas<br>
</p>
<br>
<div id="Signature"></div>
</div>
</body>
</html>