OpenMP performance on Windows 7
Tim Prince
n8tm@aol.com
Mon Oct 27 09:55:00 GMT 2014
On 10/26/2014 10:50 PM, John D Campbell wrote:
> I hope you may be able to advise if this is a known problem:
>
> I have been using gFrotran to test OpenMP and have a few questions and
> feedback.
>
> Two questions, which I would like a response (detailed below)
> 1) Entering !$OMP PARALLEL region has a high overhead.
> 2) I need to convert Silverfrost Fortran STDCALL syntax to use
> ISO_C_BINDING; can you advise suitable reference ?
>
> Regards
>
> John Campbell
>
> 1: Openmp
> I am using gFortran 4.9.1 on Windows 7, installed with mingw-w64-install.exe
> The !$OMP region overhead is about 50 to 55 microseconds.
> I have also tested gFortran 4.8.2 on Windows 7, downloaded from
> equation.com. The !$OMP region overhead is about 20 microseconds.
> From the OpenMP Forum (openmp.org/forum), I have been told that the !$OMP
> region overhead is about 2 microseconds for an lunix install.
> Is this 10 to 25 x penalty a known problem of Windows ?
>
>
We have been discussing this; a few points:
libgomp is based on pthreads, which apparently no one has been able to
optimize for Windows; this seems to add an additional layer of latency
to OpenMP. It may be interesting to compare mingw vs. cygwin, but it's
clear that cygwin libgomp also is slow relative to commercial native
Windows OpenMP. Even the latter doesn't presume to compete with linux.
Intel offers an open source OpenMP library, but it seems doubtful that
extension of support to gfortran would be accepted. As supplied, the
configure script insists on compiling with Visual Studio tools when it
detects Windows. Lahey may offer a gfortran with interface to Visual
Studio, but it doesn't appear very popular.
My primary windows test platform is a dual core Windows 8.1 Ultrabook,
which has no BIOS option to disable HyperThreading. libgomp performance
under cygwin appears to peak usually at 3 threads. It requires that
several spyware flavored utilities supplied with Ultrabook be removed
and that virus checkers (even those which are OK in Windows 7) be
suspended. I haven't tackled the question of dual boot with linux; I
suppose that virtualized linux under Windows would not solve OpenMP latency.
I have an older dual boot platform where I might compare Windows 7 vs.
linux performance, but I don't think benchmarks are as interesting
without the AVX2 instruction set and cache improvements.
--
Tim Prince
More information about the Fortran
mailing list