Millepede-II V04-17-04
Modules | Functions/Subroutines | Variables
mpbits.f90 File Reference

Bit field counters. More...

Go to the source code of this file.

Modules

module  mpbits
 Bit field data.
 

Functions/Subroutines

subroutine inbits (im, jm, inc)
 Fill bit fields (counters, triangular part). More...
 
subroutine irbits (i, j)
 Fill bit fields (counters, rectangular part). More...
 
subroutine clbits (in, jreqpe, jhispe, jsngpe, jextnd, idimb, ispc)
 Calculate bit (field) array size, encoding. More...
 
subroutine plbits (in, inar, inac, idimb)
 Calculate bit field array size (PARDISO). More...
 
subroutine ndbits (npgrp, ndims, nsparr, ihst)
 Analyze bit fields. More...
 
subroutine pbsbits (npgrp, ibsize, nnzero, nblock, nbkrow)
 Analyze bit fields. More...
 
subroutine pblbits (npgrp, ibsize, nsparr, nsparc)
 Analyze bit fields. More...
 
subroutine prbits (npgrp, nsparr)
 Analyze bit fields. More...
 
subroutine pcbits (npgrp, nsparr, nsparc)
 Analyze bit fields. More...
 
subroutine ckbits (npgrp, ndims)
 Check sparsity of matrix. More...
 
subroutine spbits (npgrp, nsparr, nsparc)
 Create sparsity information. More...
 
subroutine clbmap (in)
 Clear (additional) bit map. More...
 
subroutine inbmap (im, jm)
 Fill bit map. More...
 
subroutine gpbmap (ngroup, npgrp, npair)
 Get pairs (statistic) from map. More...
 
subroutine ggbmap (ipgrp, npair, npgrp)
 Get paired (parameter) groups from map. More...
 

Variables

integer(mpl) mpbits::ndimb
 dimension for bit (field) array More...
 
integer(mpl) mpbits::ndimb2
 dimension for bit map More...
 
integer(mpi) mpbits::n
 matrix size (counters, sparse, triangular part) More...
 
integer(mpi) mpbits::nar
 additional rows (counters, sparse, rectangular part) More...
 
integer(mpi) mpbits::nac
 additional columns (counters, sparse, rectangular part) More...
 
integer(mpi) mpbits::n2
 matrix size (map) More...
 
integer(mpi) mpbits::ibfw
 bit field width More...
 
integer(mpi) mpbits::ireqpe
 min number of pair entries More...
 
integer(mpi) mpbits::isngpe
 upper bound for pair entry single precision storage More...
 
integer(mpi) mpbits::iextnd
 flag for extended storage (both 'halves' of sym. More...
 
integer(mpi) mpbits::nspc
 number of precision for sparse global matrix (1=D, 2=D+f) More...
 
integer(mpi) mpbits::mxcnt
 max value for bit field counters More...
 
integer(mpi) mpbits::nthrd
 number of threads More...
 
integer(mpi), dimension(:), allocatable mpbits::bitfieldcounters
 fit field counters for global parameters pairs (tracks) More...
 
integer(mpi), dimension(:), allocatable mpbits::bitmap
 fit field map for global parameters pairs (measurements) More...
 
integer(mpi), parameter mpbits::bs = BIT_SIZE(1_mpi)
 number of bits in INTEGER(mpi) More...
 

Detailed Description

Bit field counters.

Author
Volker Blobel, University Hamburg, 2005-2009 (initial Fortran77 version)
Claus Kleinwort, DESY (maintenance and developement)

Count pairs of global parameters for sparse storage of global matrix, apply pair entries cut and build (compressed) sparsity structure (row offsets, column lists).

In sparse storage mode for each row the list of column indices with non zero elements (and those elements) are stored. With compression this list is represented by the first column and their number for continous regions (encoded in single INTEGER(mpi) words). Rare elements may be stored in single precision.

An additional bit map is used to monitor the parameter pairs for measurements (or 'equations').

To make use of the Intel oneMKL PARDISO solver for sparse systems the 'CSR3' (or 'BSR3') format (using the 'upper' triangle) is needed. For this a new set of routines have been added (starting with 'P'). In this case the bit array has two parts: A triangular one for pairs of parameter groups and a rectangular one for Lagrange multipliers (parameter constraint pairs).

Definition in file mpbits.f90.

Function/Subroutine Documentation

◆ ckbits()

subroutine ckbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpl), dimension(4), intent(out)  ndims 
)

