On Tue, May 30, 2006 at 11:19:09AM +0200, Fran?ois-Xavier Coudert wrote:
> [CCing the OpenMP experts]
> 
> Henry,
> 
> The -fopenmp option doesn't work under mingw32. Since I am the one
> building the Windows (mingw32) binary packages you downloaded, I'm
> rather interesting in getting it to work... So here are a few things
> we could sort out:
> 
>  1. currently, using the -fopenmp options gives:
> 
> >$ gfortran -fopenmp a.f
> >gfortran.exe: unrecognized option '-pthread'
> >gfortran.exe: libgomp.spec: No such file or directory
> 
> Could we have a clearer error message? (perhaps saying that openmp is
> not available on that platform) The current message is clearly... not
> clear for users!

Then mingw32 should do something similar to config/i386/cygwin.h, which has
/* Every program on cygwin links against cygwin1.dll which contains
   the pthread routines.  There is no need to explicitly link them
   and the -pthread flag is not recognized.  */
#undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS ""

>  2. I looked at pthreads win32
> (http://sources.redhat.com/pthreads-win32/), an opensource thread
> support for win32, including mingw32. Not all POSIX functions are
> implemented, but a fair amount of them. I'll try to get libgomp
> compiling with against those, and report progress here.
> 
> 
>  3. why is libgomp building conditional on target triplet, and not on
> detecting a working pthread implementation?

Most of the things are detected, only very few things are keyed on target
triplet and in those cases it is desirable (e.g. arch specific assembly,
etc.).  Once you do 2., you just port libgomp to mingw32 + pthreads-win32
and assuming pthreads-win32 is sufficiently rich and not too buggy, it will
just work.

        Jakub

Reply via email to