Re: [Mingw-w64-public] gfortran, open mp and floating point precision

2015-02-02 Thread K. Frank
Hi Carl (and Pieter)!

On Mon, Feb 2, 2015 at 5:29 PM, Carl Kleffner  wrote:
> The Windows ABI - see https://msdn.microsoft.com/en-us/library/ms235286.aspx
> - differes from the
> System V ABI - see http://www.x86-64.org/documentation/abi.pdf.
>
> MingW-W64 sets the x87 FPU control word register to extended precision. The
> 'standard' for Windows however is 'double precision'.  See
> https://msdn.microsoft.com/en-us/library/ms235300.aspx.
>
> On Windows newly started threads never inherit FPU register settings from
> the master thread and set the FPU registers to the standard value. Thus you
> can have different FPU settings in different threads. OpenBLAS i.e. has some
> extra code to propagate the FPU settings. Look for 'CONSISTENT_FPCSR' at
> https://github.com/xianyi/OpenBLAS.
>
> Using extended precision with GCC can be tricky:
> https://gcc.gnu.org/wiki/FloatingPointMath and
> https://gcc.gnu.org/wiki/x87note. The latter link describes some gotchas
> when using extended precision with GCC.

Your post jogged my memory about the discussion I thought I
recalled, and I was able to find it.  Indeed, it was a thread on
this list started by you (Carl):

   http://sourceforge.net/p/mingw-w64/mailman/message/3303/

   [Mingw-w64-public] FPU control word on startup
   From: Carl Kleffner  - 2014-11-12 21:00:50

(and subsequent posts).

It does sound like this all could be the cause of Pieter's
thread / precision issue.

> Cheers,
>
> Carl


Best regards.


K. Frank


> 2015-02-02 6:34 GMT+01:00 K. Frank :
>>
>> Hi Pieter!
>>
>> This could be complete misinformation, or correct but
>> not relevant.
>>
>> On Thu, Jan 15, 2015 at 12:57 PM,   wrote:
>> > I wrote a test program in fortran and used gfortran 4.9.2 (tdm64-gcc
>> > 4.9.2)
>> > ...
>> > However for extended floating point precision off-diagonal elements of
>> > the
>> > identity matrix for thread 0 are <> 0 with the expected magnitude, for
>> > threads 1 to 3 they are a factor 1000 (!) larger and moreover identical
>> > to
>> > those of the identity matrix in the double floating point precision
>> > calculation.
>> > ...
>> > Where is the error?
>>
>> I have a vague recollection of a discussion (probably
>> on this list) about start-up code writing the Intel x87
>> floating-point control word to the floating-point processor.
>> ...

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Martell Malone
>
> Martell,  would you mind to take care for those two patch/bug reports too?
>

On the first one I don't have time to check them all right this minute I
will add it to my todo list.
https://sourceforge.net/p/mingw-w64/bugs/437/

For the second one however shouldn't we be using d2d1.idl from wine and not
a d2d1.h ?
The idl from wine seems to have the missing GUID in that patch.
I can fix this if this seems like a reasonable change?

On Mon, Feb 2, 2015 at 11:03 PM, Kai Tietz  wrote:

> Martell,  would you mind to take care for those two patch/bug reports too?
>
> Cheers,
> Kai
>
> 2015-02-02 23:42 GMT+01:00 Martin Mitáš :
> >
> >
> > Hi,
> >
> > Dne 2. 2. 2015 v 23:15 Martell Malone napsal(a):
> >> Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.
> >
> > yes, mingw-w64's libuuid.a is very incomplete. Reminds me this:
> > https://sourceforge.net/p/mingw-w64/bugs/437/
> >
> > And this:
> > https://sourceforge.net/p/mingw-w64/patches/73/
> >
> > Regards,
> > Martin
> >
> >
> --
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now. http://goparallel.sourceforge.net/
> > ___
> > Mingw-w64-public mailing list
> > Mingw-w64-public@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Kai Tietz
Martell,  would you mind to take care for those two patch/bug reports too?

Cheers,
Kai

