Quadruple Precision
Eigenvalue
Calculation Library

QPEigen Ver.1.0

User’s ManualFeb, 2015
Japan Atomic Energy Agency

Contents
1

Overview......................................................................................................................... 1

2

Matrix diagonalization .................................................................................................. 2

3

Quadruple precision algorithm..................................................................................... 2

4

References ...................................................................................................................... 3

5

Directory structure ........................................................................................................ 3

6

Required software.......................................................................................................... 4

7

Installation..................................................................................................................... 48

Verification and performance evaluation programs.................................................... 6

9

Sample programs ........................................................................................................... 6

10

Subroutine details ......................................................................................................... 62

1 Overview
The R&D Office of Simulation Technology at the Center for Computational Science &e-Systems in the Japan Atomic Energy Agency has been engaged in research anddevelopment (R&D) for computational techniques relevant to one of the R&D targets in
its Mid-Term Plan for the second mid-term, "developing high-precision simulation
technologies that can be used for clarification of degradation phenomena of thestructural materials of a nuclear reactor, prediction of the material properties offuel-related actinide compounds, and clarification of the relationship between the
structures and functions of high efficiency thermoelectric materials, electric power
supply materials, and superconducting materials." In the aforementioned plan, it is acommon challenge of computational science to develop numerical calculation techniques
for use in the study of material properties, and it is indispensable to develop methods toaccurately calculate an electronic state based on quantum mechanics (quantum
many-body problem). In order to accurately solve a quantum many-body problem, a verylarge degree of freedom must be handled without approximation; therefore, it isnecessary to perform large-scale numerical calculations while maintaining sufficientprecision. At present, large-scale computation, such as solving a quantum many-bodyproblem, is made possible by using a parallel computer. As long as the total amount of
the available memory space collected from each processor is sufficiently large, aproblem as large as the computational resources allow is approachable. In contrast, asignificant amount of computational error accumulates during an actual large-scalecalculation for obtaining accurate quantum states because an enormous number ofoperations is required to do so. (A computer calculates with a certain number ofsignificant digits. In every calculation, a rounding error is added. The rounding errors
accumulate as the number of calculations increases.)
Until recently, the scale of simulations was not sufficiently large to be problematic interms of error, but it has been pointed out that, when a simulation that requires a verylarge scale computer such as the K computer to run at its maximum performance isconducted, the rounding errors may add up significantly, and the simulation result may
lose most of its significant digits. (It was actually observed that the result of an
eigenvalue problem that took all 4096 CPU nodes of a previous version of the Earth
Simulator to calculate had only a couple of significant digits.)
Under the situation described above, extending an eigenvalue calculation routine, oneof the routines that perform basic operations and are used frequently in computer1

simulations, to quadruple precision is an indispensable R&D activity for facilitating
high-precision very-large-scale parallel simulations in the future. The priority of thisR&D activity can be judged as very high because this problem is universal andapplicable to all large-scale simulations. Extending a routine to quadruple precision has
already been proved effective in our project to convert Basic Linear Algebra
Subprograms (BLAS) to quadruple precision, which was conducted prior to this project.
We have developed EigenK, a double precision version of an eigenvalue calculation
library used for calculating the eigenvalues and eigenvectors of a real symmetric matrix
and a Hermitian matrix. When the eigenvalues and eigenvectors of a symmetric matrix
are calculated with the EigenK library, it is possible to select whether to use thetridiagonal matrix algorithm or the pentadiagonal matrix algorithm.
In this work, we present three libraries, which are the quadruple precision version of
the EigenK library routines. The first is the quadruple precision eigenvalue calculation
library, which uses the tridiagonal matrix algorithm to calculate the eigenvalues andeigenvectors of a real symmetric matrix (hereinafter referred to as "QPEigen_s library").
The second is the "QPEigen_sx library." It is essentially similar to the QPEigen_s
library, except for the fact that it uses the pentadiagonal matrix algorithm. The third is
the “QPEigen_h library.” This library calculates the eigenvalues and eigenvectors of a
Hermitian matrix with the tridiagonal matrix algorithm.
This document describes how to use the QPEigen_s,QPEigen_sx and QPEigen_h library(hereinafter collectively referred to as QPEigen libraries).

