pastix_fortran.c

Summary
pastix_fortran.c
pastix_fortran.cInterface to the PaStiX API functions.
pastix_check_data_Contains the rows and values arrays.
Types
pastix_check_data_tType coresponding to the struct pastix_check_data_
pastix_fortranFortran interface to the pastix function.
dpastix_fortranFortran interface to the dpastix function.
pastix_fortran_bindthreadsSet rules to bind thread on processors.
pastix_fortran_checkmatrixCheck if the matrix is correct and can be given to PaStiX solver.
pastix_fortran_checkmatrix_endCopy the corrected CSC in the user CSC.
pastix_fortran_getlocalnodenbrGive the node number in the new distribution computed by blend.
pastix_fortran_getlocalnodelstFill in nodelst with the list of local nodes/clumns.
cscd_addlocal_fortranInterface to cscd_addlocal, for fortran calls.
pastix_fortran_setschurunknownlistFortran interface to pastix_setSchurUnknownList
pastix_getschurFotran interface to pastix_getSchur
pastix_fortran_getschurlocalnodenbrFortran interface to pastix_getSchurLocalNodeNbr
pastix_fortran_getschurlocalunknownnbrFortran interface to <pastix_getSchurLocalUnknownNbr>
pastix_fortran_getschurlocalnodelistFortran interface to pastix_getSchurLocalNodeList
pastix_fortran_getschurlocalunkownlistFortran interface to pastix_getSchurLocalUnkownList
pastix_fortran_setschurarrayFortran interface to pastix_setSchurArray

pastix_fortran.c

void pastix_fortran (void *pastix_data,
MPI_Fint *fortran_comm,
INT *n,
INT *colptr,
INT *row,
FLOAT *avals,
INT *perm,
INT *invp,
FLOAT *b,
INT *rhs,
INT *iparm,
double *dparm)

Interface to the PaStiX API functions.

pastix_check_data_

Contains the rows and values arrays.

Summary
Types
pastix_check_data_tType coresponding to the struct pastix_check_data_

Types

pastix_check_data_t

Type coresponding to the struct pastix_check_data_

pastix_fortran

Fortran interface to the pastix function.

Parameters

pastix_dataData used for a step by step execution.
fortran_commMPI communicator which compute the resolution.
nSize of the system.
colptrTabular containing the start of each column in row and avals tabulars.
rowTabular containing the row number for each element sorted by column.
avalsTabular containing the values of each element sorted by column.
permPermutation tabular for the renumerotation of the unknowns.
invpReverse permutation tabular for the renumerotation of the unknowns.
bRight hand side vector(s).
rhsNumber of right hand side vector(s).
iparmInteger parameters given to pastix.
dparmDouble parameters given to pâstix.

dpastix_fortran

Fortran interface to the dpastix function.

Parameters

pastix_dataData used for a step by step execution.
fortran_commMPI communicator which compute the resolution.
nSize of the system.
colptrTabular containing the start of each column in row and avals tabulars.
rowTabular containing the row number for each element sorted by column.
avalsTabular containing the values of each element sorted by column.
loc2globGlobal column number of the local columns.
permPermutation tabular for the renumerotation of the unknowns.
invpReverse permutation tabular for the renumerotation of the unknowns.
bRight hand side vector(s).
rhsNumber of right hand side vector(s).
iparmInteger parameters given to pastix.
dparmDouble parameters given to pâstix.

pastix_fortran_bindthreads

Set rules to bind thread on processors.

Parameters

pastix_dataStructure to keep data between PaStiX calls
thrdnbrNumber of threads to use in pastix by MPI node.
bindtabTabular indicating which processor each thread has to be binded to.

pastix_fortran_checkmatrix

Check if the matrix is correct and can be given to PaStiX solver.

Parameters

data_checkInteger which will contain the <pastix_check_data_t> structure adress (output)
fortran_commPaStiX MPI communicator.
verbVerbosity level.
flagsymFlag indicating if the matrix is symetric (API_SYM_YES or API_SYM_NO)
flagcorIndicate if we permit the function to reallocate the matrix.
nSize of the matrix.
colptrTabular containing the start of each column in row and avals tabulars.
rowTabular containing the row number for each element sorted by column.
avalsTabular containing the values of each element sorted by column.
loc2globGlobal column number of the local columns, -1 if not distributed.
dofNumber of degrees of freedom.

pastix_fortran_checkmatrix_end

Copy the corrected CSC in the user CSC.

Parameters

data_checkInteger which will contain the <pastix_check_data_t> structure adress (output)
verbVerbosity level.
rowTabular into which to copy the new rows
valuesTabular into which to copy the new rows
dofNumber of degrees of freedom.

pastix_fortran_getlocalnodenbr

Give the node number in the new distribution computed by blend.  Needs blend to be runned with pastix_data before.

