PROGRESS  master
prg_graph_mod Module Reference

The graph module. More...

Data Types

type  subgraph_t
 Subgraph type. More...
 
type  graph_partitioning_t
 Trace per iteration. More...
 

Functions/Subroutines

subroutine, public prg_initsubgraph (sg, pnum, hsize)
 Initialize subgraph. More...
 
subroutine, public prg_destroysubgraph (sg)
 Destroy subgraph. More...
 
subroutine, public prg_initgraphpartitioning (gp, pname, np, nnodes, nnodes2)
 Initialize graph partitioning. More...
 
subroutine, public prg_destroygraphpartitioning (gp)
 Destroy graph partitioning. More...
 
subroutine, public prg_printgraphpartitioning (gp)
 Print graph partitioning structure data. More...
 
subroutine, public prg_equalpartition (gp, nodesPerPart, nnodes)
 Create equal graph partitions, based on number of rows/orbitals. More...
 
real(8) function time2milliseconds ()
 
subroutine, public prg_setpartition (gp, whichParts, nparts, nnodes, verb)
 Create a partitioning based on an input assignment of atoms to parts. More...
 
subroutine, public prg_sedacspartition (gp, coords, whichParts_guess_saved, g_bml, nparts, nnodes, verb)
 Create a partitioning based on node flips (as implemented in SEDACS - with several changes) More...
 
subroutine do_flips_precomp (whichParts, coords, graph, adj, degs, nnodes, nparts, bal)
 
subroutine prg_get_balancing (whichParts, np, bal)
 Get balancing. More...
 
subroutine prg_get_parts_indices (gp, nnodes, whichParts)
 Get part indices. More...
 
subroutine prg_get_graphcut (whichParts, degs, graph, cut)
 Get graph cut. More...
 
subroutine, public prg_equalgrouppartition (gp, hindex, ngroup, nodesPerPart, nnodes)
 Create equal group graph partitions, based on number of atoms/groups. More...
 
subroutine, public prg_filepartition (gp, partFile)
 Read graph partitions from a file, based on number of rows/orbitals. More...
 
subroutine prg_readpart (gp, partFile)
 Read parts (core) from part file. More...
 
subroutine, public prg_fnormgraph (gp)
 Accumulate trace norm across all subgraphs. More...
 

Variables

integer, parameter dp = kind(1.0d0)
 

Detailed Description

The graph module.

Function/Subroutine Documentation

◆ do_flips_precomp()