2 Matrix diagonalization
Matrix diagonalization is essentially equivalent to eigenvalue calculation and isfrequently used in structural analysis and quantum mechanics calculations. Eigenvalue
calculation is a process of calculating an eigenvalue
when a matrix

and eigenvector

that satisfy

is given. QPEigen_s and QPEigen_sx are libraries used for

calculating the eigenvalues of a real symmetric matrix. When A is a Hermitian matrix,
QPEigen_h can be used.

3 Quadruple precision algorithm
IEEE 754- compliant quadruple precision (128 bit) floating point operations havealready been implemented in some languages including the latest Fortran. However,2hardware has not yet been optimized for those operations, and they are often executed
as arbitrary precision calculations. As a result, their calculation speed is extremely slow
compared to double precision operations.
In order to improve both the precision and the speed of the calculation, QPEigen
libraries use the double-double algorithm proposed by D.H. Bailey. In this algorithm,
one high-precision number is represented by a combination of two double precision
numbers, and a quadruple precision operation is implemented by combining double
precision operations. The range and precision of the numeric representation used in the
double-double algorithm is slightly worse than those of genuine quadruple precision but
is still almost double that of standard double precision. This algorithm allows
calculations on such high-precision numbers using just a combination of double
precision operations and therefore is highly effective for implementing a large-scale
high-precision simulation.

4 References
Bailey, H.D. High-Precision Software Directory.
http://crd-legacy.lbl.gov/~dhbailey/mpdist.
Susumu Yamada, Narimasa Sasa, Toshiyuki Imamura, and Masahiko Machida:“Introduction to quadruple precision basic linear algebra routines QPBLAS and its
application,” IPSJ SIG Technical Report, Vol. 2012-HPC-137, No. 23, pp. 1-6, 2012.

5 Directory structure
The directory structure in the medium is described below.
There are three top directories, Eigen_s-version, Eigen_sx-version, and Eigen_h-version,corresponding to each of the libraries.
Eigen_s-version has the following subdirectories. The other libraries also have similar
directory structures.

Directory name

Description

ddmpi

Stores a set of quadruple precision (DD) MPI communication
library files including source files.

3

ddblasStores a set of DDBLAS files including source files.

ddlapack

Stores a set of DDLAPACK files including source files.

ddscalapack

Stores a set of DDScaLAPACK files including source files.

ddeigen_s

Stores a set of DDEigen_s files including source files.

ddeigen_s_test

Stores a set of programs that run quadruple precision (DD) tests.

eigen_s

Stores a set of double precision Eigen_s files including source files.

eigen_s_test

Stores a set of programs that run double precision Eigen_s tests.

sampleStores a set of programs that run quadruple precision (DD) sample
routines.

benchStores a set of programs that run quadruple precision (DD)benchmark routines.

verifyStores a set of programs that run quadruple precision (DD)verification routines.

6 Required software
The QPEigen library uses DDBLAS, BLAS, quadruple precision ScaLAPACK(hereinafter "DDScaLAPACK"), original ScaLAPACK, quadruple precision LAPACK(hereinafter "DDLAPACK"), original LAPACK, and the quadruple precision MPI
communication library.
Therefore, you must specify the appropriate options to link DDBLAS, DDScaLAPACK,
and DDLAPACK when you link (when load modules are created). Those options are
specified in the configure command.

7 Installation
Enter the following commands to a terminal to create a Makefile that matches a user
environment and then compile.
(The following examples are for QPEigen_s. For the other libraries, replace _s with theappropriate suffixes.)
tar xzf QPEigen_s-version.tar.gz
cd QPEigen_s-version./configure options

4

Make

The major options you may consider using in the configure command and their
meanings are as follows.
FC=f90_compiler

