PaStiX Handbook  6.3.2
Examples

This group describes how to use the solver with some examples. More...

Files

file  analyze.c
 A simple example that performs only the analyses steps onto the given graph.
 
file  compress.c
 A compression example that factorizes the matrix with the Just-In-Time strategy and Rank-Revealing kernels.
 
file  personal.c
 A step-by-step example with a personal ordering (identity).
 
file  reentrant.c
 A reentrant example that runs two threads then run two instances of the solver in each thread.
 
file  refinement.c
 A refinement example that runs iterative methods without applying the preconditioner (factorization and solve steps are not called). Based on the step-by-step example.
 
file  schur.c
 Schur usage example.
 
file  simple.c
 A simple example that reads the matrix and then runs pastix in one call.
 
file  step-by-step.c
 A step-by-step example that runs one full analyze (ordering, symbolic factorization, analyze), then loops over 2 factorizations that are both used for 2 solves each.
 

Functions

void pastixGetOptions (int argc, char **argv, pastix_int_t *iparam, double *dparam, int *check, int *scatter, spm_driver_t *driver, char **filename)
 PaStiX helper function to read command line options in examples. More...
 

Detailed Description

This group describes how to use the solver with some examples.

Function Documentation

◆ pastixGetOptions()

void pastixGetOptions ( int  argc,
char **  argv,
pastix_int_t iparam,
double *  dparam,
int *  check,
int *  scatter,
spm_driver_t *  driver,
char **  filename 
)

PaStiX helper function to read command line options in examples.

This function takes the command line arguments, and read the given parameters (integers and doubles), as well as the matrix filename and the driver to read it.

Parameters
[in]argcThe number of input parameters
[in]argvThe NULL terminated list of parameters
[in,out]iparamThe integer array of parameters. On entry, must be initialized to the default value with pastixInitParam(), On exit, is updated with any option that matches the pastix parameters.
[in,out]dparamThe double array of parameters. On entry, must be initialized to the default value with pastixInitParam(), On exit, is updated with any option that matches the pastix parameters.
[in,out]checkOn exit, the value is updated by the value of the -c option.
[in,out]scatterOn exit, the value is updated by the value of the -a option.
[in,out]driverOn exit, contains the driver type give as option. -1, if no driver is specified.
[out]filenameThe allocated string of the filename given with the driver.

Definition at line 149 of file get_options.c.

References GETOPT_STRING, IPARM_FACTORIZATION, IPARM_GPU_NBR, IPARM_ORDERING, IPARM_SCHEDULER, IPARM_THREAD_NBR, IPARM_VERBOSE, pastix_usage(), PastixOrderMetis, PastixOrderParMetis, PastixOrderPersonal, PastixOrderPtScotch, and PastixOrderScotch.