2015-02-02 23:42 GMT+01:00 Martin Mitáš :
>
>
> Hi,
>
> Dne 2. 2. 2015 v 23:15 Martell Malone napsal(a):
>> Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.
>
> yes, mingw-w64's libuuid.a is very incomplete. Reminds me this:
> https://sourceforge.net/p/mingw-w64/bugs/437/
>
> And this:
> https://sourceforge.net/p/mingw-w64/patches/73/
>
> Regards,
> Martin
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Kai Tietz
Yes, by standard JonY cherry-picks them.

Kai

2015-02-02 23:56 GMT+01:00 Martell Malone :
> I'll commit it now then :)
>
> How do commits get into the 4.x branch btw ?
> Does jon_y cherry pick them himself ?
>
>
> On Mon, Feb 2, 2015 at 10:52 PM, Kai Tietz  wrote:
>>
>> Patch looks fine to me.
>>
>> Thanks,
>> Kai
>>
>> 2015-02-02 23:15 GMT+01:00 Martell Malone :
>> > Hi,
>> >
>> > Please review.
>> > Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.
>> >
>> > Kind Regards
>> > Martell
>> >
>> >
>> > --
>> > Dive into the World of Parallel Programming. The Go Parallel Website,
>> > sponsored by Intel and developed in partnership with Slashdot Media, is
>> > your
>> > hub for all things parallel software development, from weekly thought
>> > leadership blogs to news, videos, case studies, tutorials and more. Take
>> > a
>> > look and join the conversation now. http://goparallel.sourceforge.net/
>> > ___
>> > Mingw-w64-public mailing list
>> > Mingw-w64-public@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>> >
>>
>>
>> --
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> ___
>> Mingw-w64-public mailing list
>> Mingw-w64-public@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Martin Mitáš


Hi,

Dne 2. 2. 2015 v 23:15 Martell Malone napsal(a):
> Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.

yes, mingw-w64's libuuid.a is very incomplete. Reminds me this:
https://sourceforge.net/p/mingw-w64/bugs/437/

And this:
https://sourceforge.net/p/mingw-w64/patches/73/

Regards,
Martin

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Martell Malone
I'll commit it now then :)

How do commits get into the 4.x branch btw ?
Does jon_y cherry pick them himself ?


On Mon, Feb 2, 2015 at 10:52 PM, Kai Tietz  wrote:

> Patch looks fine to me.
>
> Thanks,
> Kai
>
> 2015-02-02 23:15 GMT+01:00 Martell Malone :
> > Hi,
> >
> > Please review.
> > Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.
> >
> > Kind Regards
> > Martell
> >
> >
> --
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now. http://goparallel.sourceforge.net/
> > ___
> > Mingw-w64-public mailing list
> > Mingw-w64-public@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
> >
>
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Kai Tietz
Patch looks fine to me.

Thanks,
Kai

2015-02-02 23:15 GMT+01:00 Martell Malone :
> Hi,
>
> Please review.
> Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.
>
> Kind Regards
> Martell
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>

--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] gfortran, open mp and floating point precision

2015-02-02 Thread Carl Kleffner
The Windows ABI - see https://msdn.microsoft.com/en-us/library/ms235286.aspx
- differes from the
System V ABI - see http://www.x86-64.org/documentation/abi.pdf.

MingW-W64 sets the x87 FPU control word register to extended precision. The
'standard' for Windows however is 'double precision'.  See
https://msdn.microsoft.com/en-us/library/ms235300.aspx.

On Windows newly started threads never inherit FPU register settings from
the master thread and set the FPU registers to the standard value. Thus you
can have different FPU settings in different threads. OpenBLAS i.e. has
some extra code to propagate the FPU settings. Look for 'CONSISTENT_FPCSR'
at https://github.com/xianyi/OpenBLAS.

Using extended precision with GCC can be tricky:
https://gcc.gnu.org/wiki/FloatingPointMath and
https://gcc.gnu.org/wiki/x87note. The latter link describes some gotchas
when using extended precision with GCC.

Cheers,

Carl


2015-02-02 6:34 GMT+01:00 K. Frank :