Specifies the Fortran compiler.

CC=c_compiler

Specifies the C compiler.

FCFLAGS=options

Specifies Fortran compile options.
Specifies parallel computation andoptimization settings.

CFLAGS=options

Specifies C compile options.

LDFLAGS=options

Specifies link options.

--prefix=path

Changes the install directory.

--disable-openmp

Disables parallel processing via OpenMP.
If this option is not specified, parallel
processing is enabled using OpenMP.

Examples of the minimum options of the configure command necessary for compile
are as follows.
Example: When GNU C and GNU Fortran are used./configure CC=mpicc FC=mpif90

Example: When Intel C and Intel Fortran are used./configure CC=mpiicc FC=mpiifort CFLAGS="-O2" ¥--disable-openmp LIBS="-L/usr/lib/gcc -lgfortran"

The following list shows options for the make command.
Make

Simple "make" is the same as "make all".

make allCompiles all source codes.

make lib

Compiles only the libraries.
Compiles only the test programs.

make test

Note that if the lib folder does not contain dependent
libraries (ddblas, blas, lapack, and scalapack), an error is
output and then stops.

5If other dependent libraries (ddmpi, ddblas, ddlapack,ddscalapack, and ddeigen_s ...), which are included in the
package, cannot be found, "make lib" is automatically
executed.
make sample

Compiles sample programs.

make benchCompiles benchmark programs.

make verify

Compiles verification programs.

make eigen_s_test

Compiles only eigen_s_test.

make clean

Deletes all compiled files.

make clean-lib

Deletes all files related to libraries.

make clean-test

Deletes all files related to test programs.

make clean-[programs]

Deletes

all

files

relatedtothespecific

programs(sample,bench verify,eigen_s_test…).
If the make is successful, the following libraries and programs are created.
ddlapack/libddlapack.a

DDLAPACK library

ddmpi/libMpifdd1.a

DDMPI library

ddmpi/libMpifdd2.a

DDMPI library

ddscalapack/libddscalapack.a DDScaLAPACK libraryeigen_s/libEigen_s.a

Double precision Eigen libraryddeigen_s/libddEigen_s.a

Double-double quadruple precision Eigen libraryeigen_s_test/test_frank_d

Double precision Frank matrix eigenvalue
verification program

eigen_s_test/test_random_d

Double precision random matrix eigenvalue
verification program

ddeigen_s_test/test_frank_d

Double-double quadruple precision Frank matrix
eigenvalue verification program

ddeigen_s_test/test_random_d Double-double quadruple precision randommatrix eigenvalue verification program
sample/frank5_sample_dd

Sample program for calculating the eigenvaluesof the Frank matrix of order 5.

sample/hilbert5_sample_dd

Sample program for calculating the eigenvaluesof the Hilbert matrix of order 5.

verify/ddeigen_s_verify

Verification program for calculating eigen values

6and eigen vectors of the real symmetric matrix.
bench/bench_frank_matrix

Benchmarkprogramforcalculatingtheeigenvalues of the Frank matrix.
bench/bench_randam_matrix

Benchmarkprogramforcalculatingtheeigenvalues of the Randam data matrix.

8 Verification and performance evaluation
programs
After you follow the procedure in 7 and finish the compile process, enter the following
commands.
(The following examples are for QPEigen_s. For the other libraries, replace _s with theappropriate suffixes)
cd ddeigen_s_test./test_frank_dd (executing the Frank matrix test)./test_random_dd (executing the random matrix test)

When you execute a test program, the accuracy of the calculation is output to thestandard output. You can determine whether a calculation is performed in quadruple
precision based on the accuracy of the calculation. The accuracy of the calculation is
calculated as follows.
(Accuracy of calculation) = max Axn − wn xnｗ: Eigenvalues calculated by numerical solution

A: Matrix set up for precision verificationxn: Eigenvectors calculated by numerical solutionnFigure 8-1 shows an example of the standard output. The output of the accuracy of thecalculation is shown in the red box.

