Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b8979792 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Big cleanup in the getopt call and add the spmPrintInfo call to examples

parent f886b4c1
No related branches found
No related tags found
No related merge requests found
......@@ -90,9 +90,9 @@ laplacian_parse_info( const char *filename,
/* Look for the datatype */
{
char flt;
char *tmpf = strdup( filename );
char *tmpf = strndup( filename, 256 );
if ( sscanf( filename, "%c:%256s", &flt, tmpf ) == 2 ) {
if ( sscanf( filename, "%c:%254s", &flt, tmpf ) == 2 ) {
filename += 2;
switch( flt ){
case 'Z':
......
......@@ -88,29 +88,22 @@ spmReadDriver( pastix_driver_t driver,
case PastixDriverHB:
/* TODO: Possible to read the RHS, the solution or a guess of the solution */
printf("driver: HB file: %s\n", filename);
readHB( filename, spm );
break;
case PastixDriverIJV:
printf("driver: 3files file: %s\n", filename);
readIJV( filename, spm );
break;
case PastixDriverMM:
printf("driver: MatrixMarket file: %s\n", filename);
readMM( filename, spm );
break;
case PastixDriverLaplacian:
if (mpirank == 0)
printf("driver Laplacian: %s\n", filename);
genLaplacian( filename, spm );
break;
case PastixDriverXLaplacian:
if (mpirank == 0)
printf("driver Extended Laplacian: %s\n", filename);
genExtendedLaplacian( filename, spm );
break;
......@@ -148,7 +141,7 @@ spmReadDriver( pastix_driver_t driver,
break;
default:
fprintf(stderr, "driver: Driver not implemented\n");
fprintf(stderr, "spmReadDriver: Driver not implemented\n");
}
}
......@@ -159,9 +152,6 @@ spmReadDriver( pastix_driver_t driver,
MPI_Bcast( spm, sizeof(pastix_spm_t), MPI_CHAR, 0, comm );
MPI_Bcast( &nnz, 1, PASTIX_MPI_INT, 0, comm );
fprintf(stderr, "%d: mtxtype=%d, flttype=%d, nnz=%ld, gN=%ld\n",
mpirank, spm->mtxtype, spm->flttype, (long)nnz, (long)spm->gN );
if ( mpirank != 0 )
{
spm->colptr = (pastix_int_t *) malloc((spm->gN+1) * sizeof(pastix_int_t));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment