[Openmp-dev] libiomp5.so problem on arm

Xiaokang Fan xkfan87 at gmail.com
Wed May 7 17:00:23 PDT 2014


Hi

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:

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

The output is:

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

Can someone provide some help?

Thanks!

Xiaokang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140508/afd3f082/attachment.html>


More information about the Openmp-dev mailing list