7

Figure 8-1 Example of Standard Output after Executing a Test Program
For information about the procedure for calling each routine and a description of thearguments, see 0.

9 Sample programs
The sample directory contains some QPEigen sample programs written in Fortran77.
frank5_sample_dd

Diagonalizing the Frank matrix of order 5 in double-double
quadruple precisionhilbert5_sample_dd

Diagonalizing the Hilbert matrix of order 5 in double-double
quadruple precision

9.1 Diagonalizing the Frank matrix (frank5_sample_dd)
Frank matrices are ill-conditioned matrices with known eigenvalues and are used in abenchmark test for the numerical calculation of eigenvalues. The Frank matrix of order
5 is as follows.

A quadruple precision matrix

is given by substituting the elements of theFrank matrix for the high word and 0.0d for the low word. The cstab_get_optdim
subroutine is called beforehand to obtain the size of the necessary work area. The
ddmatrix_adjust_s subroutine is called to copy the matrix to the work area, and thenthe ddeigen_* subroutine is called to calculate the eigenvalues and eigenvectors.

9.2 Diagonalizing the Hilbert matrix (hilbert5_sample_dd)
Hilbert matrices are typical badly conditioned matrices that are often used inbenchmark tests for numerical calculations. Hilbert matrix of order 5 is as follows.

8

is given by substituting the elements of the

A quadruple precision matrix

Hilbert matrix as the results of quadruple precision divisions for the high word and low
word. The cstab_get_optdim subroutine is called beforehand to obtain the size ofnecessary work area. The ddmatrix_adjust_s subroutine is called to copy the matrix to
the work area, and then the ddeigen_s subroutine is called to calculate the eigenvalues
and eigenvectors.

9.3 Execution of sample programs
Those sample programs have already been compiled during the make, and you can, forexample, execute frank5_sample_dd by entering as follows.
(The following examples are for QPEigen_s. For the other libraries, replace _s with theappropriate suffixes)
cd sample./frank5_sample_dd

If you want to compile this program yourself, perform, for example, the following.
mpiifort frank5_sample_dd.f -I../ddeigen_s ¥../ddeigen_s/libddEigen_s.a ../ddscalapack/libddscalapack.a ¥../ddlapack/libddlapack.a ¥../ddmpi/libMpifdd1.a ../ddmpi/libMpifdd2.a ¥../../lib/libddblas.a ../../lib/libscalapack.a ¥../../lib/liblapack.a ../../lib/libblas.a

The source code of the sample program "frank5_sample_dd.f" is as follows.

program frank5_sample_dd
use ddcommunication_s, only : eigen_init&, eigen_free

9implicit double precision (a-h,o-v,x-z)

double precision, allocatable :: ah(:,:), al(:,:)
double precision, pointer :: bh(:), bl(:)
double precision, pointer :: zh(:), zl(:)
double precision, pointer :: wh(:), wl(:)
logical iexist!
include 'mpif.h'include 'trd.h'!
call mpi_init(ierr)call mpi_comm_rank(mpi_comm_world,i$inod,ierr)call mpi_comm_size(mpi_comm_world,i$nnod,ierr)n=5

allocate(ah(n,n),al(n,n))call eigen_init(2)NPROW = size_of_col
NPCOL = size_of_row
nx = ((n-1)/NPROW+1)
call CSTAB_get_optdim(nx, 2, 1, 2, nm)!

call CSTAB_get_optdim(nx, 6, 16*4, 16*4*2, nm)
call eigen_free(0)

!

NB

= 32

NB

= 64+32

nmz = ((n-1)/NPROW+1)
nmz = ((nmz-1)/NB+1)*NB+1
nmw = ((n-1)/NPCOL+1)
nmw = ((nmw-1)/NB+1)*NB+1

larray = MAX(nmz,nm)*nmw

allocate( bh(larray), bl(larray),zh(larray),zl(larray),10

&

wh(n),wl(n), stat=istat)if(istat.ne.0) thenprint*,"Memory exhausted"call flush(6)
stop
endif

