[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-cross-env-list] Solving the Pthreads issue
From: |
Tony Theodore |
Subject: |
Re: [Mingw-cross-env-list] Solving the Pthreads issue |
Date: |
Sat, 8 May 2010 18:07:10 +1000 |
On 8 May 2010 00:59, Gregory Smith <address@hidden> wrote:
> On Fri, 7 May 2010, Volker Grabsch wrote:
>
>> IIRC there is at least one person on this list who requested
>> OpenMP support, and thus should be able to write a quick
>> "Hello World" that uses OpenMP.
>
> I asked about OpenMP and would be happy to write a simple test program. I
> may not get to it right away, though. Also, I do not understand the static
> pthread deadlock in detail, so I'm not sure how helpful that test program
> will be. If you just want to test that OpenMP is operable, I can do that.
I found this snippet at the OpenMP site[1]:
#include <omp.h>
#include <stdio.h>
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(),
omp_get_num_threads());
}
It compiles and runs in Linux with:
gcc -fopenmp hello.c -o hello.exe -lgomp -lpthread -static
The same using the cross-gcc compiles but doesn't run in Windows, and
there's no sensible error message.
At least it's a starting point.
Tony
[1] http://openmp.org/wp/openmp-compilers/
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, (continued)
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Martin Lambers, 2010/05/03
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/04
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Dmitry Groshev, 2010/05/06
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/06
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/06
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/07
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/07
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Gregory Smith, 2010/05/07
- Re: [Mingw-cross-env-list] Solving the Pthreads issue,
Tony Theodore <=
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/09
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/09
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/09
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Tony Theodore, 2010/05/10
- Re: [Mingw-cross-env-list] Solving the Pthreads issue, Volker Grabsch, 2010/05/10
- [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Volker Grabsch, 2010/05/09
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Martin Lambers, 2010/05/09
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Volker Grabsch, 2010/05/12
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Martin Gerhardy, 2010/05/13
- Re: [Mingw-cross-env-list] Support for Windows 95/98/ME? (was: Solving the Pthreads issue), Volker Grabsch, 2010/05/13