Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

run-time error M6201: MATH - exp: DOMAIN error

rezanabavi
Beginner
5,333 Views

I am working with compaq visual fortran 6.6. my program was written in F77(some part)and F90(some part). I put together. the program is big and the run takes 1.5 days. when I run the program this error is appeared after 1 day execution.

run-time error M6201: MATH
- exp: DOMAIN error

and some time the following error:

run-time error M6201: MATH
**: DOMAIN error




Forum: Intel Visual Fortran Compiler for Windows
Posted: Nov 22, 8:52 AM [GMT -8]
Post Subject: Re: view source code after exception durig debugging
Post author: nijhuis
It is possible to set breakpoints on array elements. Click the "Edit", "Breakpoints" menu items and click the "Data" tab and you can enter an array element ( name with subscript(s) ) at which the debugger has to stop when changed. Breaks on allocatable array elements can only be set after allocation of the array.

Guus
0 Kudos
5 Replies
anthonyrichards
New Contributor III
5,333 Views

Math Error M6201
'function' : _DOMAIN error
An argument to the given function was outside the domain of legal input values for that function. For example, the following statements generate this error:
result = sqrt(-1.0) // C statement
result = SQRT(-1.0) ! FORTRAN statement

In your case, the 'function' is 'exp'. I do not know what the acceptable 'domain' is for the IA32 Fortran function 'exp', but in MS Visual Basic, If the value of number in exp(number)exceeds 709.782712893, an error occurs.

0 Kudos
jimdempseyatthecove
Honored Contributor III
5,333 Views

Anthony,

I hope Steve or others at Intel will read my comments regarding this issue.

It would be nice if Intel and the other compiler an library writers would follow and documenta common programming practice that will aid the programmer in diagnosing such problems such as 'function': _DOMAIN error, and other program AB-END situations.

This is a relatively simple proceedure, which may be present, but not documented or easily found in the documentation.

The technique would be to provide a breakpoint symbol name of a null functionon which a user could place a break point and catch such problems early on (i..e. before the runtime systems nests down 10 levels into an error dump messaging system). Of particular annoyance is when a programmer (e.g. code in 3rd party library) contains a STOP statement. It would be nice if STOP, _DOMAIN error, etc... would all call the null function (with user break point) prior to mucking things in taking the program abort. This will give the user at least some means to better diagnose a problem. Other internal error conditions (file open, read/write, etc...) would also call the universal debug assist routine prior to dumping the error message.

This routine should also contain a meansfor the programmer to specify a return to application. e.g. from Dissassembly window the user could poke a return value to the null function which caused the program abort to abort (such as return from STOP). This provides the programmer the opportunity to better diagnose the problem.

Jim Dempsey

0 Kudos
g_f_thomas
Beginner
5,332 Views

In CVF you can trap domain errors and the like via MATHERQQ. IVF doesn't have this facility.

Gerry

0 Kudos
Jugoslav_Dujic
Valued Contributor II
5,332 Views
g.f.thomas:
In CVF you can trap domain errors and the like via MATHERQQ. IVF doesn't have this facility.

Because IVF now -- in my opinion correctly -- produces Infs and NaNs as results of math functions with out-of-domain arguments. You can debug these as normal floating-point exceptions (with an appropriate combination of /fpe:0 switches and properly set Debug/Exceptions).
0 Kudos
g_f_thomas
Beginner
5,332 Views

JugoslavDujic:

Because IVF now -- in my opinion correctly -- produces Infs and NaNs as results of math functions with out-of-domain arguments. You can debug these as normal floating-point exceptions (with an appropriate combination of /fpe:0 switches and properly set Debug/Exceptions).

Ditto for CVF. Additionally, because ofmatherr the f2003 IEEE floating point TR has long been available in CVF. It's still a no show in IVF. Anyways, the OP is using CVF, not IVF. I'd prefer to leave this oversulcated sward undisturbed.

Gerry

0 Kudos
Reply