From e97cab7ddc3a6a737bc2ba3f53f49cbfa4f147f4 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sun, 15 Dec 2019 18:36:34 +0000 Subject: [PATCH] Take out N from alloc_vect --- base/modules/tools/psb_c_tools_mod.f90 | 3 +-- base/modules/tools/psb_d_tools_mod.f90 | 3 +-- base/modules/tools/psb_i_tools_mod.f90 | 3 +-- base/modules/tools/psb_l_tools_mod.f90 | 3 +-- base/modules/tools/psb_s_tools_mod.f90 | 3 +-- base/modules/tools/psb_z_tools_mod.f90 | 3 +-- base/tools/psb_callc.f90 | 21 ++++++++++++++------- base/tools/psb_dallc.f90 | 21 ++++++++++++++------- base/tools/psb_iallc.f90 | 21 ++++++++++++++------- base/tools/psb_lallc.f90 | 21 ++++++++++++++------- base/tools/psb_sallc.f90 | 21 ++++++++++++++------- base/tools/psb_zallc.f90 | 21 ++++++++++++++------- 12 files changed, 90 insertions(+), 54 deletions(-) diff --git a/base/modules/tools/psb_c_tools_mod.f90 b/base/modules/tools/psb_c_tools_mod.f90 index cf838af4..bf02bdc5 100644 --- a/base/modules/tools/psb_c_tools_mod.f90 +++ b/base/modules/tools/psb_c_tools_mod.f90 @@ -37,13 +37,12 @@ Module psb_c_tools_mod use psb_c_multivect_mod, only : psb_c_base_multivect_type, psb_c_multivect_type interface psb_geall - subroutine psb_calloc_vect(x, desc_a,info,n) + subroutine psb_calloc_vect(x, desc_a,info) import implicit none type(psb_c_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n end subroutine psb_calloc_vect subroutine psb_calloc_vect_r2(x, desc_a,info,n,lb) import diff --git a/base/modules/tools/psb_d_tools_mod.f90 b/base/modules/tools/psb_d_tools_mod.f90 index c88795b6..faf91045 100644 --- a/base/modules/tools/psb_d_tools_mod.f90 +++ b/base/modules/tools/psb_d_tools_mod.f90 @@ -37,13 +37,12 @@ Module psb_d_tools_mod use psb_d_multivect_mod, only : psb_d_base_multivect_type, psb_d_multivect_type interface psb_geall - subroutine psb_dalloc_vect(x, desc_a,info,n) + subroutine psb_dalloc_vect(x, desc_a,info) import implicit none type(psb_d_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n end subroutine psb_dalloc_vect subroutine psb_dalloc_vect_r2(x, desc_a,info,n,lb) import diff --git a/base/modules/tools/psb_i_tools_mod.f90 b/base/modules/tools/psb_i_tools_mod.f90 index 8378dcfb..1faffd66 100644 --- a/base/modules/tools/psb_i_tools_mod.f90 +++ b/base/modules/tools/psb_i_tools_mod.f90 @@ -36,13 +36,12 @@ Module psb_i_tools_mod use psb_i_multivect_mod, only : psb_i_base_multivect_type, psb_i_multivect_type interface psb_geall - subroutine psb_ialloc_vect(x, desc_a,info,n) + subroutine psb_ialloc_vect(x, desc_a,info) import implicit none type(psb_i_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n end subroutine psb_ialloc_vect subroutine psb_ialloc_vect_r2(x, desc_a,info,n,lb) import diff --git a/base/modules/tools/psb_l_tools_mod.f90 b/base/modules/tools/psb_l_tools_mod.f90 index 4eca54f3..96f44fd7 100644 --- a/base/modules/tools/psb_l_tools_mod.f90 +++ b/base/modules/tools/psb_l_tools_mod.f90 @@ -36,13 +36,12 @@ Module psb_l_tools_mod use psb_l_multivect_mod, only : psb_l_base_multivect_type, psb_l_multivect_type interface psb_geall - subroutine psb_lalloc_vect(x, desc_a,info,n) + subroutine psb_lalloc_vect(x, desc_a,info) import implicit none type(psb_l_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n end subroutine psb_lalloc_vect subroutine psb_lalloc_vect_r2(x, desc_a,info,n,lb) import diff --git a/base/modules/tools/psb_s_tools_mod.f90 b/base/modules/tools/psb_s_tools_mod.f90 index 8a67ed5f..59c576a0 100644 --- a/base/modules/tools/psb_s_tools_mod.f90 +++ b/base/modules/tools/psb_s_tools_mod.f90 @@ -37,13 +37,12 @@ Module psb_s_tools_mod use psb_s_multivect_mod, only : psb_s_base_multivect_type, psb_s_multivect_type interface psb_geall - subroutine psb_salloc_vect(x, desc_a,info,n) + subroutine psb_salloc_vect(x, desc_a,info) import implicit none type(psb_s_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n end subroutine psb_salloc_vect subroutine psb_salloc_vect_r2(x, desc_a,info,n,lb) import diff --git a/base/modules/tools/psb_z_tools_mod.f90 b/base/modules/tools/psb_z_tools_mod.f90 index 476dfd02..185aba04 100644 --- a/base/modules/tools/psb_z_tools_mod.f90 +++ b/base/modules/tools/psb_z_tools_mod.f90 @@ -37,13 +37,12 @@ Module psb_z_tools_mod use psb_z_multivect_mod, only : psb_z_base_multivect_type, psb_z_multivect_type interface psb_geall - subroutine psb_zalloc_vect(x, desc_a,info,n) + subroutine psb_zalloc_vect(x, desc_a,info) import implicit none type(psb_z_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n end subroutine psb_zalloc_vect subroutine psb_zalloc_vect_r2(x, desc_a,info,n,lb) import diff --git a/base/tools/psb_callc.f90 b/base/tools/psb_callc.f90 index 6464ab3b..19924fbe 100644 --- a/base/tools/psb_callc.f90 +++ b/base/tools/psb_callc.f90 @@ -32,17 +32,15 @@ ! ! File: psb_callc.f90 ! -! Function: psb_calloc -! Allocates dense matrix for PSBLAS routines. +! Function: psb_calloc_vect +! Allocates dense vector for PSBLAS routines. ! The descriptor may be in either the build or assembled state. ! ! Arguments: -! x - the matrix to be allocated. +! x - the vector to be allocated. ! desc_a - the communication descriptor. ! info - Return code -! n - optional number of columns. -! lb - optional lower bound on column indices -subroutine psb_calloc_vect(x, desc_a,info,n) +subroutine psb_calloc_vect(x, desc_a,info) use psb_base_mod, psb_protect_name => psb_calloc_vect use psi_mod implicit none @@ -51,7 +49,6 @@ subroutine psb_calloc_vect(x, desc_a,info,n) type(psb_c_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n !locals integer(psb_ipk_) :: np,me,nr,i,err_act @@ -113,6 +110,16 @@ subroutine psb_calloc_vect(x, desc_a,info,n) return end subroutine psb_calloc_vect +! Function: psb_calloc_vect_r2 +! Allocates a vector of dense vectors for PSBLAS routines. +! The descriptor may be in either the build or assembled state. +! +! Arguments: +! x - the vector to be allocated. +! desc_a - the communication descriptor. +! info - Return code +! n - optional number of columns. +! lb - optional lower bound on column indices subroutine psb_calloc_vect_r2(x, desc_a,info,n,lb) use psb_base_mod, psb_protect_name => psb_calloc_vect_r2 diff --git a/base/tools/psb_dallc.f90 b/base/tools/psb_dallc.f90 index ac812ca7..73611ad7 100644 --- a/base/tools/psb_dallc.f90 +++ b/base/tools/psb_dallc.f90 @@ -32,17 +32,15 @@ ! ! File: psb_dallc.f90 ! -! Function: psb_dalloc -! Allocates dense matrix for PSBLAS routines. +! Function: psb_dalloc_vect +! Allocates dense vector for PSBLAS routines. ! The descriptor may be in either the build or assembled state. ! ! Arguments: -! x - the matrix to be allocated. +! x - the vector to be allocated. ! desc_a - the communication descriptor. ! info - Return code -! n - optional number of columns. -! lb - optional lower bound on column indices -subroutine psb_dalloc_vect(x, desc_a,info,n) +subroutine psb_dalloc_vect(x, desc_a,info) use psb_base_mod, psb_protect_name => psb_dalloc_vect use psi_mod implicit none @@ -51,7 +49,6 @@ subroutine psb_dalloc_vect(x, desc_a,info,n) type(psb_d_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n !locals integer(psb_ipk_) :: np,me,nr,i,err_act @@ -113,6 +110,16 @@ subroutine psb_dalloc_vect(x, desc_a,info,n) return end subroutine psb_dalloc_vect +! Function: psb_dalloc_vect_r2 +! Allocates a vector of dense vectors for PSBLAS routines. +! The descriptor may be in either the build or assembled state. +! +! Arguments: +! x - the vector to be allocated. +! desc_a - the communication descriptor. +! info - Return code +! n - optional number of columns. +! lb - optional lower bound on column indices subroutine psb_dalloc_vect_r2(x, desc_a,info,n,lb) use psb_base_mod, psb_protect_name => psb_dalloc_vect_r2 diff --git a/base/tools/psb_iallc.f90 b/base/tools/psb_iallc.f90 index 8f0ab312..65f5f1da 100644 --- a/base/tools/psb_iallc.f90 +++ b/base/tools/psb_iallc.f90 @@ -32,17 +32,15 @@ ! ! File: psb_iallc.f90 ! -! Function: psb_ialloc -! Allocates dense matrix for PSBLAS routines. +! Function: psb_ialloc_vect +! Allocates dense vector for PSBLAS routines. ! The descriptor may be in either the build or assembled state. ! ! Arguments: -! x - the matrix to be allocated. +! x - the vector to be allocated. ! desc_a - the communication descriptor. ! info - Return code -! n - optional number of columns. -! lb - optional lower bound on column indices -subroutine psb_ialloc_vect(x, desc_a,info,n) +subroutine psb_ialloc_vect(x, desc_a,info) use psb_base_mod, psb_protect_name => psb_ialloc_vect use psi_mod implicit none @@ -51,7 +49,6 @@ subroutine psb_ialloc_vect(x, desc_a,info,n) type(psb_i_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n !locals integer(psb_ipk_) :: np,me,nr,i,err_act @@ -113,6 +110,16 @@ subroutine psb_ialloc_vect(x, desc_a,info,n) return end subroutine psb_ialloc_vect +! Function: psb_ialloc_vect_r2 +! Allocates a vector of dense vectors for PSBLAS routines. +! The descriptor may be in either the build or assembled state. +! +! Arguments: +! x - the vector to be allocated. +! desc_a - the communication descriptor. +! info - Return code +! n - optional number of columns. +! lb - optional lower bound on column indices subroutine psb_ialloc_vect_r2(x, desc_a,info,n,lb) use psb_base_mod, psb_protect_name => psb_ialloc_vect_r2 diff --git a/base/tools/psb_lallc.f90 b/base/tools/psb_lallc.f90 index 66731177..e397f7cb 100644 --- a/base/tools/psb_lallc.f90 +++ b/base/tools/psb_lallc.f90 @@ -32,17 +32,15 @@ ! ! File: psb_lallc.f90 ! -! Function: psb_lalloc -! Allocates dense matrix for PSBLAS routines. +! Function: psb_lalloc_vect +! Allocates dense vector for PSBLAS routines. ! The descriptor may be in either the build or assembled state. ! ! Arguments: -! x - the matrix to be allocated. +! x - the vector to be allocated. ! desc_a - the communication descriptor. ! info - Return code -! n - optional number of columns. -! lb - optional lower bound on column indices -subroutine psb_lalloc_vect(x, desc_a,info,n) +subroutine psb_lalloc_vect(x, desc_a,info) use psb_base_mod, psb_protect_name => psb_lalloc_vect use psi_mod implicit none @@ -51,7 +49,6 @@ subroutine psb_lalloc_vect(x, desc_a,info,n) type(psb_l_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n !locals integer(psb_ipk_) :: np,me,nr,i,err_act @@ -113,6 +110,16 @@ subroutine psb_lalloc_vect(x, desc_a,info,n) return end subroutine psb_lalloc_vect +! Function: psb_lalloc_vect_r2 +! Allocates a vector of dense vectors for PSBLAS routines. +! The descriptor may be in either the build or assembled state. +! +! Arguments: +! x - the vector to be allocated. +! desc_a - the communication descriptor. +! info - Return code +! n - optional number of columns. +! lb - optional lower bound on column indices subroutine psb_lalloc_vect_r2(x, desc_a,info,n,lb) use psb_base_mod, psb_protect_name => psb_lalloc_vect_r2 diff --git a/base/tools/psb_sallc.f90 b/base/tools/psb_sallc.f90 index 9cbb6f8f..6e20f82e 100644 --- a/base/tools/psb_sallc.f90 +++ b/base/tools/psb_sallc.f90 @@ -32,17 +32,15 @@ ! ! File: psb_sallc.f90 ! -! Function: psb_salloc -! Allocates dense matrix for PSBLAS routines. +! Function: psb_salloc_vect +! Allocates dense vector for PSBLAS routines. ! The descriptor may be in either the build or assembled state. ! ! Arguments: -! x - the matrix to be allocated. +! x - the vector to be allocated. ! desc_a - the communication descriptor. ! info - Return code -! n - optional number of columns. -! lb - optional lower bound on column indices -subroutine psb_salloc_vect(x, desc_a,info,n) +subroutine psb_salloc_vect(x, desc_a,info) use psb_base_mod, psb_protect_name => psb_salloc_vect use psi_mod implicit none @@ -51,7 +49,6 @@ subroutine psb_salloc_vect(x, desc_a,info,n) type(psb_s_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n !locals integer(psb_ipk_) :: np,me,nr,i,err_act @@ -113,6 +110,16 @@ subroutine psb_salloc_vect(x, desc_a,info,n) return end subroutine psb_salloc_vect +! Function: psb_salloc_vect_r2 +! Allocates a vector of dense vectors for PSBLAS routines. +! The descriptor may be in either the build or assembled state. +! +! Arguments: +! x - the vector to be allocated. +! desc_a - the communication descriptor. +! info - Return code +! n - optional number of columns. +! lb - optional lower bound on column indices subroutine psb_salloc_vect_r2(x, desc_a,info,n,lb) use psb_base_mod, psb_protect_name => psb_salloc_vect_r2 diff --git a/base/tools/psb_zallc.f90 b/base/tools/psb_zallc.f90 index e01f0af2..1bf67e74 100644 --- a/base/tools/psb_zallc.f90 +++ b/base/tools/psb_zallc.f90 @@ -32,17 +32,15 @@ ! ! File: psb_zallc.f90 ! -! Function: psb_zalloc -! Allocates dense matrix for PSBLAS routines. +! Function: psb_zalloc_vect +! Allocates dense vector for PSBLAS routines. ! The descriptor may be in either the build or assembled state. ! ! Arguments: -! x - the matrix to be allocated. +! x - the vector to be allocated. ! desc_a - the communication descriptor. ! info - Return code -! n - optional number of columns. -! lb - optional lower bound on column indices -subroutine psb_zalloc_vect(x, desc_a,info,n) +subroutine psb_zalloc_vect(x, desc_a,info) use psb_base_mod, psb_protect_name => psb_zalloc_vect use psi_mod implicit none @@ -51,7 +49,6 @@ subroutine psb_zalloc_vect(x, desc_a,info,n) type(psb_z_vect_type), intent(out) :: x type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_),intent(out) :: info - integer(psb_ipk_), optional, intent(in) :: n !locals integer(psb_ipk_) :: np,me,nr,i,err_act @@ -113,6 +110,16 @@ subroutine psb_zalloc_vect(x, desc_a,info,n) return end subroutine psb_zalloc_vect +! Function: psb_zalloc_vect_r2 +! Allocates a vector of dense vectors for PSBLAS routines. +! The descriptor may be in either the build or assembled state. +! +! Arguments: +! x - the vector to be allocated. +! desc_a - the communication descriptor. +! info - Return code +! n - optional number of columns. +! lb - optional lower bound on column indices subroutine psb_zalloc_vect_r2(x, desc_a,info,n,lb) use psb_base_mod, psb_protect_name => psb_zalloc_vect_r2