murge_defines.h

This file define defines, macros and external funtion definition used to build Murge interface.

Summary
murge_defines.hThis file define defines, macros and external funtion definition used to build Murge interface.
Authors
External functions
add_two_floats
keep_last
get_max
get_min
cscd_addlocal_int
pastix_task_init
pastix_initParam
pastix_task_clean
pastix_welcome_print
pastix_checkMatrix_int
Global
Defines
Macros
MPI TagsTags for MPI communication.
State masksBit masks used to define state variable.
Macros
Macros
MURGE_MEMALLOCAllocate a space of size size x sizeof(type) at the adress indicated by ptr.
MURGE_STATE_FALSESet states bit corresponding to mask to 0.
MURGE_STATE_TRUESet states bit corresponding to mask to 1.
MURGE_STATE_ISTRUECheck if states bit corresponding to mask is set to 1.
CHECK_SOLVER_IDChecks if solvers structure has been correctly set for instance id
CHECK_SOLVER_PARAMChecks if parameters have been set once for solver instance id.
CHECK_PREPROCESSINGChecks if preprocessing (blend) has been called.
CHECK_FACTChecks if matrix values have been set.
CHECK_L2GChecks if local to global array has been allocated.
CHECK_SCALING_MODECheck that the given mode exists.
CHECK_NORM_RULECheck that the given norm rule exists.
CHOOSE_FUNCWill set func to the good function, depending to op.
EXTEND_NODE_LISTExtend the number of node that the node list can receive if needed.
Variables
ret
COPY_ELEMENT_TO_NODEAdd a new node containing tmpijv[iter] at the end of the arrays tmpijv_node/tmpvalues.
Macros
FILL_INTERNAL_CSCFill PaStiX internal CSC
UNLINKSuppress a file from the disk.
LINKCreate a symbolink link.
RENAMEMove a file on disk.
Time macros
pastix_fillin_csc

External functions

add_two_floats

FLOAT add_two_floats(FLOAT a,
FLOAT b)

keep_last

FLOAT keep_last(FLOAT a,
FLOAT b)

get_max

FLOAT get_max(FLOAT a,
FLOAT b)

get_min

FLOAT get_min(FLOAT a,
FLOAT b)

cscd_addlocal_int

int cscd_addlocal_int(INT ,
INT * ia ,
INT * ja ,
FLOAT * ,
INT *l2g,
INT addn,
INT *addia,
INT *addja,
FLOAT *adda,
INT *addl2g,
INT *newn,
INT **newia,
INT **newja,
FLOAT **newa,
FLOAT (*add_fct)(FLOAT , FLOAT),
int dof,
int malloc_flag)

pastix_task_init

void pastix_task_init(pastix_data_t **pastix_data,
MPI_Comm pastix_comm,
INT *iparm,
double *dparm)

pastix_initParam

void pastix_initParam(INT *iparm,
double *dparm)

pastix_task_clean

void pastix_task_clean(pastix_data_t **pastix_data,
MPI_Comm pastix_comm)

pastix_welcome_print

void pastix_welcome_print(pastix_data_t *pastix_data,
INT *colptr,
INT ln)

pastix_checkMatrix_int

int pastix_checkMatrix_int(MPI_Comm pastix_comm,
int verb,
int flagsym,
int flagcor,
INT n,
INT **colptr,
INT **row,
FLOAT **avals,
INT **loc2glob,
int dof,
int flagalloc)

Global

Defines

Summary
Macros
MPI TagsTags for MPI communication.
State masksBit masks used to define state variable.

Macros

MPI Tags

Tags for MPI communication.

TAG_SIZETo send size of a buffer.
TAG_ROWTo send rows.
TAG_COLTo send columns.
TAG_FLTo send an interval (first last).
TAG_IJVTo send ijv_t array.
TAG_L2GTo send local to global column numbers.
TAG_VALTo send values.

State masks

Bit masks used to define state variable.