Parameters

pastix_dataData used for a step by step execution.
nodenbrpastix_int_t where to write node number.

pastix_fortran_getlocalnodelst

Fill in nodelst with the list of local nodes/clumns.  Needs nodelst to be allocated with nodenbr*sizeof(pastix_int_t), where nodenbr has been computed by <pastix_fortran_getLocalNodeNbr>.

Parameters

pastix_dataData used for a step by step execution.
nodelstAn array where to write the list of local nodes/columns.

cscd_addlocal_fortran

Interface to cscd_addlocal, for fortran calls.  Add second cscd to first cscd into third cscd (unallocated) Only adds columns from the second CSCD which belongs to the first one.

Parameters

nFirst cscd size
iaFirst cscd starting index of each column in ja and a
jaRow of each element in first CSCD
avalue of each cscd in first CSCD (can be NULL)
l2glocal 2 global column numbers for first cscd
addnCSCD to add size
addiaCSCD to add starting index of each column in addja and adda
addjaRow of each element in second CSCD
addavalue of each cscd in second CSCD (can be NULL -> add 0)
addl2glocal 2 global column numbers for second cscd
newnnew cscd size (same as first)
newiaCSCD to add starting index of each column in newja and newwa
newjaRow of each element in third CSCD
newavalue of each cscd in third CSCD
OPOperation to manage common CSCD coefficients.
dofNumber of degrees of freedom.

pastix_fortran_setschurunknownlist

Fortran interface to pastix_setSchurUnknownList

Parameters

pastix_dataData used for a step by step execution.
nNumber of unknowns.
listList of unknowns.
ierrerror value.

pastix_getschur

Fotran interface to pastix_getSchur

Schur complement is a dense block in a column scheme.

Parameters

pastix_dataData used for a step by step execution.
schurArray to fill-in with Schur complement.
ierrerror value.

pastix_fortran_getschurlocalnodenbr

Fortran interface to pastix_getSchurLocalNodeNbr

Compute the number of nodes in the local part of the Schur.

Parameters

pastix_dataCommon data structure for PaStiX calls.
nodeNbr(out) Number of nodes in schur (local).
ierrerror value.

Returns

NO_ERRFor the moment

TODO: Error management.

pastix_fortran_getschurlocalunknownnbr

Fortran interface to <pastix_getSchurLocalUnknownNbr>

Compute the number of unknowns in the local part of the Schur.

Parameters

pastix_dataCommon data structure for PaStiX calls.
unknownNbr(out) Number of nodes in schur (local).

Returns

NO_ERRFor the moment

TODO: Error management.

pastix_fortran_getschurlocalnodelist

Fortran interface to pastix_getSchurLocalNodeList

Compute the list of nodes in the local part of the Schur.

Parameters

pastix_dataCommon data structure for PaStiX calls.
nodes(out) Nodes in schur (local).
ierrerror value.

Returns

NO_ERRFor the moment

TODO: Error management.

pastix_fortran_getschurlocalunkownlist

Fortran interface to pastix_getSchurLocalUnkownList

Compute the list of unknowns in the local part of the Schur.

Parameters

pastix_dataCommon data structure for PaStiX calls.
unknowns(out) Unknowns in schur (local).
ierrerror value.

Returns

NO_ERRFor the moment

TODO: Error management.

pastix_fortran_setschurarray

Fortran interface to pastix_setSchurArray

Give user memory area to store schur in PaStiX.

Parameters

pastix_dataCommon data structure for PaStiX calls.
arrayMemory area to store the schur.
ierrerror value.

Returns

NO_ERRFor the moment

TODO: Error management.

void pastix_fortran (void *pastix_data,
MPI_Fint *fortran_comm,
INT *n,
INT *colptr,
INT *row,
FLOAT *avals,
INT *perm,
INT *invp,
FLOAT *b,
INT *rhs,
INT *iparm,
double *dparm)
Interface to the PaStiX API functions.
Contains the rows and values arrays.
void pastix(pastix_data_t **pastix_data,
MPI_Comm pastix_comm,
INT n,
INT *colptr,
INT *row,
FLOAT *avals,
INT *perm,
INT *invp,
FLOAT *b,
INT rhs,
INT *iparm,
double *dparm)
Computes steps of the resolution of Ax=b linear system, using direct methods.
Computes steps of the resolution of Ax=b linear system, using direct methods.
int cscd_addlocal(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,
CSCD_OPERATIONS_t OP,
int dof)
Interface to cscd_addlocal_int, for external usage.
Set the list of unknowns to isolate at the end of the matrix via permutations.
Get the Schur complement from PaStiX.
Compute the number of nodes in the local part of the Schur.
Compute the list of nodes in the local part of the Schur.
Compute the list of unknowns in the local part of the Schur.
Give user memory area to store Schur in PaStiX.
Close