You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Arithmetic error in calculating refraction for a metal
To Reproduce
Use NAG compiler on testopt_optics_drude without -ieee=full flag
Expected behavior
Unclear. I'd like to check what sort of error it is, NaN or Infinity, and check that that's expected behaviour.
Screenshots
Runtime Error: *** Arithmetic exception: Floating invalid operation - aborting
optics.f90, line 778: Error occurred in OD_OPTICS:CALC_REFRACT
optics.f90, line 135: Called by OD_OPTICS:OPTICS_CALCULATE
optados.f90, line 191: Called by OPTADOS
Aborted
Desktop (please complete the following information):
NAG compiler
Unclear if ifort/gfortran are also unhappy -- would have to check.
The text was updated successfully, but these errors were encountered:
From a quick look at the line in the code, I can see that there are possibilities for an arithmetic error - it could be divide by zero, or root of a negative numbers (signed zero?). Do we have a view on the intrinsic sqrt vs **0.5_dp. I would have assumed the intrinsic would be faster (although a optimising compiler might replace the power with the intrinsic). But I was wondering if the error message from the intrinsic might be nicer?
I flagged it because, when I get a minute, I also want to check the maths/algorithm behind it i.e. should the function go to Infinity / NaN etc... Sure I can make the code compile and run by setting the -ieee flag, but I'd like to check that's ok.
Describe the bug
Arithmetic error in calculating refraction for a metal
To Reproduce
Use NAG compiler on
testopt_optics_drude
without-ieee=full
flagExpected behavior
Unclear. I'd like to check what sort of error it is, NaN or Infinity, and check that that's expected behaviour.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: