From f51126b977f6b5f7804b1fc02ded66643ab26307 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 23 Sep 2008 12:09:04 +0000 Subject: [PATCH] mld2p4-dev: Fixes for possible empty local row set. --- examples/pdegen/mld_dexample_1lev.f90 | 2 +- examples/pdegen/mld_dexample_ml.f90 | 2 +- examples/pdegen/mld_sexample_1lev.f90 | 2 +- examples/pdegen/mld_sexample_ml.f90 | 2 +- tests/pdegen/ppde.f90 | 2 +- tests/pdegen/spde.f90 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/pdegen/mld_dexample_1lev.f90 b/examples/pdegen/mld_dexample_1lev.f90 index f52404f9..5197c4db 100644 --- a/examples/pdegen/mld_dexample_1lev.f90 +++ b/examples/pdegen/mld_dexample_1lev.f90 @@ -322,7 +322,7 @@ contains ! Using a simple BLOCK distribution. ! nt = (m+np-1)/np - nr = min(nt,m-(iam*nt)) + nr = max(0,min(nt,m-(iam*nt))) nt = nr call psb_sum(ictxt,nt) diff --git a/examples/pdegen/mld_dexample_ml.f90 b/examples/pdegen/mld_dexample_ml.f90 index 56eeb3de..5e33ad40 100644 --- a/examples/pdegen/mld_dexample_ml.f90 +++ b/examples/pdegen/mld_dexample_ml.f90 @@ -360,7 +360,7 @@ contains ! Using a simple BLOCK distribution. ! nt = (m+np-1)/np - nr = min(nt,m-(iam*nt)) + nr = max(0,min(nt,m-(iam*nt))) nt = nr call psb_sum(ictxt,nt) diff --git a/examples/pdegen/mld_sexample_1lev.f90 b/examples/pdegen/mld_sexample_1lev.f90 index fe6f5aeb..2c79ffad 100644 --- a/examples/pdegen/mld_sexample_1lev.f90 +++ b/examples/pdegen/mld_sexample_1lev.f90 @@ -323,7 +323,7 @@ contains ! Using a simple BLOCK distribution. ! nt = (m+np-1)/np - nr = min(nt,m-(iam*nt)) + nr = max(0,min(nt,m-(iam*nt))) nt = nr call psb_sum(ictxt,nt) diff --git a/examples/pdegen/mld_sexample_ml.f90 b/examples/pdegen/mld_sexample_ml.f90 index 721be329..3cf35faa 100644 --- a/examples/pdegen/mld_sexample_ml.f90 +++ b/examples/pdegen/mld_sexample_ml.f90 @@ -361,7 +361,7 @@ contains ! Using a simple BLOCK distribution. ! nt = (m+np-1)/np - nr = min(nt,m-(iam*nt)) + nr = max(0,min(nt,m-(iam*nt))) nt = nr call psb_sum(ictxt,nt) diff --git a/tests/pdegen/ppde.f90 b/tests/pdegen/ppde.f90 index caa80fe1..fd2d7464 100644 --- a/tests/pdegen/ppde.f90 +++ b/tests/pdegen/ppde.f90 @@ -456,7 +456,7 @@ contains ! Using a simple BLOCK distribution. ! nt = (m+np-1)/np - nr = min(nt,m-(iam*nt)) + nr = max(0,min(nt,m-(iam*nt))) nt = nr call psb_sum(ictxt,nt) diff --git a/tests/pdegen/spde.f90 b/tests/pdegen/spde.f90 index f8ffc16c..0caf2e9f 100644 --- a/tests/pdegen/spde.f90 +++ b/tests/pdegen/spde.f90 @@ -456,7 +456,7 @@ contains ! Using a simple BLOCK distribution. ! nt = (m+np-1)/np - nr = min(nt,m-(iam*nt)) + nr = max(0,min(nt,m-(iam*nt))) nt = nr call psb_sum(ictxt,nt)