Check sparsity of matrix.

Parameters
[in]npgrpparameter groups
[out]ndims(1): number of non-zero elements; (2): size of column lists; (3/4): number of (double/single precision) off diagonal elements;

Definition at line 1127 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::ibfw, mpbits::iextnd, mpbits::ireqpe, mpbits::isngpe, and mpbits::n.

Referenced by loop2().

◆ clbits()

subroutine clbits ( integer(mpi), intent(in)  in,
integer(mpi), intent(in)  jreqpe,
integer(mpi), intent(in)  jhispe,
integer(mpi), intent(in)  jsngpe,
integer(mpi), intent(in)  jextnd,
integer(mpl), intent(out)  idimb,
integer(mpi), intent(out)  ispc 
)

Calculate bit (field) array size, encoding.

Parameters
[in]inmatrix size
[in]jreqpemin number of pair entries
[in]jhispeupper bound for pair entry histogrammimg
[in]jsngpeupper bound for pair entry single precision storage
[in]jextndflag for extended storage
[out]idimbdimension for bit (field) array
[out]ispcnumber of precision for sparse global matrix

Definition at line 182 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::ibfw, mpbits::iextnd, mpbits::ireqpe, mpbits::isngpe, mpbits::mxcnt, mpbits::n, mpbits::nac, mpbits::nar, mpbits::ndimb, mpbits::nspc, and mpbits::nthrd.

Referenced by loop2().

◆ clbmap()

subroutine clbmap ( integer(mpi), intent(in)  in)

Clear (additional) bit map.

Parameters
[in]inmatrix size

Definition at line 1357 of file mpbits.f90.

References mpbits::bitmap, mpbits::bs, mpbits::n2, and mpbits::ndimb2.

Referenced by loop2().

◆ ggbmap()

subroutine ggbmap ( integer(mpi), intent(in)  ipgrp,
integer(mpi), intent(out)  npair,
integer(mpi), dimension(:), intent(out)  npgrp 
)

Get paired (parameter) groups from map.

Parameters
[in]ipgrpparameter group
[out]npairnumber of paired parameters
[in]npgrppaired parameter groups (for ipgrp)

Definition at line 1469 of file mpbits.f90.

References mpbits::bitmap, mpbits::bs, and mpbits::n2.

Referenced by loop2(), and prtstat().

◆ gpbmap()

subroutine gpbmap ( integer(mpi), intent(in)  ngroup,
integer(mpi), dimension(:,:), intent(in)  npgrp,
integer(mpi), dimension(:), intent(out)  npair 
)

Get pairs (statistic) from map.

Parameters
[in]ngroupnumber of parameter groups
[in]npgrpparameter groups
[out]npairnumber of paired parameters

Definition at line 1423 of file mpbits.f90.

References mpbits::bitmap, and mpbits::bs.

Referenced by loop2().

◆ inbits()

subroutine inbits ( integer(mpi), intent(in)  im,
integer(mpi), intent(in)  jm,
integer(mpi), intent(in)  inc 
)

Fill bit fields (counters, triangular part).

Parameters
[in]imfirst index
[in]jmsecond index
[in]incincrement (usually 1)

Definition at line 73 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::ibfw, mpbits::iextnd, mpbits::mxcnt, and mpbits::n.

Referenced by loop2().

◆ inbmap()

subroutine inbmap ( integer(mpi), intent(in)  im,
integer(mpi), intent(in)  jm 
)

Fill bit map.

Parameters
[in]imfirst index
[in]jmsecond index

Definition at line 1389 of file mpbits.f90.

References mpbits::bitmap, mpbits::bs, and mpbits::n2.

Referenced by loop2().

◆ irbits()

subroutine irbits ( integer(mpi), intent(in)  i,
integer(mpi), intent(in)  j 
)

Fill bit fields (counters, rectangular part).

Parameters
[in]irow (parameter)
[in]jcolumn (constraint)

Definition at line 149 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::nac, mpbits::nar, and mpbits::ndimb.

Referenced by loop2().

◆ ndbits()

