STATPACK overview¶
You will find several subdirectories under the STATPACK library directory: sources
, examples
, tests
, doc
,
interfaces
, makeincs
and myprograms
.
The content and use of these subdirectories are briefly described in this chapter.
sources directory¶
All the constants, variables, subroutines and functions available in the STATPACK library are organized and grouped in Fortran 90 modules. All the modules
available in the library are located in the sources
subdirectory of the STATPACK directory.
The table below gives a brief overview of the STATPACK modules:
|
|
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The content of each STATPACK module and the purpose of the public entities exported by this module are fully described in the chapter STATPACK reference manual. For more information on the use of a specific routine available in STATPACK, you must consult the reference section for the module exporting the routine or the appropriate STATPACK manual for this module.
The sources
subdirectory also contains the Fortran programs alphabet.f90
, test_kind.F90
and mach_char.F90
:
alphabet.f90
can be used for a simple check of your Fortran compiler. You can use this Fortran program as soon as you have built your ownmake.inc
file, as described in the section Basic installation. To compile and execute this program, simply execute the following make command:$ make alphabet
in the main STATPACK directory (e.g., in
$STATPACKDIR
) orsources
subdirectory. This program will simply display the ASCII characters on the standard output of the program (e.g., the screen).test_kind.f90
can be used to test and display informations on the different real/complex, integer and logical kind types available on your platform. You can use this Fortran program as soon as you have built your ownmake.inc
file, as described in the section Basic installation. To compile and execute this program, simply execute the following make command:$ make test_kind
in the main STATPACK directory (e.g., in
$STATPACKDIR
) orsources
subdirectory. Informations about the available integer, real and logical kind types available on your computer at the hardware level and their properties will be displayed on the standard output of the program (e.g., the screen).mach_char.f90
can be used to test and display detailed numerical properties of a specific real/complex kind type available at the hardware level on your computer. You can use this Fortran program as soon as you have built your ownmake.inc
file, as described in the section Basic installation. To compile and execute this program, simply execute the following make command:$ make mach_char
in the main STATPACK directory (e.g., in
$STATPACKDIR
) orsources
subdirectory. By default, the program will determine the parameters of the floating-point arithmetic system for double-precision real/complex data, which is available on all platforms, and will display these parameters on the screen. In order to obtain information about machine-specific parameters for another real/complex kind type, it is necessary to edit the filemach_char.f90
and to comment out all but one of the followinguse
statements, before compiling the program:! ! use The_Kinds, only : stnd=>sp ! use The_Kinds, only : stnd=>dp ! ! use The_Kinds, only : stnd=>qp ! ! use The_Kinds, only : stnd=>low ! ! use The_Kinds, only : stnd=>normal ! ! use The_Kinds, only : stnd=>extended
The following make commands are available in the sources
subdirectory to manage the STATPACK source code:
To create or update the library, enter the make command:
$ make lib
Alternatively, the make command:
$ make
without any arguments creates also the STATPACK library. The library is called lib
$(LIB)
.a, whereLIB
is specified in your$STATPACKDIR/make.inc
file.To create a shared version of the library, enter the make command:
$ make dynlib
The shared library is installed in the directory that you have specified in
DIRLIB
defined in your$STATPACKDIR/make.inc
file.On some systems, you can force the source files to be recompiled by entering the make command:
$ make lib FRC=FRC
To check the fortran syntax in a single module, for example the Hous_Procedures module in the
Module_Hous_Procedures.F90
, enter the make command:$ make Module_Hous_Procedures.check
This make command will work properly only if you have defined properly the Shell variable
CHECKFLAGS
in your$STATPACKDIR/make.inc
file.To check the fortran syntax in all STATPACK modules, enter the make command:
$ make check_all
This make command will work properly only if you have defined properly the Shell variable
CHECKFLAGS
in your$STATPACKDIR/make.inc
file.Finally, to clean the
sources
subdirectory after building the library, enter the make command:$ make clean
tests directory¶
The subdirectory tests
contains all the testing programs for the routines available in the STATPACK library.
The name of the test programs is determined by the STATPACK routine, which is tested by the program. As an illustration, the test program test_svd_cmp.F90
is the test program for the svd_cmp()
STATPACK subroutine.
Instructions for running these test programs can be found in the header of the makefile in this subdirectory.
The following make commands are available in the tests
subdirectory to compile/execute/manage the STATPACK test programs:
To see the list of all the test programs, enter the make command:
$ make list
To compile and run a particular test program in this list, enter the make command (for example):
$ make test_svd_cmp
The program and the results are printed on the screen and stored in the current directory (e.g.,
tests
) in the file namedtest_svd_cmp.output
.To run all the installation tests, enter the make command:
$ make test_install
Alternatively, the make command:
$ make
without any arguments runs also all the installation tests. The results of the tests are stored in the
tests
directory in the file namedtest_install.output
.Additional tests are available for some routines and can be performed by entering the make command:
$ make test_more
The results of these tests are stored in the
tests
directory in the file namedtest_more.output
.To see the list of all (test) programs which can be compiled in this directory, enter the make command:
$ make list_compil
To compile a particular test program in this list, enter the make command (for example):
$ make test_svd_cmp.compil
The executable is generated in the current directory and is called
a.out
.To clean the
tests
directory, enter the make command:$ make clean
examples directory¶
Many sample Fortran 95/2003 programs that illustrate the use of STATPACK routines are available in the examples
subdirectory of the STATPACK directory.
The name of the programs is determined by the STATPACK routine, whose use is illustrated by the program. As two illustrations, the program ex1_svd_cmp.F90
is the first example for the svd_cmp()
STATPACK subroutine and the program ex1_lapack_ormtr.F90 is the first example of the generic interface
ormtr()
for the LAPACK subroutines sormtr(), dormtr(), cormtr() and zormtr() (see the description of the
Lapack_interfaces module for more details).
Instructions for compiling and running these example programs can be found in the header of the makefile in this subdirectory.
The following make commands are available in the examples
subdirectory to compile/execute/manage the STATPACK example programs:
To see the list of all the example programs, enter the make command:
$ make list
To compile and run a particular example or program in this list, enter the make command (for example):
$ make ex1_svd_cmp
The program and the results are printed on the screen and stored in the current directory (e.g.,
examples
) in the file namedex1_svd_cmp.output
.To see the list of all (example) programs which can be compiled in this directory, enter the make command:
$ make list_compil
To compile a particular program in this list, enter the make command (for example):
$ make ex1_svd_cmp.compil
The executable is generated in the current directory and is called
a.out
To clean the
examples
directory, enter the make command:$ make clean
You can also put your own Fortran 95/2003 programs using the STATPACK library in the examples
subdirectory and use the above
make commands to compile easily these programs without the need to create your own makefile. However, it it better to use
the myprograms
subdirectory described below for this purpose.
doc directory¶
The subdirectory doc
contains some STATPACK documentation in different formats (e.g., pdf and html).
interfaces directory¶
The empty subdirectory interfaces
can be used, at the user option, to store the .mod
files generated by the compiler on
some systems (e.g., NAGWare, RS6K/IBM, LINUX, Mac OSX machines). See the section Basic installation for more details
on the possible use of this subdirectory.
makeincs directory¶
The subdirectory makeincs
contains examples and templates of make.inc
files for different compilers/machines, which can be useful
to build your own make.inc
file. See the section Basic installation for more details.
Templates are currently provided for the gfortran (make.inc.GNU
), ifort (make.inc.INTEL
), pgfortran (make.inc.PGI
), xlf95 (make.inc.IBM
)
and nagfor (make.inc.NAG
) compilers.
Some make.inc
examples really used on some machines are also provided.
myprograms directory¶
You can put your own Fortran 95/2003 programs using the STATPACK library in the subdirectory myprograms
.
See the following chapter Using the STATPACK library for more details.