<div dir="ltr"><div>Barry, </div><div><br></div><div>GAMG must be setting up the ASM incorrectly, on empty processors, when using the aggregates.  In asm.c, I see that osm->is_local is NULL for empty processors, and this causes a problem when this branch is taken by less than 8 processes (of 8):</div><div><br></div><div><div>      if (osm->is_local) { // asm.c:282</div><div>       ....</div><div>        ierr = VecScatterCreate(vec,osm->is_local[i],osm->y_local[i],isl,&osm->prolongation[i]);CHKERRQ(ierr);</div></div><div><br></div><div>I get an error "MPI_Allreduce() called in different locations (code lines) on different processors ", because "vec" here is global. This gamg.c code must not be correct:</div><div><br></div><div><div>        if (!sz) {</div><div>          IS       is;</div><div>          ierr = ISCreateGeneral(PETSC_COMM_SELF, 0, NULL, PETSC_COPY_VALUES, &is);CHKERRQ(ierr);</div><div>          ierr = PCASMSetLocalSubdomains(subpc, 1, &is, NULL);CHKERRQ(ierr);</div><div>          ierr = ISDestroy(&is);CHKERRQ(ierr);</div><div>        } else {</div><div>          ....</div><div>        }</div></div><div><br></div><div>I will look into why osm->is_local seems to be NULL here when it should have an empty IS.</div><div><br></div><div>Mark</div></div>