ah(1,1:5) = (/ 5.0d0, 4.0d0, 3.0d0, 2.0d0, 1.0d0 /)ah(2,1:5) = (/ 4.0d0, 4.0d0, 3.0d0, 2.0d0, 1.0d0 /)ah(3,1:5) = (/ 3.0d0, 3.0d0, 3.0d0, 2.0d0, 1.0d0 /)ah(4,1:5) = (/ 2.0d0, 2.0d0, 2.0d0, 2.0d0, 1.0d0 /)ah(5,1:5) = (/ 1.0d0, 1.0d0, 1.0d0, 1.0d0, 1.0d0 /)al(1,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /)al(2,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /)al(3,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /)al(4,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /)al(5,1:5) = (/ 0.0d0, 0.0d0, 0.0d0, 0.0d0, 0.0d0 /)call ddmatrix_adjust_s(n, ah, al, bh, bl, nm)

call ddeigen_s(n, bh, bl, nm, wh, wl, zh, zl, nm, m, 1)

write(*,*) 'EigenValue=', whdeallocate(ah,al)deallocate(bh,bl)deallocate(zh,zl)
deallocate(wh,wl)*call MPI_Finalize(ierr)end

1110 Subroutine details
Table 1 shows a list of the routine modules in the QPEigen_s library.

Table1. Subroutines of QPEigen_s
Routine name

Function
Calculating the eigenvalues and eigenvectors of a real symmetricddeigen_s

matrix by tridiagonalizing the matrix using the Householder
method. Executes a series of actions: tridiagonalization,
eigenvalue calculation, and eigenvector calculation.

ddeigen_trd

Tridiagonalizes a real symmetric matrix using HouseHolder
tridiagonalization.
Calculates the eigenvalues of an input matrix using theddeigen_dc

divide-and-conquer algorithm if the input matrix is a tridiagonal
matrix obtained by HouseHolder tridiagonalization of a real
symmetric matrix.

ddeigen_tbk

Calculates the eigenvectors of the tridiagonal matrix obtained by
HouseHolder tridiagonalization of a real symmetric matrix.
The DDEigen library uses two-dimensional cyclic distribution.

ddmatrix_adjust_s

This conversion routine is used to set up the data distribution of amatrix to support cyclic distribution. This routine must be called
before using this library.

ddcommunication_s

Module used for MPI communication

12

Table 2 shows a list of the routine modules in the QPEigen_sx library.

Table2. Subroutines of QPEigen_sx
Routine name

Function
Calculating the eigenvalues and eigenvectors of a real
symmetric matrix by pentadiagonalizing the matrix using theddeigen_sx

NarrowBandReduction method. Executes a series of actions:pentadiagonalization, eigenvalue calculation, and eigenvector
calculation.

ddeigen_prd

Pentadiagonalizes a real symmetric matrix using
NarrowBandReduction pentadiagonalization.
Calculates the eigenvalues of an input matrix using theddeigen_dcx

divide-and-conquer algorithm if the input matrix is apentadiagonal matrix obtained by NarrowBandReduction
pentadiagonalization of a real symmetric matrix.
Calculates the eigenvectors of the pentadiagonal matrix

ddeigen_pbk

obtained by NarrowBandReduction pentadiagonalization of areal symmetric matrix.
The DDEigen library uses two-dimensional cyclic distribution.

ddmatrix_adjust_sx

This conversion routine is used to set up the data distribution ofa matrix to support cyclic distribution. This routine must be
called before using this library.

ddcommunication_sx

Module used for MPI communication

13

Table 3 shows a list of the routine modules in the QPEigen_h library.

Table3. Subroutines of QPEigen_h
Routine nameddeigen_hddeigen_hrd
ddeigen_dch
ddeigen_hbk

