run-time error M0:MATH -atan2: errors

run-time error M0:MATH -atan2: errors

Community Admin's picture

I have a fortran program which can run ALPHAVAX VM Unix well,but when I run it on window2000 with CVF6.5,it give the error message:
run-time error M0:MATH -atan2: errors
i can't find this error information by using CVF help.
what's the matter with this program?
thank!

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Community Admin's picture

just because:
kk=DATAN2(DIMAG(H(7))
but H(7)=(infinity,NaN)

Jugoslav Dujic's picture

Well, you probably didn't want to get a NaN there, did you? NaN comes from a 0./0. or Inf/Inf. I suggest you use the debugger and inspect why actually H(7) receives that value. If you still have the old system available, you could insert control PRINTs and see where the results start to differ.

Jugoslav

Jugoslav www.xeffort.com
Community Admin's picture

Thank!
Yes,just as you said.
But I don't know why it can run on alphavax well.

Jugoslav Dujic's picture

Now that's the right question :-). I can only offer a guess that you have a hidden bug somewhere in the code which revealed itself just now due to some inherent difference between the systems. It can be a false assumption about floating-point operations or input data, an uninitialized variable... the list is long. As I said, the only way to find out is to debug it (and comparison of intermediate results between the systems, if available, may be the best way if the code is complicated).

Jugoslav www.xeffort.com
Community Admin's picture

Thank, I agree with you.
I will tell him who ask me this question and let he try.
Thank you very much.

Login to leave a comment.