NCSA Home
Contact Us | Intranet | Search

Static Source Code Analysis Tools

Static source code analysis tools are available on NCSA High Performance computing systems as shown in the table below:

Machine
Fortran
C
IBM p690 (copper) ftnchek
lint
Xeon Cluster (tungsten) ftnchek
splint
SGI Altix (cobalt) ftnchek
splint
Intel64 cluster (abe) ftnchek
splint
IA-64 Linux Cluster (mercury) ftnchek
splint

Online man pages are available for those commands.  The ftnchek command can produce a subroutine call tree for fortran source code. Here's sample output from ftnchek and splint:

cu11:~/f77110% ftnchek -calltree fpi.f

FTNCHEK Version 3.3 November 2004

File
error opening include file mpif.h
fpi.f:
0 syntax errors detected in file fpi.f
Tree of subprogram calls:
MAIN
MPI_COMM_RANK
MPI_COMM_SIZE
MPI_FINALIZE
MPI_INIT
MPI_REDUCE

Warning: Subprogram MPI_INIT never defined
Invoked in module MAIN line 38 file fpi.f

[tuna ~/mpi]$ splint -weak cpi.c
Splint 3.0.1.7 --- 24 Jan 2003

cpi.c: (in function main)
cpi.c:15:9: Variable wild declared but not used
A variable is declared but never used. Use /*@unused@*/ in front of
declaration to suppress message. (Use -varuse to inhibit warning)

Finished checking --- 1 code warning