Adding Harwell-Boeing support in PETSc?

Hong Zhang hzhang at mcs.anl.gov
Thu Apr 7 09:40:13 CDT 2005


Victor,

The mmio.c I sent to you was obtained few years ago.
Your mmio.c diff from the current mmio.c on

diff Victor_mmio.c mmio.c
10d9
< #include <stdlib.h>
12a12
> #include <malloc.h>
251c251
<     if (fprintf(f, "%d %d\n", M, N) < 0)
---
>     if (fprintf(f, "%d %d\n", M, N) != 2)
393c393
<     if (ret_code < 0 )
---
>     if (ret_code !=2 )
441c441,453
<
---
>
>
> /**
> *  Create a new copy of a string s.  strdup() is a common routine, but
> *  not part of ANSI C, so it is included here.  Used by
mm_typecode_to_str().
> *
> */
> char *strdup(const char *s)
> {
>       int len = strlen(s);
>       char *s2 = (char *) malloc((len+1)*sizeof(char));
>       return strcpy(s2, s);
> }
446a459
>       char *strdup(const char *);

It seems the bug is on when to raise error flag?
I have been using several matrices converted from matrix market using
their mmio.c. I just want make sure the bug has not affected the
correctness of my converted matrices.

I'll put your mmio.c in petsc repository.

Thanks,

Hong


On Thu, 7 Apr 2005, Victor Eijkhout wrote:

> At 1:41 PM -0500 4/5/05, Hong Zhang wrote:
> >The files mm2petsc.c, mmio.c and mmio.h are attached.
>
> Years ago I found a couple of bugs in mmio.c and reported them to
> Roldan Pozo. Apparently they haven't been fixed. The good boy is too
> busy with other things.
> --
> Victor Eijkhout <eijkhout at cs.utk.edu>, 329 Claxton, Comp Sci, UT,
> Knoxville TN 37996.
> tel: 865 974 9308 (W), 865 673 6998 (H), 865 974 8296 (F)
> http://www.cs.utk.edu/~eijkhout/




More information about the petsc-dev mailing list