Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors and Warnings reported by the Intel analysis tool. #19

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 5 comments
Open

Comments

@GoogleCodeExporter
Copy link

There are several Intel compiler flags that will do static analysis of the code 
which will help to avoid/fix bugs.

“-diag-enable sc1” reports only diagnostics with a 
severity level of "critical"

“-diag-enable sc2” reports all diagnostics with a severity level of 
"critical" and "error"

“-diag-enable sc3” This will cause static analysis to report all 
diagnostics regardless of the severity level

I checked QUEST code. This is report for ggeom.F90 with “-diag-enable sc3”

I did not figure out how to make this report to look really nice in linux, so 
just raw pdf attached.
99 errors/warnings. It will be nice if we reduce this number.

From the Intel website:
"
In the case of legacy projects, ask the developers to submit new code only if 
they reduce the number of findings.
In the case of coding from scratch, allow no findings before uploading new code 
in your repository.
"

Original issue reported on code.google.com by iglovi...@gmail.com on 29 Dec 2013 at 2:37

Attachments:

@GoogleCodeExporter
Copy link
Author

I looked into quite a few of these. They all seem to be irrelevant and, in some 
case, plain wrong. Like
a variable claimed to be uninitialized when it was read from input a few lines 
earlier. Or a pointer
allocated in a subroutine A, used in a subroutine B contained in A, and claimed 
to be used before
being allocated.

Original comment by simone.c...@gmail.com on 2 Jan 2014 at 1:53

@GoogleCodeExporter
Copy link
Author

Revision d0226051e1a1 reduced number of warnings/errors to 97.

Original comment by iglovi...@gmail.com on 2 Jan 2014 at 2:13

@GoogleCodeExporter
Copy link
Author

Original comment by iglovi...@gmail.com on 2 Jan 2014 at 2:17

Attachments:

@GoogleCodeExporter
Copy link
Author

I agree. These warnings are not a big deal. Although I do not like warnings.

Usually:
[1] Some of these can be a hint of some bigger problem. 
[2] Wrong or irrelevant warnings tell me that structure of the code is not as 
good as it should be. (Parameters of the functions should be sent in some other 
way, structures should be defined a bit different, etc)

It is usually something that people discuss at:
http://fortran90.org/src/best-practices.html
http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html


For example in the last link they discuss approaches that can lead to some 
potential bugs with examples, and I think I've seen similar things in the QUEST 
source code. May be this Intel Static Analysis Tool, tries to point this out.

Anyway, this warning are not really that important, although I would be upset 
if their number will start growing.

Original comment by iglovi...@gmail.com on 2 Jan 2014 at 2:30

@GoogleCodeExporter
Copy link
Author

Revison cc56e18890a1 reduced number of warnings/errors to 95.

Original comment by iglovi...@gmail.com on 7 Feb 2014 at 11:41

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant