next up previous contents
Next: Acknowledgements Up: NSPCG User's Guide Previous: Using NSPCG in Matrix

   
Installation Guide

This package is written in 1977 ANSI Standard Fortran in the interests of portability. However some changes will have to be made for different computers. The following changes are recommended.
1.
The timing routine TIMER uses the Fortran function SECOND to return the elapsed CPU time in seconds. For different computers, this may have to be changed. Also, there may be more accurate timing facilities available than SECOND.
2.
The value of the machine relative precision is contained in the variable SRELPR, which is set in the DFAULT subroutine. The relative precision SRELPR is the smallest positive machine number such that 1 + SRELPR is greater than 1. This and other default values may be permanently changed when the code is installed by changing their values in this subroutine. In particular, SRELPR must be changed for different computers. If the installer of this package does not know its value, an approximate value can be determined from a simple Fortran program given in the comment statements of subroutine DFAULT.
3.
KEYGS is a switch in DFAULT which may need to be changed for different vector computers. KEYGS indicates whether vectorized gather and scatter operations can be chained to other vector operations or whether they need to be done explicitly using workspace vectors.
KEYGS =1 if explicit gathering and scattering is needed for vectorization
   
=2 if vectorized gathering and scattering can be chained to other vector operations
As an example, if the loop
            DO 10 I = 1,N
               C(I) = C(I) + A(IA(I))
       10   CONTINUE
can be vectorized by the compiler, KEYGS should be set to 2. If the loop needs to be rewritten as
            DO 10 I = 1,N
               WKSP(I) = A(IA(I))
               C(I) = C(I) + WKSP(I)
       10   CONTINUE
for vectorization, KEYGS should be set to 1. KEYGS = 1 should be selected for the following computers:
CDC Cyber 205
Cray-1, Cray-1S, Cray-1M
Cray X-MPs without hardware gather/scatter
KEYGS = 2 should be selected for the following computers:
Cray X-MPs with hardware gather/scatter
Cray-2
All scalar computers
KEYGS will inform NSPCG if it needs to set aside workspace for gather and scatter operations.
4.
The routines VGATHI, VGATHR, VSCATI, and VSCATR contain Fortran implementations of gather and scatter instructions. For the CDC Cyber 205, the Fortran DO loops should be replaced by calls to Q8VGATHR and Q8VSCATR, which are commented out. For the Cray-1 and Cray X-MPs without hardware gather/scatter, the Fortran DO loops should be replaced by calls to GATHER and SCATTER in SCILIB. For vector machines with hardware gather/scatter, the Fortran DO loops should be used since they vectorize as they are.


next up previous contents
Next: Acknowledgements Up: NSPCG User's Guide Previous: Using NSPCG in Matrix