Function
Calculating the eigenvalues and eigenvectors of a Hermitianmatrix.
Diagonalizes a Hermitian matrix.
Calculates the eigenvalues of an input matrix using thedivide-and-conquer algorithm.
Calculates the eigenvectors of the matrix.
The DDEigen library uses two-dimensional cyclic distribution.

ddmatrix_adjust_h

This conversion routine is used to set up the data distribution ofa matrix to support cyclic distribution. This routine must be
called before using this library.This routine is used for real data.

ddmatrix_adjust_hi

This routine is used for imaginary data.

ddcommunication_h

Module used for MPI communication

14

Routine nameddeigen_ｓ
Calculating the eigenvalues and eigenvectors of a real symmetricmatrix by tridiagonalizing the matrix using the Householder method.
Function
Executes a series of actions: tridiagonalization, eigenvalue
calculation, and eigenvector calculation.
Specification
ddeigen_s(n, ah, al, lda, wh, wl, zh, zl, ldz, m, ifl)
Arguments
Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of quadruple precision realahdoubleimatrixLow word of quadruple precision realaldoubleimatrixlda
Size of array A
integeriwhHigh word of eigenvalues
doubleowl
Low word of eigenvalues
doubleozhHigh word of eigenvectors
doubleozl
Low word of eigenvectors
doubleoldz
Size of array Z
integerimBlocking factor
integeriabout 32 to 128
ifl
Option for output eigenvectors
integeri
0 or 1
Routine nameddeigen_trd
Tridiagonalizes a real symmetric matrix using HouseHolder
Function
tridiagonalization
Specification
ddeigen_trd(n, ah, al, lda, dh, dl, eh, el, m)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of quadruple precision realahdoubleimatrixLow word of quadruple precision realaldoubleimatrixlda
Size of array A
integeridhHigh word of diagonal elements
doubleodl
Low word of diagonal elements
doubleoehHigh word of subdiagonal elements
doubleoel
Low word of subdiagonal elements
doubleomBlocking factor
integeriRoutine name
Functionddeigen_dc
Calculates the eigenvalues of an input matrix using thedivide-and-conquer algorithm if the input matrix is a tridiagonal
matrix obtained by HouseHolder tridiagonalization of a real
symmetric matrix.
ddeigen_dc(n, wh, wl, eh, el, zh, zl, ldz, info)

Specification
Argu
ment DescriptionssnDimension of a matrix
whHigh word of eigenvalueswl
Low word of eigenvaluesehHigh word of subdiagonal elements

i/ointeger
doubledoubledouble1iooiRemarks

el
zh
zl
ldz
info

Low word of subdiagonal elements
High word of eigenvectors
Low word of eigenvectors
Size of array Z
Error number

