From e1cd09b45768d39ca6c484cb5d62da2e1046baa8 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sat, 3 Jan 2015 14:38:39 +0000 Subject: [PATCH] psblas3: base/serial/impl/psb_c_csr_impl.f90 base/serial/impl/psb_d_csr_impl.f90 base/serial/impl/psb_s_csr_impl.f90 base/serial/impl/psb_z_csr_impl.f90 Fix silly bug in cp_from_coo --- base/serial/impl/psb_c_csr_impl.f90 | 6 +++--- base/serial/impl/psb_d_csr_impl.f90 | 6 +++--- base/serial/impl/psb_s_csr_impl.f90 | 6 +++--- base/serial/impl/psb_z_csr_impl.f90 | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/base/serial/impl/psb_c_csr_impl.f90 b/base/serial/impl/psb_c_csr_impl.f90 index 54ffd6e3..ea69b2ea 100644 --- a/base/serial/impl/psb_c_csr_impl.f90 +++ b/base/serial/impl/psb_c_csr_impl.f90 @@ -2702,9 +2702,9 @@ subroutine psb_c_cp_csr_from_coo(a,b,info) ! Dirty trick: call move_alloc to have the new data allocated just once. call psb_safe_ab_cpy(b%ia,itemp,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) - if (info /= psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) + if (info == psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) endif diff --git a/base/serial/impl/psb_d_csr_impl.f90 b/base/serial/impl/psb_d_csr_impl.f90 index 544c153a..e1728baf 100644 --- a/base/serial/impl/psb_d_csr_impl.f90 +++ b/base/serial/impl/psb_d_csr_impl.f90 @@ -2702,9 +2702,9 @@ subroutine psb_d_cp_csr_from_coo(a,b,info) ! Dirty trick: call move_alloc to have the new data allocated just once. call psb_safe_ab_cpy(b%ia,itemp,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) - if (info /= psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) + if (info == psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) endif diff --git a/base/serial/impl/psb_s_csr_impl.f90 b/base/serial/impl/psb_s_csr_impl.f90 index c91b16e3..ed0a4982 100644 --- a/base/serial/impl/psb_s_csr_impl.f90 +++ b/base/serial/impl/psb_s_csr_impl.f90 @@ -2702,9 +2702,9 @@ subroutine psb_s_cp_csr_from_coo(a,b,info) ! Dirty trick: call move_alloc to have the new data allocated just once. call psb_safe_ab_cpy(b%ia,itemp,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) - if (info /= psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) + if (info == psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) endif diff --git a/base/serial/impl/psb_z_csr_impl.f90 b/base/serial/impl/psb_z_csr_impl.f90 index a9a8571a..d9e9cb89 100644 --- a/base/serial/impl/psb_z_csr_impl.f90 +++ b/base/serial/impl/psb_z_csr_impl.f90 @@ -2702,9 +2702,9 @@ subroutine psb_z_cp_csr_from_coo(a,b,info) ! Dirty trick: call move_alloc to have the new data allocated just once. call psb_safe_ab_cpy(b%ia,itemp,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) - if (info /= psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) - if (info /= psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%ja,a%ja,info) + if (info == psb_success_) call psb_safe_ab_cpy(b%val,a%val,info) + if (info == psb_success_) call psb_realloc(max(nr+1,nc+1),a%irp,info) endif