subroutine ndbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpl), dimension(4), intent(out)  ndims,
integer(mpl), dimension(:,:), intent(out)  nsparr,
integer(mpi), intent(in)  ihst 
)

Analyze bit fields.

Parameters
[in]npgrpparameter groups
[out]ndims(1): (reduced) size of bit array; (2): size of column lists; (3/4): number of (double/single precision) off diagonal elements;
[out]nsparrrow offsets
[in]ihst>0: histogram number

Definition at line 305 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, hmpent(), mpbits::ibfw, mpbits::iextnd, mpbits::ireqpe, mpbits::isngpe, mpbits::n, mpbits::ndimb, mpbits::nspc, and mpbits::nthrd.

Referenced by loop2().

◆ pblbits()

subroutine pblbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpi), intent(in)  ibsize,
integer(mpl), dimension(:), intent(in)  nsparr,
integer(mpl), dimension(:), intent(out)  nsparc 
)

Analyze bit fields.

Calculate BSR3 column list (for PARDISO)

Parameters
[in]npgrpparameter groups
[in]ibsizeblock size
[in]nsparrrow offsets
[out]nsparccolumn list

Definition at line 761 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::n, mpbits::nac, mpbits::ndimb, and mpbits::nthrd.

Referenced by loop2().

◆ pbsbits()

subroutine pbsbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpi), intent(in)  ibsize,
integer(mpl), intent(out)  nnzero,
integer(mpl), intent(out)  nblock,
integer(mpi), dimension(:), intent(out)  nbkrow 
)

Analyze bit fields.

Check block structure (for PARDISO BSR3 storage)

Parameters
[in]npgrpparameter groups
[in]ibsizeblock size
[out]nnzeronumber of non-zero elements
[out]nblocknumber of blocks used
[out]nbkrownumber of (column) blocks in row (blocks)

Definition at line 578 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::n, mpbits::nac, mpbits::ndimb, and mpbits::nthrd.

Referenced by loop2().

◆ pcbits()

subroutine pcbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpl), dimension(:), intent(in)  nsparr,
integer(mpl), dimension(:), intent(out)  nsparc 
)

Analyze bit fields.

Calculate CSR3 column list (for PARDISO)

Parameters
[in]npgrpparameter groups
[in]nsparrrow offsets
[out]nsparccolumn list

Definition at line 1033 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::n, mpbits::nac, mpbits::ndimb, and mpbits::nthrd.

Referenced by loop2().

◆ plbits()

subroutine plbits ( integer(mpi), intent(in)  in,
integer(mpi), intent(in)  inar,
integer(mpi), intent(in)  inac,
integer(mpl), intent(out)  idimb 
)

Calculate bit field array size (PARDISO).

Count pairs of parameter groups in triangular part, pairs of constraints and parameters in rectangular part.

Parameters
[in]inmatrix size (triangular part, number of parameter groups)
[in]inarrows for rectangular part (number of parameters)
[in]inaccols for rectangular part (number of constraints)
[out]idimbdimension for bit (field) array

Definition at line 255 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::ibfw, mpbits::iextnd, mpbits::ireqpe, mpbits::isngpe, mpbits::n, mpbits::nac, mpbits::nar, mpbits::ndimb, mpbits::nspc, and mpbits::nthrd.

Referenced by loop2().

◆ prbits()

subroutine prbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpl), dimension(:), intent(out)  nsparr 
)

Analyze bit fields.

Calculate CSR3 row offsets (for PARDISO)

Parameters
[in]npgrpparameter groups
[out]nsparrrow offsets (preset with number of Lagrange multipliers (at row+1))

Definition at line 934 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::n, mpbits::nac, mpbits::ndimb, and mpbits::nthrd.

Referenced by loop2().

◆ spbits()

subroutine spbits ( integer(mpi), dimension(:), intent(in)  npgrp,
integer(mpl), dimension(:,:), intent(in)  nsparr,
integer(mpi), dimension(:), intent(out)  nsparc 
)

Create sparsity information.

Parameters
[in]npgrpparameter groups
[in]nsparrrow offsets
[out]nsparccolumn indices

Definition at line 1220 of file mpbits.f90.

References mpbits::bitfieldcounters, mpbits::bs, mpbits::ibfw, mpbits::iextnd, mpbits::n, mpbits::nspc, and mpbits::nthrd.

Referenced by loop2().