> Hi Pieter!
>
> This could be complete misinformation, or correct but
> not relevant.
>
> On Thu, Jan 15, 2015 at 12:57 PM,   wrote:
> > I wrote a test program in fortran and used gfortran 4.9.2 (tdm64-gcc
> 4.9.2)
> > ...
> > However for extended floating point precision off-diagonal elements of
> the
> > identity matrix for thread 0 are <> 0 with the expected magnitude, for
> > threads 1 to 3 they are a factor 1000 (!) larger and moreover identical
> to
> > those of the identity matrix in the double floating point precision
> > calculation.
> > ...
> > Where is the error?
>
> I have a vague recollection of a discussion (probably
> on this list) about start-up code writing the Intel x87
> floating-point control word to the floating-point processor.
>
> This was maybe something about setting a mode where
> extended precision (80-bit) was degraded to double
> precision (64-bit).
>
> If any of this is right (and not just a figment of my imagination),
> there was some talk of the floating-point control word start-up
> code getting called at thread start-up, so that even if your
> own initialization code in your main thread wrote the desired
> floating-point control word (e.g., to enable extended precision),
> this setting would not apply to other threads because they
> would get initialized with some default control word (hypothetically
> setting those threads to non-extended double precision).
>
> Again, this is a long shot, but I do seem to recall some discussion
> of floating-point control word start-up code from a month or two ago.
>
> > With regards
> > Pieter Bedijn - retired scientist and software developer
>
>
> Good luck.
>
>
> K. Frank
>
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] Add missing d3d GUID's

2015-02-02 Thread Martell Malone
Hi,

Please review.
Previously  dx11 and dxgi1.2  GUID's were missing from libuuid.

Kind Regards
Martell


0001-added-missing-d3d-GUID-to-libuuid.patch
Description: Binary data
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] dxgi 1.2 missing functions and defines patch

2015-02-02 Thread Martell Malone
Hey guys,

Here is the first of the 2 patches dx11 patches I hope to have merged
before 4.0 is tagged.

While i did rewrite the whole idl from scratch I didn't want to remove
jacek's copyright so I just appended my name to it.

There is one quesion I have about the patch

The function DuplicateOutput in IDXGIOutput1 is not available on WinRT but
I am not sure if I am able to #ifdef it out in the middle of the class
structure.

I made the naming conventions for all the functions match what was done for
dxgi.idl

Jacek as you seem to have the most experience on this could you give me
some feedback on this patch before the guys review it for commit :)

Many Thanks
Martell


0001-Add-missing-dxgi1.2-functions.patch
Description: Binary data
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Mass rebuild report for January 30 2015

2015-02-02 Thread Martell Malone
>
> If it's holding v4, then we should probably just commit it and not wait
> for Wine. Please commit the patch, but make sure it lands on Wine later,
> because otherwise it would disappear after the next sync to Wine.


Okay I'll submit them shortly for review :)

On Mon, Feb 2, 2015 at 10:19 AM, Jacek Caban  wrote:

>  On 02/01/15 20:27, Martell Malone wrote:
>
>  OK, will go ahead with v4.0.0 shortly if there are no objections.
>
> I'm trying to get d3d11 idl additions into wine atm which jacek will pull
> into mingw-w64.
>  VLC needs this for the new dx11-vout.
>  Would it be possible to hold off a day or two for this ?
>
>
> If it's holding v4, then we should probably just commit it and not wait
> for Wine. Please commit the patch, but make sure it lands on Wine later,
> because otherwise it would disappear after the next sync to Wine.
>
> Thanks,
> Jacek
>
>
> --
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Mass rebuild report for January 30 2015

2015-02-02 Thread Jacek Caban
On 02/01/15 20:27, Martell Malone wrote:
>
> OK, will go ahead with v4.0.0 shortly if there are no objections.
>
> I'm trying to get d3d11 idl additions into wine atm which jacek will
> pull into mingw-w64.
> VLC needs this for the new dx11-vout.
> Would it be possible to hold off a day or two for this ?

If it's holding v4, then we should probably just commit it and not wait
for Wine. Please commit the patch, but make sure it lands on Wine later,
because otherwise it would disappear after the next sync to Wine.

Thanks,
Jacek
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public