doubledoubledoubleinteger
integeriooioRoutine nameddeigen_tbk
Calculates the eigenvectors of the tridiagonal matrix obtained by
Function
HouseHolder tridiagonalization of a real symmetric matrix.
Specification
ddeigen_tbk(n, ah, al, lda, zh, zl, ldz, eh, el, m)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriahHigh word of the matrix
doubleial
Low word of the matrix
doubleilda
Size of array A
integerizhHigh word of eigenvectors
doubleozl
Low word of eigenvectors
doubleoldz
Size of array Z
integeriehHigh word of subdiagonal components doubleiel
Low word of subdiagonal components
doubleimBlocking factor
integeriRoutine nameddmatrix_adjust_s
The DDEigen library uses two-dimensional cyclic distribution.
This conversion routine is used to set up the data distribution of a
Function
matrix to support cyclic distribution. This routine must be called
before using this library.
Specification
ddmatrix_adjust_s(n, ah, al, bh, bl, nm)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriahHigh word of original matrix
doubleial
Low word of original matrix
doubleibhHigh word of distributed data
doubleobl
Low word of distributed data
doubleonm
Size of array b
integeri2Routine nameddeigen_sx
Calculating the eigenvalues and eigenvectors of a real symmetricmatrixbypentadiagonalizingthematrixusing
theFunction
NarrowBandReduction method. Executes a series of actions:pentadiagonalization, eigenvalue calculation, and eigenvector
calculation.
ddeigen_sx(n, ah, al, nma, wh, wl, zh, zl, dh, dl, eh, el, nme, m0,
Specificationifl)
Arguments
Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of quadruple precision realahdoubleimatrixLow word of quadruple precision realaldoubleimatrixnma
Size of array A
integeriwhHigh word of eigenvalues
doubleowl
Low word of eigenvalues
doubleozhHigh word of eigenvectors
doubleozl
Low word of eigenvectors
doubleoHigh word of array to store a maindhdoubleodiagonal elements
Low word of array to store a maindl
doubleodiagonal elements
High word of array to store a subehdoubleodiagonal elements
Low word of array to store a subeldoubleodiagonal elements
nme
Size of array e
integerim0
Blocking factor
integeriabout 32 to 128
ifl
Option for output eigenvectors
integeri
0 or 1
Routine nameddeigen_prd
Pentadiagonalizesarealsymmetric
matrixusing
Function
NarrowBandReduction pentadiagonalization
Specification
ddeigen_prd(n, ah, al, nma, dh, dl, eh, el, nme, m0)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of quadruple precision realahdoubleimatrixLow word of quadruple precision realaldoubleimatrixnma
Size of array A
integeridhHigh word of diagonal elements
doubleodl
Low word of diagonal elements
doubleoehHigh word of subdiagonal elements
doubleoel
Low word of subdiagonal elements
doubleonme
Size of array e
integerim0
Blocking factor
integeriabout 32 to 128

3Routine name
Functionddeigen_dcx
Calculates the eigenvalues of an input matrix using thedivide-and-conquer algorithm if the input matrix is a pentadiagonal
matrix obtained by NarrowBandReduction pentadiagonalization of areal symmetric matrix.
ddeigen_dcx(n, wh, wl, eh, el, nme, zh, zl, nmz)

Specification
Argu
ment DescriptionssnDimension of a matrix
whHigh word of eigenvalueswl
Low word of eigenvaluesehHigh word of sub diagonal elementsel
Low word of sub diagonal elements
nme
Size of array ezhHigh word of eigenvectors
zl
Low word of eigenvectors
nmz
Size of array Z

i/o
integer
doubledoubledoubledoubleinteger
doubledoubleinteger

Remarks

i
i
i
i
i
i
o
o
i

Routine nameddeigen_pbk
Calculates the eigenvectors of the pentadiagonal matrix obtained
Functionby NarrowBandReduction pentadiagonalization of a real
symmetric matrix.
Specification
ddeigen_pbk(n, ah, al, nma, zh, zl, nmz, eh, el, m0)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of quadruple precision realahdoubleimatrixLow word of quadruple precision realaldoubleimatrixnma
Size of array A
integerizhHigh word of eigenvectors
doubleozl
Low word of eigenvectors
doubleonmz
Size of array Z
integeriehHigh word of subdiagonal components doubleiel
Low word of subdiagonal components
doubleim0
Blocking factor
integeriabout 32 to 128
Routine nameddmatrix_adjust_sx
The DDEigen library uses two-dimensional cyclic distribution.
This conversion routine is used to set up the data distribution of a
Function
matrix to support cyclic distribution. This routine must be called
before using this library.
Specification
ddmatrix_adjust_sx(n, ah, al, bh, bl, nm)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriahHigh word of original matrix
doubleial
Low word of original matrix
doubleibhHigh word of distributed data
doubleobl
Low word of distributed data
doubleonm
Size of array b
integeri4Routine nameddeigen_h
Function
Calculating the eigenvalues and eigenvectors of a Hermitian matrix.
Specification
ddeigen_h(n, arh, arl, aih, ail, wh, wl, lda, m0, ifl)
Arguments
Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of the real part of thematrixarh(on exit)
doublei/oHigh word of the real part ofeigenvectors
High word of the real part of thematrixarl(on exit)
doublei/o
Low word of the real part ofeigenvectors
Low word of the imaginary part of thematrixaih(on exit)
doublei/oHigh word of the imaginary part ofeigenvectors
Low word of the imaginary part of thematrixail(on exit)
doublei/o
Low word of the imaginary part ofeigenvectors
whHigh word of eigenvalues
doubleowl
Low word of eigenvalues
doubleolda
Size of array A
integerim0
Blocking factor
integeriifl
Option for output eigenvectors
integeri
0 or 1

