diff --git a/drivers/laplacian.c b/drivers/laplacian.c index 6c94a5ee5bd86b01eff057ac015ee1ee0c91293e..5d06576dcf4ba466ad1fcdcf820dbf2e52b4a821 100644 --- a/drivers/laplacian.c +++ b/drivers/laplacian.c @@ -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': diff --git a/spm_read_driver.c b/spm_read_driver.c index 543d97ab122a40023015bb23f17a1937086427d5..094a8e0c59bc50a99038d1640e65515c4627f4b2 100644 --- a/spm_read_driver.c +++ b/spm_read_driver.c @@ -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));