MURGE_INIT_OKIf initialisation step has been called.
MURGE_GRAPH_OKIf graph of non zeros has been built.
MURGE_GRAPH_BUILDIf we are in a graph building session.
MURGE_VALUES_OKIf Values of the matrix have been set.
MURGE_BLEND_OKIf preprocessing has been performed.
MURGE_MATR_BUILDIf we are in a matrix building session.
MURGE_FACTO_OKIf Factorization has been computed.
MURGE_NODENBR_OKIf node number has been given to user.
MURGE_NODELST_OKIf node list has been given to user.
MURGE_RHS_OKIf Right hand side has been set by user.
MURGE_SYMB_OKIf Symbolic factorization has been performed.
MURGE_ONLY_PRODIf we only compute producte

Macros

Summary
Macros
MURGE_MEMALLOCAllocate a space of size size x sizeof(type) at the adress indicated by ptr.
MURGE_STATE_FALSESet states bit corresponding to mask to 0.
MURGE_STATE_TRUESet states bit corresponding to mask to 1.
MURGE_STATE_ISTRUECheck if states bit corresponding to mask is set to 1.
CHECK_SOLVER_IDChecks if solvers structure has been correctly set for instance id
CHECK_SOLVER_PARAMChecks if parameters have been set once for solver instance id.
CHECK_PREPROCESSINGChecks if preprocessing (blend) has been called.
CHECK_FACTChecks if matrix values have been set.
CHECK_L2GChecks if local to global array has been allocated.
CHECK_SCALING_MODECheck that the given mode exists.
CHECK_NORM_RULECheck that the given norm rule exists.
CHOOSE_FUNCWill set func to the good function, depending to op.
EXTEND_NODE_LISTExtend the number of node that the node list can receive if needed.
Variables
ret
COPY_ELEMENT_TO_NODEAdd a new node containing tmpijv[iter] at the end of the arrays tmpijv_node/tmpvalues.
Macros
FILL_INTERNAL_CSCFill PaStiX internal CSC
UNLINKSuppress a file from the disk.
LINKCreate a symbolink link.
RENAMEMove a file on disk.
Time macros

Macros

MURGE_MEMALLOC

Allocate a space of size size x sizeof(type) at the adress indicated by ptr.

Parameters

ptraddress where to allocate.
sizeNumber of elements to allocate.
typesType of the elements to allocate.

Returns

MURGE_ERR_ALLOCATEIf allocation fails.

MURGE_STATE_FALSE

Set states bit corresponding to mask to 0.

Parameters

statestate variable
maskinformation we want to set.

MURGE_STATE_TRUE

Set states bit corresponding to mask to 1.

Parameters

statestate variable
maskinformation we want to set.

MURGE_STATE_ISTRUE

Check if states bit corresponding to mask is set to 1.

Parameters

statestate variable
maskinformation we want to test.

Returns

trueif mask bit is set to 1
elseotherwise

CHECK_SOLVER_ID

Checks if solvers structure has been correctly set for instance id

It checks that id value is in correct range and that solvers and solvers[id] have been allocated.

Parameters

idSolver instance ID we want to check.

Returns

MURGE_ERR_PARAMETERIf id is not in correct range.
MURGE_ERR_ORDERIf solvers or solvers[id] are not allocated.

CHECK_SOLVER_PARAM

Checks if parameters have been set once for solver instance id.

Checks if iparm or dparm are allocated.

Parameters

idSolver instance ID we want to check.

Returns

MURGE_ERR_ORDERIf iparm or dparm are not allocated.

CHECK_PREPROCESSING

Checks if preprocessing (blend) has been called.

If it hasn’t, it will allocate permutation tabular and call preprocessing step.

After calling preprocessing, it will set local number of column and local to global column number tabular to their new values.

Colptr and rows will be destroyed because it is obsolete, and state will be set to indicate that preprocessing has been performed.

Parameters

idSolver instance ID we want to check

Returns

MURGE_ERR_ALLOCATEIf any allocation error occurs.

CHECK_FACT

Checks if matrix values have been set.

Checks if factorization has been performed.

