OpenMP and floating-point operations

General OpenMP discussion

Re: OpenMP and floating-point operations

Postby ftinetti » Mon Feb 11, 2013 7:08 am

Hi Heinz,

I checked the code and I didnt find a bug or an not initialized variable or anything else. No reductions are present. The problems seems to be caused really by the kind floatingpoint-opreations are done.

Do you have a (reduced yet complete) example to play around with (compile, run)? It's good you examined the code, but I think it's unlikely the compiler changes the kind of floating point operations... Maybe something along the lines of what Mark suggests is happening, but in any case, the problem seems to be ill-conditioned (or something similar to), in which case parallel computing exposed it, hopefully in the early stages...

HTH,

Fernando.
ftinetti
 
Posts: 481
Joined: Wed Feb 10, 2010 2:44 pm

Re: OpenMP and floating-point operations

Postby HeinzM » Mon Feb 11, 2013 9:46 am

Hi Mark,

I didnt know that 80bit precision is used internally. May be that there is the problem. I do cfd-computations, and using Kind=8 variables has well worked for many many years. This is the first time such a problem arises. I also asked the Intel-premium-support. They think about it, since over a week ;-)

Thanks a lot!
Best regards,
Heinz
HeinzM
 
Posts: 15
Joined: Sat Nov 03, 2012 7:22 am

Re: OpenMP and floating-point operations

Postby HeinzM » Mon Feb 11, 2013 10:02 am

Hi Fernando

ftinetti wrote:Do you have a (reduced yet complete) example to play around with (compile, run)?

It is a finite-element-code for computing water flow over floodplains. The problem occours while assembling the element-matrices. A few hundred show the problem, but there are hundred-thousand. So reducing the code will likely not show the problem. I dont believe you want to walk through the hole code, right? :)


ftinetti wrote:It's good you examined the code, but I think it's unlikely the compiler changes the kind of floating point operations... Maybe something along the lines of what Mark suggests is happening, but in any case, the problem seems to be ill-conditioned (or something similar to), in which case parallel computing exposed it, hopefully in the early stages...

If you are right, I have a hidden problem and no idea how to find it, not even where to look for .....

Thank you and best regards,
Heinz
HeinzM
 
Posts: 15
Joined: Sat Nov 03, 2012 7:22 am

Re: OpenMP and floating-point operations

Postby ftinetti » Mon Feb 11, 2013 11:25 am

Hi again,

A few hundred show the problem, but there are hundred-thousand. So reducing the code will likely not show the problem. I dont believe you want to walk through the hole code, right?

Hmmm... I don't know, feel free to send the code, I would like to see it, anyway. I do not guarantee any result, of course...

ftinetti wrote:
It's good you examined the code, but I think it's unlikely the compiler changes the kind of floating point operations... Maybe something along the lines of what Mark suggests is happening, but in any case, the problem seems to be ill-conditioned (or something similar to), in which case parallel computing exposed it, hopefully in the early stages...

If you are right

It's a big "if" ...
I have a hidden problem and no idea how to find it, not even where to look for .....

You are right, and it is a bug-like behavior.

Fernando.
ftinetti
 
Posts: 481
Joined: Wed Feb 10, 2010 2:44 pm

Re: OpenMP and floating-point operations

Postby Oldboy » Thu Feb 14, 2013 3:41 am

The errors Heinz has found are not small indeed. Here are examples of smaller errors:

http://people.sc.fsu.edu/~jburkardt/f_s ... output.txt
http://people.sc.fsu.edu/~jburkardt/f_s ... output.txt
http://people.sc.fsu.edu/~jburkardt/f_s ... output.txt
http://en.wikipedia.org/wiki/IEEE-754
Observe that gfortran and intelfortran don't show the same errors using omp.
The serial version is only gfortran.
In iEEE-754 5 rounding rules are specified. I have not seen any compiler directives how to use one of them.
Oldboy
 
Posts: 17
Joined: Wed Oct 31, 2012 2:39 am

Previous

Return to Using OpenMP

Who is online

Users browsing this forum: Google [Bot] and 4 guests