<div dir="ltr">Can you provide more data about your build environment? i.e. exact llvm, clang, and openmp runtime versions?<div><br></div><div>I'll take a look at this issue over the weekend (though I need to get my ARM box up and running again, it's currently unbootable).</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 7, 2014 at 5:00 PM, Xiaokang Fan <span dir="ltr"><<a href="mailto:xkfan87@gmail.com" target="_blank">xkfan87@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>
        <div>
            <p>Hi</p>

<p>I have successfully cross compiled libiomp5.so for ARM using clang 
and arm-linux-gnueabihf toolchain. Then I cross compiled a simple openmp
 program with libiomp5.so. But when I tried to run the program on ARM, I
 got a problem. The program is:</p>

<p>#include <stdio.h><br>
#include <stdlib.h><br>
#include <omp.h><br>
int main(int argc, char** argv)<br>
{<br>
        int i = 0;<br>
#pragma omp parallel for<br>
        for(i = 0; i < 10; i++) {<br>
                int tid = omp_get_thread_num();<br>
                printf("hello from thread %d\n", tid);<br>
        }<br>
        return 0;<br>
}</p>

<p>The output is:</p>

<p>hello from thread 0<br>
hello from thread 0<br>
hello from thread 2<br>
hello from thread 2<br>
hello from thread 1<br>
hello from thread 1<br>
hello from thread 3<br>
hello from thread 3<br>
hello from thread 4<br>
hello from thread 4<br>
pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.<br>
Aborted</p>

<p>Can someone provide some help?</p>

<p>Thanks!</p><span class="HOEnZb"><font color="#888888">

<p>Xiaokang</p>
        </font></span></div>
      </div></div>
<br>_______________________________________________<br>
Openmp-dev mailing list<br>
<a href="mailto:Openmp-dev@dcs-maillist2.engr.illinois.edu">Openmp-dev@dcs-maillist2.engr.illinois.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a><br>
<br></blockquote></div><br></div>