MODULE Select_ParametersΒΆ

Module Select_Parameters provides a convenient way of selecting:

  • the precision (e.g., the stnd and extd real kind types) required for the computations in STATPACK
  • the size of integer (e.g., the i1b, i2b, i4b and i8b integer kind types) or logical (e.g., the lgl logical kind type) constants and variables used in STATPACK
  • the default printing unit
  • the block size for blocked algorithms in modules Utilities, Lin_Procedures, FFT_Procedures, QR_Procedures, Random, Eig_Procedures and SVD_Procedures
  • the parameters for OpenMP compilation
  • the parameters for crossover from serial to parallel algorithms for routines in module Utilities
  • the parameters for the STATPACK testing programs
  • the location of the urandom device on your system if it exists, which can used to seed the STATPACK random generators in module Random in an optimal fashion

In order to change the default kind types and make your own choice for the above parameters, you must edit the source file Module_Select_Parameters.F90 and follow the instructions in this file, as detailed below:

!
! USED MODULES
! ============
!
! ----------------------------------------------------------------------
! By simply ensuring that a leading '!' appears on all but exactly one !
! of the following use statements, and then recompiling all routines,  !
! the size of integer variables can be changed.                        !
! No harm will be done if short integers are made the same as i4b or   !
! i8b integers.                                                        !
! ----------------------------------------------------------------------
!
use The_Kinds, only : i1b      , i2b      , i4b      , i8b
!
! use The_Kinds, only : i1b=>i4b1, i2b=>i4b2, i4b      , i8b
!
! use The_Kinds, only : i1b=>i4b1, i2b=>i4b2, i4b      , i8b=>i4b8
!
! use The_Kinds, only : i1b=>i8b1, i2b=>i8b2, i4b=>i8b4, i8b
!
! use The_Kinds, only : i1b      , i2b      , i4b=>i8b4, i8b
!
!
! -----------------------------------------------------------------------
! By simply ensuring that a leading '!' appears on all but exactly one  !
! of the following use statements, and then recompiling all routines,   !
! the precision of an entire real or complex computation can be altered.!
!                                                                       !
! A few computations are preferably done in higher precision 'extd'. So,!
! the kind type 'extd' should be such that the underlying hardware will !
! select a higher precision for kind 'extd' than for kind 'stnd', if    !
! this is feasible.  If a higher precision is not readily available,    !
! the same value may be used as for 'stnd'.                             !
! -----------------------------------------------------------------------
!
! use The_Kinds, only : stnd=>sp,  extd=>dp
!
! use The_Kinds, only : stnd=>dp,  extd=>qp
!
! use The_Kinds, only : stnd=>sp,  extd=>sp2
!
use The_Kinds, only : stnd=>dp,  extd=>dp2
!
! use The_Kinds, only : stnd=>qp,  extd=>qp2
!
! use The_Kinds, only : stnd=>low,     extd=>normal
!
! use The_Kinds, only : stnd=>normal,  extd=>extended
!
! use The_Kinds, only : stnd=>low,     extd=>low2
!
! use The_Kinds, only : stnd=>normal,  extd=>normal2
!
! ----------------------------------------------------------------------
! By simply ensuring that a leading '!' appears on all but exactly one !
! of the following use statements, and then recompiling all routines,  !
! the size of logical variables can be changed.                        !
! ----------------------------------------------------------------------
!
use The_Kinds, only : lgl=>logic
!
! use The_Kinds, only : lgl=>logic0
!
! use The_Kinds, only : lgl=>logic1
!
! use The_Kinds, only : lgl=>logic2
!
! use The_Kinds, only : lgl=>logic4
!

Similarly, the default values for the other parameters specified in module Select_Parameters can be changed or tuned for your computer at your convenience. For example, tuning specifically the default block sizes of the linear algebra routines included in STATPACK for your computer will lead to significant speed improvements in most cases. See the file Module_Select_Parameters.F90 for more details.

In order to use one of these kind types or other parameters, you must include an appropriate use Select_Parameters or use Statpack statement in your Fortran program, like:

use Select_Parameters, only: lgl, i4b, stnd

or:

use Statpack, only: lgl, i4b, stnd
Flag Counter