From db160631846a71c1a09c1bb09ed817095b8d1c72 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 18 Oct 2006 08:07:58 +0000 Subject: [PATCH] Fixed problem with reallocation of CSR matrices. --- src/modules/psb_spmat_type.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/psb_spmat_type.f90 b/src/modules/psb_spmat_type.f90 index 1941a800..aee7906c 100644 --- a/src/modules/psb_spmat_type.f90 +++ b/src/modules/psb_spmat_type.f90 @@ -335,11 +335,11 @@ contains endif if (ifc_ == 1) then - call psb_realloc(nnz,a%ia1,a%ia2,a%aspk,info) + call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia1,a%ia2,a%aspk,info) else - call psb_realloc(nnz,a%aspk,info) + call psb_realloc(max(nnz,a%m+1,a%k+1),a%aspk,info) if (info /= 0) return - call psb_realloc(nnz,a%ia2,info) + call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia2,info) if (info /= 0) return call psb_realloc(ifc*nnz+200,a%ia1,info) if (info /= 0) return @@ -886,11 +886,11 @@ contains endif if (ifc_ == 1) then - call psb_realloc(nnz,a%ia1,a%ia2,a%aspk,info) + call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia1,a%ia2,a%aspk,info) else - call psb_realloc(nnz,a%aspk,info) + call psb_realloc(max(nnz,a%m+1,a%k+1),a%aspk,info) if (info /= 0) return - call psb_realloc(nnz,a%ia2,info) + call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia2,info) if (info /= 0) return call psb_realloc(ifc*nnz+200,a%ia1,info) if (info /= 0) return