Routine name
Functionddeigen_hrd
Calculating the eigenvalues and eigenvectors of a Hermitian matrix.
ddeigen_hrd(n, arh, arl, aih, ail, lda, dh, dl, eh, el, e2h, e2l,
Specification
tauh, taul, m, zrh, zrl, zih, zil)Arguments
Descriptions
i/o RemarksnDimension of a matrix
integeriHigh word of the real part of thearhdoubleimatrixHigh word of the real part of thearldoubleimatrixLow word of the imaginary part of theaihdoubleimatrixLow word of the imaginary part of theaildoubleimatrixlda
Size of array A
integeridhHigh word of diagonal elements
doubleodl
Low word of diagonal elements
doubleoehHigh word of subdiagonal elements
double
o

5

el
e2h
e2l
tauh
taul
m
zrh
zrl
zih
zil

Low word of subdiagonal elements
Work area
Work area
Work area
Work area
Blocking factor
High word of real part of theeigenvectors
Low word of real part of theeigenvectors
High word of imaginary part of theeigenvectors
Low word of imaginary part of theeigenvectors

Routine name
Function

doubledoubledoubledoubledoubleinteger

o
o
o
o
o
i

doubleodoubleodoubleodoubleoabout 128

ddeigen_dch
Calculates the eigenvalues of an input matrix
divide-and-conquer algorithm.
ddeigen_dch(n, dh, dl, eh, el, zh, zl, ldz, info)

Specification
Argu
ment DescriptionssnDimension of a matrix
dhHigh word of eigenvaluesdl
Low word of eigenvaluesehWork areaelWork areazhHigh word of real part of the eigenvectors
zl
Low word of real part of the eigenvectors
ldz
Size of array Z
info Error number
Routine name
Function

i/ointeger
doubledoubledoubledoubledoubledoubleinteger
integer

using

the

Remarks

i
o
o
o
o
o
o
i
o

ddeigen_hbk
Calculates the eigenvectors of the matrix.
ddeigen_hbk(n, arh, arl, aih, ail, lda, zrh, zrl, zih, zil, ldz,
Specification
tauh, taul, ltau, n)Arguments Descriptions
i/o Remarks
High word of the real part of thearhdoubleimatrixHigh word of the real part of thearldoubleimatrixLow word of the imaginary part of theaihdoubleimatrixLow word of the imaginary part of theaildoubleimatrixlda
Size of array A
integeriHigh word of the real part of thezrhdoubleimatrixHigh word of the real part of thezrl
doubleimatrix

6

zih
zil
ldz
tauh
taul
ldtau
n

Low word of the imaginary part of thematrixLow word of the imaginary part of thematrixSize of array z
Work area
Work area
Work area
Dimension of a matrix

Routine namedoubleidoublei

integer
doubledoubleInteger
integerioooi

ddmatrix_adjust_h, ddmatrix_adjust_hi
The DDEigen library uses two-dimensional cyclic distribution.
This conversion routine is used to set up the data distribution of a
Function
matrix to support cyclic distribution. This routine must be called
before using this library.This routine is used for real data.
Ddmatrix_adjust_hi is for imaginary data.
ddmatrix_adjust_h(n, ah, al, bh, bl, nm)
Specification
ddmatrix_adjust_hi(n, ah, al, bh, bl, nm)
Arguments Descriptions
i/o RemarksnDimension of a matrix
integeriahHigh word of original matrix
doubleial
Low word of original matrix
doubleibhHigh word of distributed data
doubleobl
Low word of distributed data
doubleonm
Size of array b
integeri7