Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: compiler/li...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 6 Topic 8168 of 8908
Post > Topic >>

Re: compiler/linker flags to abort array assignment (non-standard) use during run time

by Gordon Sande <g.sande@[EMAIL PROTECTED] > Apr 23, 2008 at 06:30 PM

On 2008-04-23 14:53:14 -0300, Fei Liu <fei.liu@[EMAIL PROTECTED]
> said:

> Michael Metcalf wrote:
>> "Fei Liu" <fei.liu@[EMAIL PROTECTED]
> wrote in message
news:funrc4$uv7$1@[EMAIL PROTECTED]
>>> Hello Group,
>>>   I am trying to come up with a list of compiler/linker options so
that 
>>> when the following code is run, a run time failure is generated. Or at

>>> least a compile time diagnosis is re****ted.
>>> 
>>>   The target compiler is Intel ifort. I would like to catch as many 
>>> non-standard coding practice as possible at both compile time and run 
>>> time.
>>> 
>>>   I currently use '-std -warn all -WB -Winline -traceback' but it does

>>> not catch the error in the following code.
>>> 
>> In the general case your 'error' cannot be detected at either compile- 
>> or run-time, other than by wearing your seat-belt:
>> 
>> if(size(x) /= size(y)) print *, 'Ring the alarm bells!'
>> 
>> Regards,
>> 
>> Mike Metcalf
>> 
> Thanks, in general I am looking for a set of stricter compiler/linker 
> options that will help diagnose potential problems.
> 
> Fei

There is always the option of usng a compiler which is intended to sup****t
debugging. Multiple compilers is always a good way to catch dodgy coding.

The Salford/Siverfrost compiler for Windows is one. Another is NAGWare V5
which sup****ts multiple platforms. Salford is free for personal use. NAG
is not. Lahey/Fujitsu is also good and not free. Windows and Linux if I
recall correctly. Checking for out of range subscripts for assumed size
("*" form) arrays, and some other tings, may not be compatible with third
party precompiled libraries because of the extra information that is
carried at run time.

Turning subscript checking and undefined variable checking on will cause
things
to run slower. Some folks prefer slow correct results to fast wrong ones.
Once the code is fully debugged you are free to turn the training wheels
off.
 




 6 Posts in Topic:
compiler/linker flags to abort array assignment (non-standard) u
Fei Liu <fei.liu@[EMAI  2008-04-23 13:24:36 
Re: compiler/linker flags to abort array assignment (non-standar
"Michael Metcalf&quo  2008-04-23 17:39:24 
Re: compiler/linker flags to abort array assignment (non-standar
Fei Liu <fei.liu@[EMAI  2008-04-23 13:53:14 
Re: compiler/linker flags to abort array assignment (non-standar
Gordon Sande <g.sande@  2008-04-23 18:30:53 
Re: compiler/linker flags to abort array assignment (non-standar
Tobias Burnus <burnus@  2008-04-23 11:33:28 
Re: compiler/linker flags to abort array assignment (non-standar
Fei Liu <fei.liu@[EMAI  2008-04-23 15:37:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 8:25:53 CST 2008.