subroutine prg_graph_mod::do_flips_precomp ( integer, dimension(:), intent(inout), allocatable  whichParts,
real(dp), dimension(:,:), intent(in), allocatable  coords,
integer, dimension(:,:), intent(inout), allocatable  graph,
type(bml_matrix_t)  adj,
integer, dimension(:), intent(inout), allocatable  degs,
integer, intent(in)  nnodes,
integer, intent(in)  nparts,
real(dp bal 
)
private

Definition at line 626 of file prg_graph_mod.F90.

◆ prg_destroygraphpartitioning()

subroutine, public prg_graph_mod::prg_destroygraphpartitioning ( type (graph_partitioning_t), intent(inout)  gp)

Destroy graph partitioning.

Parameters
sgSubgraph

Definition at line 268 of file prg_graph_mod.F90.

◆ prg_destroysubgraph()

subroutine, public prg_graph_mod::prg_destroysubgraph ( type (subgraph_t), intent(inout)  sg)

Destroy subgraph.

Parameters
sgSubgraph

Definition at line 165 of file prg_graph_mod.F90.

◆ prg_equalgrouppartition()

subroutine, public prg_graph_mod::prg_equalgrouppartition ( type (graph_partitioning_t), intent(inout)  gp,
integer, dimension(2,ngroup), intent(in)  hindex,
integer, intent(in)  ngroup,
integer, intent(in)  nodesPerPart,
integer, intent(in)  nnodes 
)

Create equal group graph partitions, based on number of atoms/groups.

Parameters
gpGraph partitioning
hindexNode indeces that represent ranges of atoms/groups
ngroupNumber of group nodes
nodesPerPartNumber of core nodes per partition
nnodesTotal nodes in Hamiltonian matrix

Definition at line 913 of file prg_graph_mod.F90.

◆ prg_equalpartition()

subroutine, public prg_graph_mod::prg_equalpartition ( type (graph_partitioning_t), intent(inout)  gp,
integer, intent(in)  nodesPerPart,
integer, intent(in)  nnodes 
)

Create equal graph partitions, based on number of rows/orbitals.

Parameters
gpGraph partitioning`
nodesPerPartNumber of core nodes per partition
nnodesTotal nodes in Hamiltonian matrix

Definition at line 359 of file prg_graph_mod.F90.

◆ prg_filepartition()

subroutine, public prg_graph_mod::prg_filepartition ( type (graph_partitioning_t), intent(inout)  gp,
character(len=*), intent(in)  partFile 
)

Read graph partitions from a file, based on number of rows/orbitals.

Parameters
partFileFile containing core nodes for each partition
gpGraph partitioning

Definition at line 975 of file prg_graph_mod.F90.

◆ prg_fnormgraph()

subroutine, public prg_graph_mod::prg_fnormgraph ( type(graph_partitioning_t), intent(inout)  gp)

Accumulate trace norm across all subgraphs.

Parameters
gpGraph partitioning

Definition at line 1028 of file prg_graph_mod.F90.

◆ prg_get_balancing()

subroutine prg_graph_mod::prg_get_balancing ( integer, dimension(:), intent(in), allocatable  whichParts,
integer  np,
real(dp), intent(out)  bal 
)
private

Get balancing.

Parameters
whichPartsVector containing the "color" (part) of each node.
npTotal number of parts
balComputed balancing

Definition at line 809 of file prg_graph_mod.F90.

◆ prg_get_graphcut()

subroutine prg_graph_mod::prg_get_graphcut ( integer, dimension(:), intent(in), allocatable  whichParts,
integer, dimension(:), intent(in), allocatable  degs,
integer, dimension(:,:), intent(in), allocatable  graph,
integer, intent(out)  cut 
)
private

Get graph cut.

Get the total cut (edges crossing parts)

Parameters
whichPartsVector containing the "color" (part) of each node.
degsDegrees of every node
graph2D array containing the information of every connection. graph(i,j): index of the jth neigbor of i.
cutComputed cut

Definition at line 880 of file prg_graph_mod.F90.

◆ prg_get_parts_indices()

subroutine prg_graph_mod::prg_get_parts_indices ( type (graph_partitioning_t), intent(in)  gp,
integer, intent(in)  nnodes,
integer, dimension(:), intent(out), allocatable  whichParts 
)
private

Get part indices.

Parameters
gpGraph partitioning type
nnodsNumber of nodes
whichPartsVector containing the "color" (part) of each node.

Definition at line 845 of file prg_graph_mod.F90.

◆ prg_initgraphpartitioning()

subroutine, public prg_graph_mod::prg_initgraphpartitioning ( type (graph_partitioning_t), intent(inout)  gp,
character(len=*), intent(in)  pname,
integer, intent(in)  np,
integer, intent(in)  nnodes,
integer, intent(in)  nnodes2 
)

Initialize graph partitioning.

Parameters
gpGraph partitioning
pnamePartitioning name
npNumber of partitions
nnodesNumber of groups/nodes
nnodes2Number of nodes

Definition at line 180 of file prg_graph_mod.F90.

◆ prg_initsubgraph()

subroutine, public prg_graph_mod::prg_initsubgraph ( type (subgraph_t), intent(inout)  sg,
integer, intent(in)  pnum,
integer, intent(in)  hsize 
)

Initialize subgraph.

Parameters
sgSubgraph
pnumPart number
hsizeSize of full matrix

Definition at line 149 of file prg_graph_mod.F90.

◆ prg_printgraphpartitioning()

subroutine, public prg_graph_mod::prg_printgraphpartitioning ( type (graph_partitioning_t), intent(in)  gp)

Print graph partitioning structure data.

Parameters
gpGraph partitioning

Definition at line 295 of file prg_graph_mod.F90.

◆ prg_readpart()

subroutine prg_graph_mod::prg_readpart ( type (graph_partitioning_t), intent(inout)  gp,
character(len=*), intent(in)  partFile 
)
private

Read parts (core) from part file.

Parameters
gpGraph partitioning
partFilePartition file

Definition at line 987 of file prg_graph_mod.F90.

◆ prg_sedacspartition()

subroutine, public prg_graph_mod::prg_sedacspartition ( type (graph_partitioning_t), intent(inout)  gp,
real(dp), dimension(:,:), intent(in), allocatable  coords,
integer, dimension(:), intent(inout), allocatable  whichParts_guess_saved,
type (bml_matrix_t), intent(in)  g_bml,
integer, intent(in)  nparts,
integer, intent(in)  nnodes,
integer, intent(in), optional  verb 
)

Create a partitioning based on node flips (as implemented in SEDACS - with several changes)

Parameters
gpGraph partitioning type
whichParts_guess_savedArray indicating the "color" a node belongs to
g_bmlAdjacency matrix (BML type)
npartsNumber of total parts
nnodesTotal nodes in the graph (typically consistent with number of atoms)
verbVerbosity level

Definition at line 472 of file prg_graph_mod.F90.

◆ prg_setpartition()

subroutine, public prg_graph_mod::prg_setpartition ( type (graph_partitioning_t), intent(inout)  gp,
integer, dimension(:), intent(inout), allocatable  whichParts,
integer, intent(in)  nparts,
integer, intent(in)  nnodes,
integer, intent(in), optional  verb 
)

Create a partitioning based on an input assignment of atoms to parts.

Parameters
gpGraph partitioning type
whichPartsArray indicating the "color" a node belongs to
npartsNumber of total parts
nnodesTotal nodes in the graph (typically consistent with number of atoms)
verbVerbosity level

Definition at line 420 of file prg_graph_mod.F90.

◆ time2milliseconds()

real(8) function prg_graph_mod::time2milliseconds
private

Definition at line 401 of file prg_graph_mod.F90.

Variable Documentation

◆ dp

integer, parameter prg_graph_mod::dp = kind(1.0d0)
private

Definition at line 16 of file prg_graph_mod.F90.