[petsc-dev] [Fortran] MatLoad() error: MatLoad is not supported for type: mpiaij!

Jed Brown jed at 59A2.org
Fri Sep 3 10:28:55 CDT 2010


On Fri, 3 Sep 2010 09:15:09 -0600 (GMT-06:00), Shri <abhyshr at mcs.anl.gov> wrote:
> Leo,
>     Jed and I both tried running a MatLoad example (see src/dm/da/examples/tests/ex35.c) with petsc configured in debug mode and had issues running it with your grid size 202 X 102 X 102. This example runs in a reasonable amount of time with the optimized petsc build. 
> I suggest running your code on a smaller grid (100 X100 X 100 seems to work fine in the debug mode) for now, get it working and then using the optimized petsc build (--debugging=0) for the large grid size.

I wrote an improved sort that doesn't have this bad behavior, but I'm
trying to figure out why the old one is okay in optimized mode.  See
here:

  http://gist.github.com/563948

The MEDIAN macro chooses the median of the first, last, and middle
element in the segment.  Performance looks like

  FAST -O1: 2.0 seconds
  FAST -O0: 5 seconds
  SLOW -O1: 2.3 seconds
  SLOW -O0: more than an hour

SLOW, which is basically the old implementation does a lot of shuffling
with the array and ends up hitting a bad case for quicksort (even with
the median choice).  What I don't understand, is that apparently
building SLOW with -O1 transforms the algorithm into something
asymptotically faster.  The assembly is a few hundred lines, and it's
not obvious to me what this transform would be.

Jed



More information about the petsc-dev mailing list