murge-mm

Example which reads a file “matrix.mm” and solves the system using Murge interface.

The right-hand-side member used is such as the solution will be 1.

The given matrix must be in a IJV Matrix Market format, with 1 as baseval.

This example is independant of the Murged solver used.

Authors

X.  LACOSTE

Summary
murge-mmExample which reads a file “matrix.mm” and solves the system using Murge interface.
Macros
Macros
MINCompute the minimum of two values.
MURGE_CALLExecute call fonction and test the return value.
Defines
Macros
DIAG_VALUEThe value of the diagonal elements of the matrix
EXTRA_DIAG_VALUEThe value of the extra diagonal elements of the matrix.
Functions
mainMain function of murge-dist example, solving laplacian.

Macros

Summary
Macros
MINCompute the minimum of two values.
MURGE_CALLExecute call fonction and test the return value.

Macros

MIN

Compute the minimum of two values.

Parameters

xThe first value.
yThe second value.

MURGE_CALL

Execute call fonction and test the return value.

Parameters

callThe murge function to execute.

Defines

Summary
Macros
DIAG_VALUEThe value of the diagonal elements of the matrix
EXTRA_DIAG_VALUEThe value of the extra diagonal elements of the matrix.

Macros

DIAG_VALUE

The value of the diagonal elements of the matrix

EXTRA_DIAG_VALUE

The value of the extra diagonal elements of the matrix.

Functions

main

Main function of murge-dist example, solving laplacian.

Initialize MURGE and default solver options,

Enter the graph in ditributed mode, edge by edge using MURGE_GraphBegin, MURGE_GraphEdge and MURGE_GraphEnd.

Get the new computed distribution using MURGE_GetLocalUnknownNbr and MURGE_GetLocalUnknownList.

Fill the ditributed matrix, value by value using MURGE_AssemblyBegin, MURGE_AssemblySetValue and MURGE_AssemblyEnd.

Set the right hand side member using MURGE_SetLocalRHS.

Solve the problem and get the local solution using MURGE_GetLocalSolution.

Example which build a distributed laplacian and solves the system using Murge interface.
INTS MURGE_GraphBegin(INTS id,
INTS N,
INTL edgenbr)
INTS MURGE_GraphEdge (INTS id,
INTS ROW,
INTS COL)
INTS MURGE_GraphEnd (INTS id)
INTS MURGE_GetLocalUnknownNbr (INTS id,
INTS *unkownnbr)
INTS MURGE_GetLocalUnknownList(INTS id,
INTS *unkownlist)
INTS MURGE_AssemblyBegin(INTS id,
INTL coefnbr,
INTS op,
INTS op2,
INTS mode,
INTS sym)
Check that preprocessing has been performed, if not performs it.
INTS MURGE_AssemblySetValue (INTS id,
INTS ROW,
INTS COL,
COEF value)
INTS MURGE_AssemblyEnd(INTS id)
We have on each proc a part of the matrix in two structure, one containing nodes to add to the CSCd the other containing simple values.
INTS MURGE_SetLocalRHS (INTS id,
COEF *b,
INTS op,
INTS op2)
INTS MURGE_GetLocalSolution (INTS id,
COEF *x)
Close