From 1c49f3ed5e7c8c35c442141ede51d1045f26f531 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 15 Oct 2009 13:25:01 +0000 Subject: [PATCH] psblas3: base/modules/psb_base_mat_mod.f03 base/serial/f03/psb_c_coo_impl.f03 base/serial/f03/psb_d_coo_impl.f03 base/serial/f03/psb_s_coo_impl.f03 base/serial/f03/psb_z_coo_impl.f03 Fixed idiotic bug in mv_coo_from_coo. --- base/modules/psb_base_mat_mod.f03 | 11 +++-------- base/serial/f03/psb_c_coo_impl.f03 | 5 ----- base/serial/f03/psb_d_coo_impl.f03 | 5 ----- base/serial/f03/psb_s_coo_impl.f03 | 5 ----- base/serial/f03/psb_z_coo_impl.f03 | 5 ----- 5 files changed, 3 insertions(+), 28 deletions(-) diff --git a/base/modules/psb_base_mat_mod.f03 b/base/modules/psb_base_mat_mod.f03 index 77db65e9..bda73a73 100644 --- a/base/modules/psb_base_mat_mod.f03 +++ b/base/modules/psb_base_mat_mod.f03 @@ -483,10 +483,8 @@ contains a%unitd = b%unitd a%upper = b%upper a%sorted = b%sorted - if (allocated(b%aux)) then - allocate(a%aux(size(b%aux))) - a%aux(:) = b%aux(:) - end if + a%aux = b%aux + return end subroutine base_cp_from @@ -510,10 +508,7 @@ contains a%unitd = b%unitd a%upper = .not.b%upper a%sorted = .false. - if (allocated(b%aux)) then - allocate(a%aux(size(b%aux))) - a%aux(:) = b%aux(:) - end if + a%aux = b%aux return diff --git a/base/serial/f03/psb_c_coo_impl.f03 b/base/serial/f03/psb_c_coo_impl.f03 index 726d6381..4592d48a 100644 --- a/base/serial/f03/psb_c_coo_impl.f03 +++ b/base/serial/f03/psb_c_coo_impl.f03 @@ -2580,11 +2580,6 @@ subroutine c_mv_coo_from_coo_impl(a,b,info) call move_alloc(b%ja , a%ja ) call move_alloc(b%val, a%val ) call b%free() - - a%ia(:) = b%ia(:) - a%ja(:) = b%ja(:) - a%val(:) = b%val(:) - call a%fix(info) if (info /= 0) goto 9999 diff --git a/base/serial/f03/psb_d_coo_impl.f03 b/base/serial/f03/psb_d_coo_impl.f03 index 7abf5941..6a8fd6d5 100644 --- a/base/serial/f03/psb_d_coo_impl.f03 +++ b/base/serial/f03/psb_d_coo_impl.f03 @@ -2380,11 +2380,6 @@ subroutine d_mv_coo_from_coo_impl(a,b,info) call move_alloc(b%ja , a%ja ) call move_alloc(b%val, a%val ) call b%free() - - a%ia(:) = b%ia(:) - a%ja(:) = b%ja(:) - a%val(:) = b%val(:) - call a%fix(info) if (info /= 0) goto 9999 diff --git a/base/serial/f03/psb_s_coo_impl.f03 b/base/serial/f03/psb_s_coo_impl.f03 index 5e7f7851..ccb4dcee 100644 --- a/base/serial/f03/psb_s_coo_impl.f03 +++ b/base/serial/f03/psb_s_coo_impl.f03 @@ -2378,11 +2378,6 @@ subroutine s_mv_coo_from_coo_impl(a,b,info) call move_alloc(b%ja , a%ja ) call move_alloc(b%val, a%val ) call b%free() - - a%ia(:) = b%ia(:) - a%ja(:) = b%ja(:) - a%val(:) = b%val(:) - call a%fix(info) if (info /= 0) goto 9999 diff --git a/base/serial/f03/psb_z_coo_impl.f03 b/base/serial/f03/psb_z_coo_impl.f03 index 6d761996..a4d33485 100644 --- a/base/serial/f03/psb_z_coo_impl.f03 +++ b/base/serial/f03/psb_z_coo_impl.f03 @@ -2580,11 +2580,6 @@ subroutine z_mv_coo_from_coo_impl(a,b,info) call move_alloc(b%ja , a%ja ) call move_alloc(b%val, a%val ) call b%free() - - a%ia(:) = b%ia(:) - a%ja(:) = b%ja(:) - a%val(:) = b%val(:) - call a%fix(info) if (info /= 0) goto 9999