<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial">Greetings,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial"><span style="line-height:17.8048000335693px">so I tried to use opennp with one of the latest version of clang, </span><code style="line-height:17.8048000335693px;margin:0px;padding:1px 5px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:pre-wrap;background:rgb(238,238,238)">clang version 3.4.2 (tags/RELEASE_34/dot2-final)</code><span style="line-height:17.8048000335693px">. Followed the procedure to compilre and export the library PATHs, Compiling my hello.c using :</span><br></p><pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.8048000335693px;background:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:inherit;background-image:initial;background-repeat:initial"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">clang </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">fopenmp hello</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">c</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial">and then running it, still it can't use more than 1 thread:</p><pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.8048000335693px;background:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:inherit;background-image:initial;background-repeat:initial"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(43,145,175);background:transparent">Bash</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">-</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">4.1</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">$ </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">./</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">a</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">.</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">out
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(43,145,175);background:transparent">Hello</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> from thread </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">0</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> nthreads </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">1</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial">I tried to manually export <code style="margin:0px;padding:1px 5px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:pre-wrap;background:rgb(238,238,238)">export OMP_NUM_THREADS=8</code> but that didn't solve anything as well.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial">Any suggestions would be appreciated.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial"><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial">-Amir</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial"><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:17.8048000335693px;background-image:initial;background-repeat:initial"><a href="http://p.sl">p.sl</a>: This is the hello.c:</p><pre class="" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.8048000335693px;background:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:inherit;background-image:initial;background-repeat:initial"><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,128,128);background:transparent">#include</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent"><omp.h></span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,128,128);background:transparent">#include</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent"><stdio.h></span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(43,145,175);background:transparent">int</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> main</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">()</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> </span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">{</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">
</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,128,128);background:transparent">#pragma</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> omp parallel
printf</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">(</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(128,0,0);background:transparent">"Hello from thread %d, nthreads %d\n"</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">,</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> omp_get_thread_num</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent">(),</span><span class="" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background:transparent"> omp_get_num_threads</span></code></pre></div>