Compare commits

..
Author SHA1 Message Date
sfilippone a67d8a03ff Fix AMG cbind interface 2026-06-15 17:02:54 +02:00
sfilippone afac12f35b Test merging of main/kinsol-stop 2026-06-15 16:18:05 +02:00
sfilippone a3e1be46ee Fix matrix generation 2026-05-05 16:45:06 +02:00
sfilippone 3343b039e6 Fix sample matrix generators 2026-05-05 15:52:03 +02:00
sfilippone 5c055170e7 Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-05-05 15:34:47 +02:00
sfilippone 0814492adc Mods jac solver 2026-05-05 15:33:45 +02:00
sfilippone 1ae3cc135f Improve error handling for prec%free 2026-05-04 20:50:34 +02:00
sfilippone 246992cb65 Add base matrix info to prec%descr 2026-04-27 13:04:50 +02:00
sfilippone 01cc7ada88 Adjust strategy for stopping on aggregation ratio 2026-04-27 13:04:04 +02:00
sfilippone 693eab66cb Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-04-16 14:59:33 +02:00
sfilippone 1a2ec161d7 Improve configry for MUMPS 2026-04-16 14:59:11 +02:00
sfilippone 4642c857d1 Improve MUMPS solver build 2026-04-16 14:58:59 +02:00
sfilippone c8d065fa55 Fix double allocation in DDIAG%BLD 2026-04-15 10:19:50 +02:00
sfilippone 0e1d7de857 Update VERSION 2026-04-10 13:37:51 +02:00
Salvatore Filippone a22725b787 CMakeLists interim version 2026-04-09 14:37:15 +02:00
sfilippone 74a9ca90cb Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-04-07 16:24:04 +02:00
sfilippone 0d38955a2d Fix generation of amg_config.h with CMAKE 2026-04-07 16:23:32 +02:00
fdurastante 9be4a3f1be Updated MUMPS link in documentation 2026-04-02 16:28:42 +02:00
sfilippone 04d7122380 Improved error handling in _bld 2026-04-02 13:53:40 +02:00
Salvatore Filippone 087dc37868 Fix handling of external packages within CBIND. 2026-03-25 16:47:30 +01:00
Salvatore Filippone 8e685aa3ae Fix includes for SuperLU and friends in configure 2026-03-24 19:05:35 +01:00
sfilippone 6dbe4c96f2 Take out amg_const.h 2026-03-24 11:44:11 +01:00
sfilippone f012a9d05e Add cpymat optional argument to hierarchy_bld 2026-03-20 13:48:53 +01:00
sfilippone 93ea03ef1c Add .gitattributes 2026-03-20 10:01:04 +01:00
sfilippone 5663188b8c Fix use of AR in configure for other platforms 2026-03-18 16:58:27 +01:00
sfilippone 8ac05fd00e Fix license 2026-03-18 16:12:44 +01:00
sfilippone c278c2a69a Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-03-18 14:51:54 +01:00
sfilippone eae53162af Fix licensing text 2026-03-18 14:46:31 +01:00
sfilippone 0b2a212523 Fix message in samples 2026-03-18 14:29:11 +01:00
sfilippone 7b255aaf6f Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-03-17 12:29:48 +01:00
sfilippone 4c9687c89b Multiple changes to CBIND and configure 2026-03-17 12:27:59 +01:00
Salvatore Filippone a1952a5bf8 Merge pull request #8 from fdrmrc/fix_C_interface
Fix missing library in C interface linking
2026-03-17 09:16:17 +01:00
Marco Feder d2070bcc05 Fix Makefile. Add psb_ext 2026-03-17 00:37:59 +01:00
sfilippone f760396403 Fix compilation for new use of MPIC 2026-03-13 14:40:00 +01:00
sfilippone 8f259367de Merge branch 'gpucinterfaces' of github.com:sfilippone/amg4psblas into gpucinterfaces 2026-01-27 14:49:48 +01:00
fdurastante 15d1386b73 Removed debug prints, fixed name of function in error strings 2026-01-27 14:46:35 +01:00
sfilippone 14d24b1d7c Inconsistent C function names 2026-01-27 12:32:46 +01:00
sfilippone 92425e2478 Merge branch 'gpucinterfaces' of github.com:sfilippone/amg4psblas into gpucinterfaces 2026-01-27 12:19:52 +01:00
sfilippone 228f4e46a9 Fix select type 2026-01-27 12:15:14 +01:00
fdurastante 492ae602f2 Added interface for smoother build. Improved options for preconditioner. There is still a memory error. 2026-01-23 14:29:21 +01:00
fdurastante 3230c70308 Standard input file for GPU experiment 2026-01-23 09:40:51 +01:00
fdurastante eb99c74fae Added L1-Jacobi smoother 2026-01-23 08:15:13 +01:00
fdurastante 1c69b2f635 Tester compiling, but misterious CUDA double free to be debugged 2026-01-22 14:35:30 +01:00
sfilippone 86731fe5bb Fix makefiles 2026-01-19 11:46:20 +01:00
fdurastante 7a5ba06622 Added interface for the allocate_wrk member function of a preconditioner. It handles also allocation on the CUDA/GPU side. 2026-01-16 14:08:36 +01:00
sfilippone d4c0428704 Add FCUDEFINES for CBIND 2026-01-16 12:24:22 +01:00
sfilippone 1a969488e3 Merge branch 'gpucinterfaces' of github.com:sfilippone/amg4psblas into gpucinterfaces 2026-01-15 15:27:53 +01:00
Salvatore Filippone 95382fbb01 Fix use of psb_stringc2f 2026-01-15 15:26:11 +01:00
sfilippone f586df1ac3 Fix use of stringc2f 2026-01-15 11:40:36 +01:00
Salvatore Filippone bab8a27962 Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-01-13 17:45:52 +01:00
sfilippone 28ccefa4bb Merge branch 'development' of github.com:sfilippone/amg4psblas into development 2026-01-13 17:43:25 +01:00
sfilippone 3f33b2ce71 Update docs 2026-01-13 17:41:47 +01:00
Salvatore Filippone 7279347055 Doc fixes 2025-12-30 19:42:01 +01:00
244 changed files with 3225 additions and 10110 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
$Format:%d%n%n$
# Fall back version, probably last release:
1.2.0
1.2.1
# AMG4PSBLAS version file.
#
+8 -11
View File
@@ -13,15 +13,10 @@ endif()
# Check for the installation path for psblas
#if(NOT DEFINED PSBLAS_INSTALL_DIR)
# message(FATAL_ERROR "Please specify the path to the psblas installation directory using -DPSBLAS_INSTALL_DIR=<path>")
#endif()
message(STATUS "psblas directory is ${PSBLAS_INSTALL_DIR};;")
message(STATUS "psblas directory is ${PSBLAS_INSTALL_DIR};")
message(STATUS "PSBLAS DIRECTORY INC ${INCDIR}; MOD ${MODDIR}; LIB ${LIBDIR};")
#set(CMAKE_CXX_STANDARD 17) # Set cxx standard for the c++ part of the library
@@ -31,7 +26,7 @@ find_package(psblas REQUIRED PATHS ${PSBLAS_INSTALL_DIR})
if(NOT psblas_FOUND)
message(FATAL_ERROR "PSBLAS not found!")
else()
message(STATUS "Found PSBLAS: ${psblas_LIBRARIES}")
message(STATUS "Found PSBLAS: ${PSBLAS_LIBRARIES}")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -42,9 +37,9 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Fortran and CXX debug flags added: -g")
endif()
string(APPEND CMAKE_Fortran_FLAGS " -O2")
string(APPEND CMAKE_CXX_FLAGS " -O2")
message(STATUS "Fortran and CXX optimization flags added: -O2")
string(APPEND CMAKE_Fortran_FLAGS " -O2")
string(APPEND CMAKE_CXX_FLAGS " -O2")
message(STATUS "Fortran and CXX optimization flags added: -O2")
@@ -430,7 +425,9 @@ target_include_directories(amgcbind PUBLIC ${INCDIR} ${MODDIR})
target_link_libraries(amgcbind
#PUBLIC ${LAPACK_LINKER_FLAGS} ${LAPACK_LIBRARIES} ${LAPACK95_LIBRARIES}
#PUBLIC ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES} ${BLAS95_LIBRARIES}
PUBLIC amgprec psblas::util psblas::linsolve psblas::prec psblas::ext psblas::cbind psblas::base) #TODO check actual libraries needed
PUBLIC amgprec psblas::util psblas::linsolve psblas::prec
psblas::ext psblas::cbind psblas::base)
#TODO check actual libraries needed
+1 -1
View File
@@ -7,7 +7,7 @@
(C) Copyright 2025 Salvatore Filippone
(C) Copyright 2025 Pasqua D'Ambra
(C) Copyright 2025 Fabio Durastante
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
+1 -1
View File
@@ -71,7 +71,7 @@ EXTRALIBS=@EXTRA_LIBS@
#
AMGCDEFINES=$(SLUFLAGS) $(UMFFLAGS) $(SLUDISTFLAGS)
#$(PSBCDEFINES) $(MUMPSFLAGS)
#$(PSBCDEFINES) $(MUMPSFLAGS)
CDEFINES=$(AMGCDEFINES)
AMGFDEFINES=@AMGFDEFINES@ $(PSBFDEFINES)
FDEFINES=$(AMGFDEFINES)
+1 -1
View File
@@ -19,7 +19,7 @@ libdir:
amgobjs: mods
cd amgprec && $(MAKE) objs
cbnd: mods
cbnd: amgobjs
cd cbind && $(MAKE) objs
install: all
+4 -3
View File
@@ -58,7 +58,8 @@ MODOBJS=amg_base_prec_type.o amg_prec_type.o amg_prec_mod.o \
$(SMODOBJS) $(DMODOBJS) $(CMODOBJS) $(ZMODOBJS)
LOCAL_MODS=$(MODOBJS:.o=$(.mod))
LOCAL_MODS=$(MODOBJS:.o=$(.mod)) amg_c_l1_diag_solver$(.mod) amg_s_l1_diag_solver$(.mod) \
amg_d_l1_diag_solver$(.mod) amg_z_l1_diag_solver$(.mod)
LIBNAME=libamg_prec.a
all: mods objs impld
@@ -70,7 +71,7 @@ objs: mods impld
impld: mods
cd impl && $(MAKE)
lib: mods impld
lib: objs
cd impl && $(MAKE) lib
$(AR) $(HERE)/$(LIBNAME) $(MODOBJS)
$(RANLIB) $(HERE)/$(LIBNAME)
@@ -79,7 +80,7 @@ lib: mods impld
$(MODOBJS): $(PSBLAS_MODDIR)/$(PSBBASEMODNAME)$(.mod)
#amg_base_prec_type.o: amg_const.h
amg_base_prec_type.o: amg_config.h
amg_s_prec_type.o amg_d_prec_type.o amg_c_prec_type.o amg_z_prec_type.o : amg_base_prec_type.o
amg_prec_type.o: amg_s_prec_type.o amg_d_prec_type.o amg_c_prec_type.o amg_z_prec_type.o
amg_prec_mod.o: amg_prec_type.o amg_s_prec_mod.o amg_d_prec_mod.o amg_c_prec_mod.o amg_z_prec_mod.o
+1 -1
View File
@@ -84,7 +84,7 @@ module amg_base_prec_type
character(len=*), parameter :: amg_version_string_ = "1.2.0"
integer(psb_ipk_), parameter :: amg_version_major_ = 1
integer(psb_ipk_), parameter :: amg_version_minor_ = 2
integer(psb_ipk_), parameter :: amg_patchlevel_ = 0
integer(psb_ipk_), parameter :: amg_patchlevel_ = 1
type amg_ml_parms
integer(psb_ipk_) :: sweeps_pre, sweeps_post
+2 -2
View File
@@ -103,7 +103,7 @@ module amg_c_ainv_solver
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_ainv_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -225,7 +225,7 @@ module amg_c_ainv_solver
import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, &
& psb_d_vect_type, psb_c_base_vect_type, psb_spk_, psb_ipk_
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
integer(psb_ipk_), intent(in) :: fillin,alg
real(psb_spk_), intent(in) :: thresh
type(psb_cspmat_type), intent(inout) :: wmat, zmat
+1 -1
View File
@@ -230,7 +230,7 @@ module amg_c_as_smoother
& psb_desc_type, psb_c_base_sparse_mat, psb_ipk_,&
& psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_as_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -237,7 +237,7 @@ module amg_c_base_smoother_mod
& psb_c_vect_type, psb_c_base_vect_type, psb_spk_, &
& amg_c_base_smoother_type, psb_ipk_, psb_i_base_vect_type
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_base_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -170,7 +170,7 @@ module amg_c_base_solver_mod
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_base_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -119,7 +119,7 @@ module amg_c_diag_solver
import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, &
& psb_c_vect_type, psb_c_base_vect_type, psb_spk_, &
& amg_c_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -331,7 +331,7 @@ module amg_c_l1_diag_solver
import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, &
& psb_c_vect_type, psb_c_base_vect_type, psb_spk_, &
& amg_c_l1_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_l1_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -181,7 +181,7 @@ module amg_c_gs_solver
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_gs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -195,7 +195,7 @@ module amg_c_gs_solver
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_bwgs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -123,7 +123,7 @@ contains
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_id_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -144,7 +144,7 @@ module amg_c_ilu_solver
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_ilu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -56,7 +56,7 @@ module amg_c_inner_mod
& psb_spk_, psb_c_base_sparse_mat, psb_c_base_vect_type, psb_ipk_
import :: amg_cprec_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_cprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_c_invk_solver
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_invk_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_c_invt_solver
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_invt_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+3 -2
View File
@@ -151,7 +151,7 @@ module amg_c_jac_smoother
import :: psb_desc_type, amg_c_jac_smoother_type, psb_c_vect_type, psb_spk_, &
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -274,7 +274,7 @@ module amg_c_jac_smoother
import :: psb_desc_type, amg_c_l1_jac_smoother_type, psb_c_vect_type, &
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_l1_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -345,6 +345,7 @@ contains
if (allocated(sm%sv)) then
call sm%sv%free(info)
if (info == psb_success_) deallocate(sm%sv,stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)
+2 -2
View File
@@ -143,7 +143,7 @@ module amg_c_jac_solver
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -160,7 +160,7 @@ module amg_c_jac_solver
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_l1_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -174,7 +174,7 @@ module amg_c_krm_solver
& psb_cspmat_type, psb_c_base_sparse_mat, psb_c_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_krm_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -163,7 +163,7 @@ module amg_c_mumps_solver
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+10 -8
View File
@@ -311,7 +311,7 @@ module amg_c_prec_type
& psb_c_base_sparse_mat, psb_c_base_vect_type, &
& psb_i_base_vect_type, amg_cprec_type, psb_ipk_
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_cprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
@@ -323,14 +323,15 @@ module amg_c_prec_type
end interface amg_precbld
interface amg_hierarchy_bld
subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_c_hierarchy_bld(a,desc_a,prec,info,cpymat)
import :: psb_cspmat_type, psb_desc_type, psb_spk_, &
& amg_cprec_type, psb_ipk_
implicit none
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_cprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! character, intent(in),optional :: upd
end subroutine amg_c_hierarchy_bld
end interface amg_hierarchy_bld
@@ -635,6 +636,11 @@ contains
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free(info)
if (psb_errstatus_fatal()) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
end do
deallocate(prec%precv,stat=info)
end if
@@ -665,10 +671,6 @@ contains
info = psb_err_internal_error_; goto 9999
end if
!
! In the internals, do FREE on components,
! but do not deallocate them
!
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free_smoothers(info)
@@ -1006,7 +1008,7 @@ contains
integer(psb_ipk_), intent(out) :: info
class(psb_c_base_vect_type), intent(in), optional :: vmold
!
! In MLD the DESC optional argument is ignored, since
! In AMG the DESC optional argument is ignored, since
! the necessary info is contained in the various entries of the
! PRECV component.
type(psb_desc_type), intent(in), optional :: desc
+1 -1
View File
@@ -124,7 +124,7 @@ module amg_c_slu_solver
Implicit None
! Arguments
type(psb_cspmat_type), intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_c_slu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -103,7 +103,7 @@ module amg_d_ainv_solver
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_ainv_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -225,7 +225,7 @@ module amg_d_ainv_solver
import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, &
& psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, psb_ipk_
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
integer(psb_ipk_), intent(in) :: fillin,alg
real(psb_dpk_), intent(in) :: thresh
type(psb_dspmat_type), intent(inout) :: wmat, zmat
+1 -1
View File
@@ -230,7 +230,7 @@ module amg_d_as_smoother
& psb_desc_type, psb_d_base_sparse_mat, psb_ipk_,&
& psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_as_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -237,7 +237,7 @@ module amg_d_base_smoother_mod
& psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, &
& amg_d_base_smoother_type, psb_ipk_, psb_i_base_vect_type
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_base_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -170,7 +170,7 @@ module amg_d_base_solver_mod
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_base_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -119,7 +119,7 @@ module amg_d_diag_solver
import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, &
& psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, &
& amg_d_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -331,7 +331,7 @@ module amg_d_l1_diag_solver
import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, &
& psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, &
& amg_d_l1_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_l1_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -181,7 +181,7 @@ module amg_d_gs_solver
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_gs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -195,7 +195,7 @@ module amg_d_gs_solver
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_bwgs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -123,7 +123,7 @@ contains
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_id_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -144,7 +144,7 @@ module amg_d_ilu_solver
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_ilu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -56,7 +56,7 @@ module amg_d_inner_mod
& psb_dpk_, psb_d_base_sparse_mat, psb_d_base_vect_type, psb_ipk_
import :: amg_dprec_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_dprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_d_invk_solver
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_invk_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_d_invt_solver
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_invt_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+3 -2
View File
@@ -151,7 +151,7 @@ module amg_d_jac_smoother
import :: psb_desc_type, amg_d_jac_smoother_type, psb_d_vect_type, psb_dpk_, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -274,7 +274,7 @@ module amg_d_jac_smoother
import :: psb_desc_type, amg_d_l1_jac_smoother_type, psb_d_vect_type, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_l1_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -345,6 +345,7 @@ contains
if (allocated(sm%sv)) then
call sm%sv%free(info)
if (info == psb_success_) deallocate(sm%sv,stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)
+2 -2
View File
@@ -143,7 +143,7 @@ module amg_d_jac_solver
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -160,7 +160,7 @@ module amg_d_jac_solver
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_l1_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -174,7 +174,7 @@ module amg_d_krm_solver
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_krm_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -163,7 +163,7 @@ module amg_d_mumps_solver
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -1
View File
@@ -140,7 +140,7 @@ module amg_d_poly_smoother
import :: psb_desc_type, amg_d_poly_smoother_type, psb_d_vect_type, psb_dpk_, &
& psb_dspmat_type, psb_d_base_sparse_mat, psb_d_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_poly_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -279,6 +279,7 @@ contains
if (allocated(sm%sv)) then
call sm%sv%free(info)
if (info == psb_success_) deallocate(sm%sv,stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)
+10 -8
View File
@@ -311,7 +311,7 @@ module amg_d_prec_type
& psb_d_base_sparse_mat, psb_d_base_vect_type, &
& psb_i_base_vect_type, amg_dprec_type, psb_ipk_
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_dprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
@@ -323,14 +323,15 @@ module amg_d_prec_type
end interface amg_precbld
interface amg_hierarchy_bld
subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_d_hierarchy_bld(a,desc_a,prec,info,cpymat)
import :: psb_dspmat_type, psb_desc_type, psb_dpk_, &
& amg_dprec_type, psb_ipk_
implicit none
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_dprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! character, intent(in),optional :: upd
end subroutine amg_d_hierarchy_bld
end interface amg_hierarchy_bld
@@ -635,6 +636,11 @@ contains
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free(info)
if (psb_errstatus_fatal()) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
end do
deallocate(prec%precv,stat=info)
end if
@@ -665,10 +671,6 @@ contains
info = psb_err_internal_error_; goto 9999
end if
!
! In the internals, do FREE on components,
! but do not deallocate them
!
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free_smoothers(info)
@@ -1006,7 +1008,7 @@ contains
integer(psb_ipk_), intent(out) :: info
class(psb_d_base_vect_type), intent(in), optional :: vmold
!
! In MLD the DESC optional argument is ignored, since
! In AMG the DESC optional argument is ignored, since
! the necessary info is contained in the various entries of the
! PRECV component.
type(psb_desc_type), intent(in), optional :: desc
+1 -1
View File
@@ -124,7 +124,7 @@ module amg_d_slu_solver
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_slu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -259,7 +259,7 @@ contains
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_sludist_solver_type), intent(inout) :: sv
integer, intent(out) :: info
+1 -1
View File
@@ -163,7 +163,7 @@ module amg_d_umf_solver
Implicit None
! Arguments
type(psb_dspmat_type), intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_d_umf_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -103,7 +103,7 @@ module amg_s_ainv_solver
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_ainv_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -225,7 +225,7 @@ module amg_s_ainv_solver
import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, &
& psb_d_vect_type, psb_s_base_vect_type, psb_spk_, psb_ipk_
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
integer(psb_ipk_), intent(in) :: fillin,alg
real(psb_spk_), intent(in) :: thresh
type(psb_sspmat_type), intent(inout) :: wmat, zmat
+1 -1
View File
@@ -230,7 +230,7 @@ module amg_s_as_smoother
& psb_desc_type, psb_s_base_sparse_mat, psb_ipk_,&
& psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_as_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -237,7 +237,7 @@ module amg_s_base_smoother_mod
& psb_s_vect_type, psb_s_base_vect_type, psb_spk_, &
& amg_s_base_smoother_type, psb_ipk_, psb_i_base_vect_type
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_base_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -170,7 +170,7 @@ module amg_s_base_solver_mod
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_base_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -119,7 +119,7 @@ module amg_s_diag_solver
import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, &
& psb_s_vect_type, psb_s_base_vect_type, psb_spk_, &
& amg_s_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -331,7 +331,7 @@ module amg_s_l1_diag_solver
import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, &
& psb_s_vect_type, psb_s_base_vect_type, psb_spk_, &
& amg_s_l1_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_l1_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -181,7 +181,7 @@ module amg_s_gs_solver
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_gs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -195,7 +195,7 @@ module amg_s_gs_solver
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_bwgs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -123,7 +123,7 @@ contains
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_id_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -144,7 +144,7 @@ module amg_s_ilu_solver
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_ilu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -56,7 +56,7 @@ module amg_s_inner_mod
& psb_spk_, psb_s_base_sparse_mat, psb_s_base_vect_type, psb_ipk_
import :: amg_sprec_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_sprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_s_invk_solver
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_invk_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_s_invt_solver
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_invt_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+3 -2
View File
@@ -151,7 +151,7 @@ module amg_s_jac_smoother
import :: psb_desc_type, amg_s_jac_smoother_type, psb_s_vect_type, psb_spk_, &
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -274,7 +274,7 @@ module amg_s_jac_smoother
import :: psb_desc_type, amg_s_l1_jac_smoother_type, psb_s_vect_type, &
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_l1_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -345,6 +345,7 @@ contains
if (allocated(sm%sv)) then
call sm%sv%free(info)
if (info == psb_success_) deallocate(sm%sv,stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)
+2 -2
View File
@@ -143,7 +143,7 @@ module amg_s_jac_solver
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -160,7 +160,7 @@ module amg_s_jac_solver
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_l1_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -174,7 +174,7 @@ module amg_s_krm_solver
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_krm_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -163,7 +163,7 @@ module amg_s_mumps_solver
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -1
View File
@@ -140,7 +140,7 @@ module amg_s_poly_smoother
import :: psb_desc_type, amg_s_poly_smoother_type, psb_s_vect_type, psb_spk_, &
& psb_sspmat_type, psb_s_base_sparse_mat, psb_s_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_poly_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -279,6 +279,7 @@ contains
if (allocated(sm%sv)) then
call sm%sv%free(info)
if (info == psb_success_) deallocate(sm%sv,stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)
+10 -8
View File
@@ -311,7 +311,7 @@ module amg_s_prec_type
& psb_s_base_sparse_mat, psb_s_base_vect_type, &
& psb_i_base_vect_type, amg_sprec_type, psb_ipk_
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_sprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
@@ -323,14 +323,15 @@ module amg_s_prec_type
end interface amg_precbld
interface amg_hierarchy_bld
subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_s_hierarchy_bld(a,desc_a,prec,info,cpymat)
import :: psb_sspmat_type, psb_desc_type, psb_spk_, &
& amg_sprec_type, psb_ipk_
implicit none
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_sprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! character, intent(in),optional :: upd
end subroutine amg_s_hierarchy_bld
end interface amg_hierarchy_bld
@@ -635,6 +636,11 @@ contains
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free(info)
if (psb_errstatus_fatal()) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
end do
deallocate(prec%precv,stat=info)
end if
@@ -665,10 +671,6 @@ contains
info = psb_err_internal_error_; goto 9999
end if
!
! In the internals, do FREE on components,
! but do not deallocate them
!
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free_smoothers(info)
@@ -1006,7 +1008,7 @@ contains
integer(psb_ipk_), intent(out) :: info
class(psb_s_base_vect_type), intent(in), optional :: vmold
!
! In MLD the DESC optional argument is ignored, since
! In AMG the DESC optional argument is ignored, since
! the necessary info is contained in the various entries of the
! PRECV component.
type(psb_desc_type), intent(in), optional :: desc
+1 -1
View File
@@ -124,7 +124,7 @@ module amg_s_slu_solver
Implicit None
! Arguments
type(psb_sspmat_type), intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_s_slu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -103,7 +103,7 @@ module amg_z_ainv_solver
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_ainv_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -225,7 +225,7 @@ module amg_z_ainv_solver
import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, &
& psb_d_vect_type, psb_z_base_vect_type, psb_dpk_, psb_ipk_
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
integer(psb_ipk_), intent(in) :: fillin,alg
real(psb_dpk_), intent(in) :: thresh
type(psb_zspmat_type), intent(inout) :: wmat, zmat
+1 -1
View File
@@ -230,7 +230,7 @@ module amg_z_as_smoother
& psb_desc_type, psb_z_base_sparse_mat, psb_ipk_,&
& psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_as_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -237,7 +237,7 @@ module amg_z_base_smoother_mod
& psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, &
& amg_z_base_smoother_type, psb_ipk_, psb_i_base_vect_type
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_base_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -170,7 +170,7 @@ module amg_z_base_solver_mod
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_base_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -119,7 +119,7 @@ module amg_z_diag_solver
import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, &
& psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, &
& amg_z_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -331,7 +331,7 @@ module amg_z_l1_diag_solver
import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, &
& psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, &
& amg_z_l1_diag_solver_type, psb_ipk_, psb_i_base_vect_type
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_l1_diag_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+2 -2
View File
@@ -181,7 +181,7 @@ module amg_z_gs_solver
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_gs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -195,7 +195,7 @@ module amg_z_gs_solver
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_bwgs_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -123,7 +123,7 @@ contains
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_id_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -144,7 +144,7 @@ module amg_z_ilu_solver
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_ilu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -56,7 +56,7 @@ module amg_z_inner_mod
& psb_dpk_, psb_z_base_sparse_mat, psb_z_base_vect_type, psb_ipk_
import :: amg_zprec_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_zprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_z_invk_solver
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_invk_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -94,7 +94,7 @@ module amg_z_invt_solver
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_invt_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+3 -2
View File
@@ -151,7 +151,7 @@ module amg_z_jac_smoother
import :: psb_desc_type, amg_z_jac_smoother_type, psb_z_vect_type, psb_dpk_, &
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -274,7 +274,7 @@ module amg_z_jac_smoother
import :: psb_desc_type, amg_z_l1_jac_smoother_type, psb_z_vect_type, &
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_l1_jac_smoother_type), intent(inout) :: sm
integer(psb_ipk_), intent(out) :: info
@@ -345,6 +345,7 @@ contains
if (allocated(sm%sv)) then
call sm%sv%free(info)
if (info == psb_success_) deallocate(sm%sv,stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_
call psb_errpush(info,name)
+2 -2
View File
@@ -143,7 +143,7 @@ module amg_z_jac_solver
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -160,7 +160,7 @@ module amg_z_jac_solver
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_l1_jac_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -174,7 +174,7 @@ module amg_z_krm_solver
& psb_zspmat_type, psb_z_base_sparse_mat, psb_z_base_vect_type,&
& psb_ipk_, psb_i_base_vect_type
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_krm_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -163,7 +163,7 @@ module amg_z_mumps_solver
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_mumps_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+10 -8
View File
@@ -311,7 +311,7 @@ module amg_z_prec_type
& psb_z_base_sparse_mat, psb_z_base_vect_type, &
& psb_i_base_vect_type, amg_zprec_type, psb_ipk_
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_zprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
@@ -323,14 +323,15 @@ module amg_z_prec_type
end interface amg_precbld
interface amg_hierarchy_bld
subroutine amg_z_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_z_hierarchy_bld(a,desc_a,prec,info,cpymat)
import :: psb_zspmat_type, psb_desc_type, psb_dpk_, &
& amg_zprec_type, psb_ipk_
implicit none
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_zprec_type), intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! character, intent(in),optional :: upd
end subroutine amg_z_hierarchy_bld
end interface amg_hierarchy_bld
@@ -635,6 +636,11 @@ contains
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free(info)
if (psb_errstatus_fatal()) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
end do
deallocate(prec%precv,stat=info)
end if
@@ -665,10 +671,6 @@ contains
info = psb_err_internal_error_; goto 9999
end if
!
! In the internals, do FREE on components,
! but do not deallocate them
!
if (allocated(prec%precv)) then
do i=1,size(prec%precv)
call prec%precv(i)%free_smoothers(info)
@@ -1006,7 +1008,7 @@ contains
integer(psb_ipk_), intent(out) :: info
class(psb_z_base_vect_type), intent(in), optional :: vmold
!
! In MLD the DESC optional argument is ignored, since
! In AMG the DESC optional argument is ignored, since
! the necessary info is contained in the various entries of the
! PRECV component.
type(psb_desc_type), intent(in), optional :: desc
+1 -1
View File
@@ -124,7 +124,7 @@ module amg_z_slu_solver
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_slu_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -259,7 +259,7 @@ contains
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_sludist_solver_type), intent(inout) :: sv
integer, intent(out) :: info
+1 -1
View File
@@ -163,7 +163,7 @@ module amg_z_umf_solver
Implicit None
! Arguments
type(psb_zspmat_type), intent(in), target :: a
type(psb_zspmat_type), intent(inout), target :: a
Type(psb_desc_type), Intent(inout) :: desc_a
class(amg_z_umf_solver_type), intent(inout) :: sv
integer(psb_ipk_), intent(out) :: info
@@ -155,7 +155,7 @@ subroutine amg_caggrmat_minnrg_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
debug_level = psb_get_debug_level()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
icomm = ctxt%get_mpic()
call psb_info(ctxt, me, np)
@@ -155,7 +155,7 @@ subroutine amg_daggrmat_minnrg_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
debug_level = psb_get_debug_level()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
icomm = ctxt%get_mpic()
call psb_info(ctxt, me, np)
@@ -155,7 +155,7 @@ subroutine amg_saggrmat_minnrg_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
debug_level = psb_get_debug_level()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
icomm = ctxt%get_mpic()
call psb_info(ctxt, me, np)
@@ -155,7 +155,7 @@ subroutine amg_zaggrmat_minnrg_bld(dol1smoothing,a,desc_a,ilaggr,nlaggr,&
debug_level = psb_get_debug_level()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
icomm = ctxt%get_mpic()
call psb_info(ctxt, me, np)
+42 -22
View File
@@ -63,7 +63,7 @@
! info - integer, output.
! Error code.
!
subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_c_hierarchy_bld(a,desc_a,prec,info,cpymat)
use psb_base_mod
use amg_c_inner_mod
@@ -72,10 +72,11 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
Implicit None
! Arguments
type(psb_cspmat_type),intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_cprec_type),intent(inout),target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! Local Variables
type(psb_ctxt_type) :: ctxt
@@ -90,9 +91,11 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
type(amg_sml_parms) :: medparms, coarseparms
integer(psb_lpk_), allocatable :: ilaggr(:), nlaggr(:)
type(psb_lcspmat_type) :: op_prol
type(amg_c_onelev_type), allocatable :: tprecv(:)
type(amg_c_onelev_type), allocatable :: tprecv(:)
logical :: cpymat_
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err
character(len=20) :: name
character(len=40) :: ch_err
integer(psb_ipk_), save :: idx_bldtp=-1, idx_matasb=-1
logical, parameter :: do_timings=.false.
@@ -125,7 +128,9 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
call psb_errpush(info,name)
goto 9999
end if
cpymat_ = .false.
if (present(cpymat)) cpymat_ = cpymat
!
! Check to ensure all procs have the same
!
@@ -180,8 +185,15 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
! This is OK, since it may be called by the user even if there
! is only one level
!
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a
if (cpymat_) then
call a%clone(prec%precv(1)%ac,info)
call desc_a%clone(prec%precv(1)%desc_ac,info)
prec%precv(1)%base_a => prec%precv(1)%ac
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
else
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a
end if
call psb_erractionrestore(err_act)
return
@@ -280,10 +292,16 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
!
! Finest level first; create a GEN_BLOCK
! copy of the descriptor.
!
prec%precv(1)%base_a => a
!
if (cpymat_) then
call a%clone(prec%precv(1)%ac,info)
prec%precv(1)%base_a => prec%precv(1)%ac
else
prec%precv(1)%base_a => a
end if
call psb_cd_renum_block(desc_a,prec%precv(1)%desc_ac,info)
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
newsz = 0
array_build_loop: do i=2, iszv
!
@@ -316,9 +334,10 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
& prec%precv(i-1)%base_desc,&
& ilaggr,nlaggr,op_prol,prec%ag_data,info)
if (do_timings) call psb_toc(idx_bldtp)
if (info /= psb_success_) then
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Map bld fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Map build')
& a_err=ch_err)
goto 9999
endif
@@ -347,14 +366,10 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
if (i>2) then
if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
!
! We are not gaining
!
newsz = i-1
end if
!
! We are not gaining
!
newsz = i-1
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
@@ -389,7 +404,7 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
& coarse_sm,coarse_sm2,info)
if (newsz < i) then
!
! We are going back and revisit a previous leve;
! We are going back and revisit a previous level;
! recover the aggregation.
!
ilaggr = prec%precv(newsz)%linmap%iaggr
@@ -402,8 +417,9 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
& ilaggr,nlaggr,op_prol,info)
if (do_timings) call psb_toc(idx_matasb)
if (info /= 0) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',newsz
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Mat asb')
& a_err=ch_err)
goto 9999
endif
exit array_build_loop
@@ -415,8 +431,9 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
if (do_timings) call psb_toc(idx_matasb)
end if
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Map build')
& a_err=ch_err)
goto 9999
endif
if (i<iszv) call prec%precv(i)%update_aggr(prec%precv(i+1),info)
@@ -448,6 +465,9 @@ subroutine amg_c_hierarchy_bld(a,desc_a,prec,info)
iszv = newsz
! Fix the pointers, but the level 1 should
! be treated differently
if (.not.associated(prec%precv(1)%base_a,a)) then
prec%precv(1)%base_a => prec%precv(1)%ac
end if
if (.not.associated(prec%precv(1)%base_desc,desc_a)) then
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
end if
+3 -2
View File
@@ -101,7 +101,8 @@ subroutine amg_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
real(psb_spk_) :: mnaggratio
integer(psb_ipk_) :: coarse_solve_id
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err
character(len=20) :: name
character(len=40) :: ch_err
info=psb_success_
err=0
@@ -296,7 +297,7 @@ subroutine amg_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i)
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Error @ level',i
write(ch_err,'(a,i7)') 'Error @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err=ch_err)
goto 9999
+12 -1
View File
@@ -88,6 +88,7 @@ subroutine amg_cfile_prec_descr(prec,info,iout,root, verbosity,prefix)
logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_lpk_) :: gl_nrows,gl_ncols,gl_nzeros
character(1024) :: prefix_
info = psb_success_
@@ -122,6 +123,12 @@ subroutine amg_cfile_prec_descr(prec,info,iout,root, verbosity,prefix)
if (root_ == -1) root_ = me
if (verbosity_ >=0) then
gl_nrows = prec%precv(1)%base_a%get_nrows()
gl_ncols = prec%precv(1)%base_a%get_ncols()
gl_nzeros = prec%precv(1)%base_a%get_nzeros()
call psb_sum(ctxt,gl_nrows)
call psb_sum(ctxt,gl_ncols)
call psb_sum(ctxt,gl_nzeros)
!
! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the
@@ -141,7 +148,11 @@ subroutine amg_cfile_prec_descr(prec,info,iout,root, verbosity,prefix)
write(iout_,*)
write(iout_,'(a,1x,a)') trim(prefix_),'Preconditioner description'
write(iout_,*)
write(iout_,*) trim(prefix_),' Base matrix : ',&
& gl_nrows, gl_ncols, gl_nzeros
write(iout_,*)
if (nlev == 1) then
!
! Here we have a gigantic kludge just to handle Symmetrized Gauss-Seidel.
+1 -1
View File
@@ -85,7 +85,7 @@ subroutine amg_cmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
Implicit None
! Arguments
type(psb_cspmat_type),intent(in), target :: a
type(psb_cspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_cprec_type),intent(inout),target :: p
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -65,7 +65,7 @@ subroutine amg_cprecbld(a,desc_a,prec,info,amold,vmold,imold)
Implicit None
! Arguments
type(psb_cspmat_type),intent(in), target :: a
type(psb_cspmat_type),intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_cprec_type),intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
+42 -22
View File
@@ -63,7 +63,7 @@
! info - integer, output.
! Error code.
!
subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_d_hierarchy_bld(a,desc_a,prec,info,cpymat)
use psb_base_mod
use amg_d_inner_mod
@@ -72,10 +72,11 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
Implicit None
! Arguments
type(psb_dspmat_type),intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_dprec_type),intent(inout),target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! Local Variables
type(psb_ctxt_type) :: ctxt
@@ -90,9 +91,11 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
type(amg_dml_parms) :: medparms, coarseparms
integer(psb_lpk_), allocatable :: ilaggr(:), nlaggr(:)
type(psb_ldspmat_type) :: op_prol
type(amg_d_onelev_type), allocatable :: tprecv(:)
type(amg_d_onelev_type), allocatable :: tprecv(:)
logical :: cpymat_
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err
character(len=20) :: name
character(len=40) :: ch_err
integer(psb_ipk_), save :: idx_bldtp=-1, idx_matasb=-1
logical, parameter :: do_timings=.false.
@@ -125,7 +128,9 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
call psb_errpush(info,name)
goto 9999
end if
cpymat_ = .false.
if (present(cpymat)) cpymat_ = cpymat
!
! Check to ensure all procs have the same
!
@@ -180,8 +185,15 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
! This is OK, since it may be called by the user even if there
! is only one level
!
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a
if (cpymat_) then
call a%clone(prec%precv(1)%ac,info)
call desc_a%clone(prec%precv(1)%desc_ac,info)
prec%precv(1)%base_a => prec%precv(1)%ac
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
else
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a
end if
call psb_erractionrestore(err_act)
return
@@ -280,10 +292,16 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
!
! Finest level first; create a GEN_BLOCK
! copy of the descriptor.
!
prec%precv(1)%base_a => a
!
if (cpymat_) then
call a%clone(prec%precv(1)%ac,info)
prec%precv(1)%base_a => prec%precv(1)%ac
else
prec%precv(1)%base_a => a
end if
call psb_cd_renum_block(desc_a,prec%precv(1)%desc_ac,info)
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
newsz = 0
array_build_loop: do i=2, iszv
!
@@ -316,9 +334,10 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
& prec%precv(i-1)%base_desc,&
& ilaggr,nlaggr,op_prol,prec%ag_data,info)
if (do_timings) call psb_toc(idx_bldtp)
if (info /= psb_success_) then
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Map bld fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Map build')
& a_err=ch_err)
goto 9999
endif
@@ -347,14 +366,10 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
if (i>2) then
if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
!
! We are not gaining
!
newsz = i-1
end if
!
! We are not gaining
!
newsz = i-1
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
@@ -389,7 +404,7 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
& coarse_sm,coarse_sm2,info)
if (newsz < i) then
!
! We are going back and revisit a previous leve;
! We are going back and revisit a previous level;
! recover the aggregation.
!
ilaggr = prec%precv(newsz)%linmap%iaggr
@@ -402,8 +417,9 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
& ilaggr,nlaggr,op_prol,info)
if (do_timings) call psb_toc(idx_matasb)
if (info /= 0) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',newsz
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Mat asb')
& a_err=ch_err)
goto 9999
endif
exit array_build_loop
@@ -415,8 +431,9 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
if (do_timings) call psb_toc(idx_matasb)
end if
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Map build')
& a_err=ch_err)
goto 9999
endif
if (i<iszv) call prec%precv(i)%update_aggr(prec%precv(i+1),info)
@@ -448,6 +465,9 @@ subroutine amg_d_hierarchy_bld(a,desc_a,prec,info)
iszv = newsz
! Fix the pointers, but the level 1 should
! be treated differently
if (.not.associated(prec%precv(1)%base_a,a)) then
prec%precv(1)%base_a => prec%precv(1)%ac
end if
if (.not.associated(prec%precv(1)%base_desc,desc_a)) then
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
end if
+3 -2
View File
@@ -101,7 +101,8 @@ subroutine amg_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
real(psb_dpk_) :: mnaggratio
integer(psb_ipk_) :: coarse_solve_id
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err
character(len=20) :: name
character(len=40) :: ch_err
info=psb_success_
err=0
@@ -296,7 +297,7 @@ subroutine amg_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i)
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Error @ level',i
write(ch_err,'(a,i7)') 'Error @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err=ch_err)
goto 9999
+12 -1
View File
@@ -88,6 +88,7 @@ subroutine amg_dfile_prec_descr(prec,info,iout,root, verbosity,prefix)
logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_lpk_) :: gl_nrows,gl_ncols,gl_nzeros
character(1024) :: prefix_
info = psb_success_
@@ -122,6 +123,12 @@ subroutine amg_dfile_prec_descr(prec,info,iout,root, verbosity,prefix)
if (root_ == -1) root_ = me
if (verbosity_ >=0) then
gl_nrows = prec%precv(1)%base_a%get_nrows()
gl_ncols = prec%precv(1)%base_a%get_ncols()
gl_nzeros = prec%precv(1)%base_a%get_nzeros()
call psb_sum(ctxt,gl_nrows)
call psb_sum(ctxt,gl_ncols)
call psb_sum(ctxt,gl_nzeros)
!
! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the
@@ -141,7 +148,11 @@ subroutine amg_dfile_prec_descr(prec,info,iout,root, verbosity,prefix)
write(iout_,*)
write(iout_,'(a,1x,a)') trim(prefix_),'Preconditioner description'
write(iout_,*)
write(iout_,*) trim(prefix_),' Base matrix : ',&
& gl_nrows, gl_ncols, gl_nzeros
write(iout_,*)
if (nlev == 1) then
!
! Here we have a gigantic kludge just to handle Symmetrized Gauss-Seidel.
+1 -1
View File
@@ -85,7 +85,7 @@ subroutine amg_dmlprec_bld(a,desc_a,p,info,amold,vmold,imold)
Implicit None
! Arguments
type(psb_dspmat_type),intent(in), target :: a
type(psb_dspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_dprec_type),intent(inout),target :: p
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -65,7 +65,7 @@ subroutine amg_dprecbld(a,desc_a,prec,info,amold,vmold,imold)
Implicit None
! Arguments
type(psb_dspmat_type),intent(in), target :: a
type(psb_dspmat_type),intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_dprec_type),intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info
+42 -22
View File
@@ -63,7 +63,7 @@
! info - integer, output.
! Error code.
!
subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
subroutine amg_s_hierarchy_bld(a,desc_a,prec,info,cpymat)
use psb_base_mod
use amg_s_inner_mod
@@ -72,10 +72,11 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
Implicit None
! Arguments
type(psb_sspmat_type),intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_sprec_type),intent(inout),target :: prec
integer(psb_ipk_), intent(out) :: info
logical, intent(in), optional :: cpymat
! Local Variables
type(psb_ctxt_type) :: ctxt
@@ -90,9 +91,11 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
type(amg_sml_parms) :: medparms, coarseparms
integer(psb_lpk_), allocatable :: ilaggr(:), nlaggr(:)
type(psb_lsspmat_type) :: op_prol
type(amg_s_onelev_type), allocatable :: tprecv(:)
type(amg_s_onelev_type), allocatable :: tprecv(:)
logical :: cpymat_
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err
character(len=20) :: name
character(len=40) :: ch_err
integer(psb_ipk_), save :: idx_bldtp=-1, idx_matasb=-1
logical, parameter :: do_timings=.false.
@@ -125,7 +128,9 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
call psb_errpush(info,name)
goto 9999
end if
cpymat_ = .false.
if (present(cpymat)) cpymat_ = cpymat
!
! Check to ensure all procs have the same
!
@@ -180,8 +185,15 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
! This is OK, since it may be called by the user even if there
! is only one level
!
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a
if (cpymat_) then
call a%clone(prec%precv(1)%ac,info)
call desc_a%clone(prec%precv(1)%desc_ac,info)
prec%precv(1)%base_a => prec%precv(1)%ac
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
else
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a
end if
call psb_erractionrestore(err_act)
return
@@ -280,10 +292,16 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
!
! Finest level first; create a GEN_BLOCK
! copy of the descriptor.
!
prec%precv(1)%base_a => a
!
if (cpymat_) then
call a%clone(prec%precv(1)%ac,info)
prec%precv(1)%base_a => prec%precv(1)%ac
else
prec%precv(1)%base_a => a
end if
call psb_cd_renum_block(desc_a,prec%precv(1)%desc_ac,info)
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
newsz = 0
array_build_loop: do i=2, iszv
!
@@ -316,9 +334,10 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
& prec%precv(i-1)%base_desc,&
& ilaggr,nlaggr,op_prol,prec%ag_data,info)
if (do_timings) call psb_toc(idx_bldtp)
if (info /= psb_success_) then
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Map bld fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Map build')
& a_err=ch_err)
goto 9999
endif
@@ -347,14 +366,10 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
if (i>2) then
if (sizeratio < mnaggratio) then
if (sizeratio > 1) then
newsz = i
else
!
! We are not gaining
!
newsz = i-1
end if
!
! We are not gaining
!
newsz = i-1
end if
if (all(nlaggr == prec%precv(i-1)%linmap%naggr)) then
@@ -389,7 +404,7 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
& coarse_sm,coarse_sm2,info)
if (newsz < i) then
!
! We are going back and revisit a previous leve;
! We are going back and revisit a previous level;
! recover the aggregation.
!
ilaggr = prec%precv(newsz)%linmap%iaggr
@@ -402,8 +417,9 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
& ilaggr,nlaggr,op_prol,info)
if (do_timings) call psb_toc(idx_matasb)
if (info /= 0) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',newsz
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Mat asb')
& a_err=ch_err)
goto 9999
endif
exit array_build_loop
@@ -415,8 +431,9 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
if (do_timings) call psb_toc(idx_matasb)
end if
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Mat asb fail @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err='Map build')
& a_err=ch_err)
goto 9999
endif
if (i<iszv) call prec%precv(i)%update_aggr(prec%precv(i+1),info)
@@ -448,6 +465,9 @@ subroutine amg_s_hierarchy_bld(a,desc_a,prec,info)
iszv = newsz
! Fix the pointers, but the level 1 should
! be treated differently
if (.not.associated(prec%precv(1)%base_a,a)) then
prec%precv(1)%base_a => prec%precv(1)%ac
end if
if (.not.associated(prec%precv(1)%base_desc,desc_a)) then
prec%precv(1)%base_desc => prec%precv(1)%desc_ac
end if
+3 -2
View File
@@ -101,7 +101,8 @@ subroutine amg_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
real(psb_spk_) :: mnaggratio
integer(psb_ipk_) :: coarse_solve_id
integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err
character(len=20) :: name
character(len=40) :: ch_err
info=psb_success_
err=0
@@ -296,7 +297,7 @@ subroutine amg_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i)
if (info /= psb_success_) then
write(ch_err,'(a,i7)') 'Error @ level',i
write(ch_err,'(a,i7)') 'Error @ level ',i
call psb_errpush(psb_err_internal_error_,name,&
& a_err=ch_err)
goto 9999
+12 -1
View File
@@ -88,6 +88,7 @@ subroutine amg_sfile_prec_descr(prec,info,iout,root, verbosity,prefix)
logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_lpk_) :: gl_nrows,gl_ncols,gl_nzeros
character(1024) :: prefix_
info = psb_success_
@@ -122,6 +123,12 @@ subroutine amg_sfile_prec_descr(prec,info,iout,root, verbosity,prefix)
if (root_ == -1) root_ = me
if (verbosity_ >=0) then
gl_nrows = prec%precv(1)%base_a%get_nrows()
gl_ncols = prec%precv(1)%base_a%get_ncols()
gl_nzeros = prec%precv(1)%base_a%get_nzeros()
call psb_sum(ctxt,gl_nrows)
call psb_sum(ctxt,gl_ncols)
call psb_sum(ctxt,gl_nzeros)
!
! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the
@@ -141,7 +148,11 @@ subroutine amg_sfile_prec_descr(prec,info,iout,root, verbosity,prefix)
write(iout_,*)
write(iout_,'(a,1x,a)') trim(prefix_),'Preconditioner description'
write(iout_,*)
write(iout_,*) trim(prefix_),' Base matrix : ',&
& gl_nrows, gl_ncols, gl_nzeros
write(iout_,*)
if (nlev == 1) then
!
! Here we have a gigantic kludge just to handle Symmetrized Gauss-Seidel.
+1 -1
View File
@@ -85,7 +85,7 @@ subroutine amg_smlprec_bld(a,desc_a,p,info,amold,vmold,imold)
Implicit None
! Arguments
type(psb_sspmat_type),intent(in), target :: a
type(psb_sspmat_type), intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
type(amg_sprec_type),intent(inout),target :: p
integer(psb_ipk_), intent(out) :: info
+1 -1
View File
@@ -65,7 +65,7 @@ subroutine amg_sprecbld(a,desc_a,prec,info,amold,vmold,imold)
Implicit None
! Arguments
type(psb_sspmat_type),intent(in), target :: a
type(psb_sspmat_type),intent(inout), target :: a
type(psb_desc_type), intent(inout), target :: desc_a
class(amg_sprec_type),intent(inout), target :: prec
integer(psb_ipk_), intent(out) :: info

Some files were not shown because too many files have changed in this diff Show More