get_options.c

Definition of a global function to get exemple parameters.

Summary
get_options.cDefinition of a global function to get exemple parameters.
api_iparmreader
api_dparmreader
str_tolowerRewrites string in lower case.
getfilenameSets filename to source if source doesn’t starts with ‘-’.
getorderingSets ordering from source.
global_usagePrint usage corresponding to all pastix exemples.
get_optionsGet options from argv.
get_idparmGet options from argv.

api_iparmreader

int api_iparmreader(char *filename,
pastix_int_t *iparmtab)

api_dparmreader

int api_dparmreader(char *filename,
double *dparmtab)

str_tolower

int str_tolower(char *string)

Rewrites string in lower case.

Parameters

stringstring to rewrite in lower case.

getfilename

int getfilename(char **filename,
char *source,
char *defaultname)

Sets filename to source if source doesn’t starts with ‘-’.  Otherwise, filename is set to defaultname.

Parameters

filenamestring to set to correct filename.
sourcepossible source for filename.
defaultnamedefault filename.

Returns

0 if set to default.  1 if set to source.

getordering

int getordering(int *ordering,
char *source)

Sets ordering from source.

Parameters

orderinginteger to set to correct ordering.
sourcesource for ordering name.

Returns

EXIT_SUCCESS if ordering exists.  EXIT_FAILURE if ordering doesn’t exists.

global_usage

void global_usage(MPI_Comm mpi_comm,
char **argv)

Print usage corresponding to all pastix exemples.

Parameters

mpi_commMPI communicator.
argvprogram argument

get_options

int get_options(int argc,
char **argv,
driver_type_t **driver_type,
char ***filename,
int *nbmatrices,
int *nbthread,
int *verbose,
int *ordering,
int *incomplete,
int *level_of_fill,
int *amalgamation,
int *ooc,
pastix_int_t *size)

Get options from argv.

Parameters

argcnumber of arguments.
argvargument tabular.
driver_typetype of driver (output, -1 if not set).
filenameMatrix filename (output).
nbmatricesnumber of matrices in arguments.
nbthreadnumber of thread (output, 1 if not set).
verboseverbose level 1,2 or 3
orderingordering to choose (see API_ORDER).
incompleteindicate if -incomp is present
level_of_fillLevel of fill for incomplete factorization.
amalgamationAmalgamation for kass.
oocOut-of-core limite (Mo or percent depending on compilation option)
sizeSize of the matrix (generated matrix only)

get_idparm

int get_idparm(int argc,
char **argv,
pastix_int_t *iparm,
double *dparm)

Get options from argv.

Parameters

argcnumber of arguments.
argvargument tabular.
iparmtype of driver (output, -1 if not set).
dparmtype of driver (output, -1 if not set).
int api_iparmreader(char *filename,
pastix_int_t *iparmtab)
int api_dparmreader(char *filename,
double *dparmtab)
int str_tolower(char *string)
Rewrites string in lower case.
int getfilename(char **filename,
char *source,
char *defaultname)
Sets filename to source if source doesn’t starts with ‘-’.
int getordering(int *ordering,
char *source)
Sets ordering from source.
void global_usage(MPI_Comm mpi_comm,
char **argv)
Print usage corresponding to all pastix exemples.
int get_options(int argc,
char **argv,
driver_type_t **driver_type,
char ***filename,
int *nbmatrices,
int *nbthread,
int *verbose,
int *ordering,
int *incomplete,
int *level_of_fill,
int *amalgamation,
int *ooc,
pastix_int_t *size)
Get options from argv.
int get_idparm(int argc,
char **argv,
pastix_int_t *iparm,
double *dparm)
Get options from argv.
enum API_ORDER
Ordering modes (index IPARM_ORDERING)
Close