Changed IJMatrixCreate to not generate negative error code if ilower = iupper+1
and/or jlower = jupper+1 .
This commit is contained in:
parent
6479121532
commit
4845c3e12f
@ -54,16 +54,16 @@ int HYPRE_IJMatrixCreate( MPI_Comm comm, int ilower, int iupper,
|
||||
info[2] = jlower;
|
||||
info[3] = jupper;
|
||||
|
||||
if (ilower > iupper)
|
||||
if (ilower > iupper+1)
|
||||
{
|
||||
ierr = -11;
|
||||
printf("Warning! ilower larger than iupper!\n");
|
||||
printf("Warning! ilower larger than iupper+1!\n");
|
||||
}
|
||||
|
||||
if (jlower > jupper)
|
||||
if (jlower > jupper+1)
|
||||
{
|
||||
ierr = -12;
|
||||
printf("Warning! jlower larger than jupper!\n");
|
||||
printf("Warning! jlower larger than jupper+1!\n");
|
||||
}
|
||||
|
||||
/* Generate row- and column-partitioning through information exchange
|
||||
@ -81,7 +81,7 @@ int HYPRE_IJMatrixCreate( MPI_Comm comm, int ilower, int iupper,
|
||||
i4 = 4*i;
|
||||
if ( recv_buf[i4+1] != (recv_buf[i4+4]-1) )
|
||||
{
|
||||
printf("Warning -- row partitioning does not line up!\n");
|
||||
printf("Warning -- row partitioning does not line up! Partitioning incomplete!\n");
|
||||
ierr = -9;
|
||||
break;
|
||||
}
|
||||
@ -111,7 +111,7 @@ int HYPRE_IJMatrixCreate( MPI_Comm comm, int ilower, int iupper,
|
||||
i4 = 4*i;
|
||||
if (recv_buf[i4+3] != recv_buf[i4+6]-1)
|
||||
{
|
||||
printf("Warning -- col partitioning does not line up!\n");
|
||||
printf("Warning -- col partitioning does not line up! Partitioning incomplete!\n");
|
||||
ierr = -10;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user