A simple example that performs only the analyses steps onto the given graph.
These tests doesn't require the values of the matrix.
/
#include <spm.h>
#include <limits.h>
int main (int argc, char **argv)
{
double dparm[DPARM_SIZE];
spm_driver_t driver;
char *filename = NULL;
spmatrix_t *spm, spm2;
int rc;
int scatter = 0;
iparm, dparm,
NULL, &scatter, &driver, &filename );
pastixInit( &pastix_data, MPI_COMM_WORLD, iparm, dparm );
spm = malloc( sizeof( spmatrix_t ) );
if ( scatter ) {
rc = spmReadDriverDist( driver, filename, spm, MPI_COMM_WORLD );
}
else {
rc = spmReadDriver( driver, filename, spm );
}
free( filename );
if ( rc != SPM_SUCCESS ) {
return rc;
}
spmPrintInfo( spm, stdout );
rc = spmCheckAndCorrect( spm, &spm2 );
if ( rc != 0 ) {
spmExit( spm );
*spm = spm2;
rc = 0;
}
spmExit( spm );
free( spm );
return EXIT_SUCCESS;
}
BEGIN_C_DECLS typedef int pastix_int_t
void pastixFinalize(pastix_data_t **pastix_data)
Finalize the solver instance.
void pastixInitParam(pastix_int_t *iparm, double *dparm)
Initialize the iparm and dparm arrays to their default values.
void pastixInit(pastix_data_t **pastix_data, PASTIX_Comm pastix_comm, pastix_int_t *iparm, double *dparm)
Initialize the solver instance.
void pastixGetOptions(int argc, char **argv, pastix_int_t *iparm, double *dparm, int *check, int *scatter, spm_driver_t *driver, char **filename)
PaStiX helper function to read command line options in examples.
int pastix_task_analyze(pastix_data_t *pastix_data, const spmatrix_t *spm)
Perform all the preprocessing steps: ordering, symbolic factorization, reordering,...
Main PaStiX data structure.