If not, it will call for it and set state.

Parameters

idSolver instance ID we want to check

Returns

MURGE_ERR_ORDERIf values or right-hand-side member have not been set.

CHECK_L2G

Checks if local to global array has been allocated.

If not, it will correct number of local columns and set local to global column array.

Parameters

idSolver instance ID we want to check

Returns

MURGE_ERR_ALLOCATEIf any allocation error occurs.
MURGE_ERR_SOLVERIf local to global array setting fails.

CHECK_SCALING_MODE

Check that the given mode exists.

Parameters

modeThe given scaling mode.  Returns:
MURGE_ERR_PARAMETERIf mode is not defined.

CHECK_NORM_RULE

Check that the given norm rule exists.

Parameters

ruleThe given norm rule.  Returns:
MURGE_ERR_PARAMETERIf rule is not defined.

CHOOSE_FUNC

Will set func to the good function, depending to op.

Parameters

opOperation flag.
funcFunction pointer to set.

Returns

MURGE_ERR_PARAMETERIf op doesn’t exists.

EXTEND_NODE_LIST

Extend the number of node that the node list can receive if needed.

Variables

ret

int ret

COPY_ELEMENT_TO_NODE

EXTEND_NODE_LIST

Add a new node containing tmpijv[iter] at the end of the arrays tmpijv_node/tmpvalues.

Macros

FILL_INTERNAL_CSC

Fill PaStiX internal CSC

UNLINK

Suppress a file from the disk.

Parameters

fileThe file to suppress Returns:
MURGE_ERR_IOIf an error occur.

LINK

Create a symbolink link.

Parameters

srcfile to link.
destlink path.  Returns:
MURGE_ERR_IOIf an error occur.

RENAME

Move a file on disk.

Parameters

srcFile to move.
destNew path.  Returns:
MURGE_ERR_IOIf an error occur.

Time macros

CLOCK_INITStart a clok
CLOCK_STOPSave clock time
CLOCK_GETGet saved time (double value)

pastix_fillin_csc

int pastix_fillin_csc(pastix_data_t *pastix_data,
MPI_Comm pastix_comm,
INT n,
INT *colptr,
INT *row,
FLOAT *avals,
FLOAT *b,
INT *loc2glob)
Murge is close to the Merge.
FLOAT add_two_floats(FLOAT a,
FLOAT b)
FLOAT keep_last(FLOAT a,
FLOAT b)
FLOAT get_max(FLOAT a,
FLOAT b)
FLOAT get_min(FLOAT a,
FLOAT b)
int cscd_addlocal_int(INT ,
INT * ia ,
INT * ja ,
FLOAT * ,
INT *l2g,
INT addn,
INT *addia,
INT *addja,
FLOAT *adda,
INT *addl2g,
INT *newn,
INT **newia,
INT **newja,
FLOAT **newa,
FLOAT (*add_fct)(FLOAT , FLOAT),
int dof,
int malloc_flag)
void pastix_task_init(pastix_data_t **pastix_data,
MPI_Comm pastix_comm,
INT *iparm,
double *dparm)
void pastix_initParam(INT *iparm,
double *dparm)
void pastix_task_clean(pastix_data_t **pastix_data,
MPI_Comm pastix_comm)
void pastix_welcome_print(pastix_data_t *pastix_data,
INT *colptr,
INT ln)
int pastix_checkMatrix_int(MPI_Comm pastix_comm,
int verb,
int flagsym,
int flagcor,
INT n,
INT **colptr,
INT **row,
FLOAT **avals,
INT **loc2glob,
int dof,
int flagalloc)
int ret
EXTEND_NODE_LIST
Add a new node containing tmpijv[iter] at the end of the arrays tmpijv_node/tmpvalues.
int pastix_fillin_csc(pastix_data_t *pastix_data,
MPI_Comm pastix_comm,
INT n,
INT *colptr,
INT *row,
FLOAT *avals,
FLOAT *b,
INT *loc2glob)
Alias to structure ijv_.
Close