From bd6d4f3199d091d22c396cc7a7cf01af0a09ce21 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 14 Apr 2021 08:35:58 +0200 Subject: [PATCH] Fixes to various files for compilation in serial mode --- amgprec/amg_d_parmatch_aggregator_mod.F90 | 7 +- amgprec/amg_s_parmatch_aggregator_mod.F90 | 7 +- amgprec/impl/aggregator/MatchBoxPC.cpp | 6 ++ amgprec/impl/aggregator/MatchBoxPC.h | 3 + ...DomEdgesLinearSearchMesgBndlSmallMateC.cpp | 9 +- ...g_d_parmatch_aggregator_inner_mat_asb.F90} | 79 ++--------------- ... => amg_d_parmatch_aggregator_mat_asb.F90} | 81 ++--------------- ... => amg_d_parmatch_aggregator_mat_bld.F90} | 46 +++------- ...90 => amg_d_parmatch_aggregator_tprol.F90} | 86 +++---------------- ...th_bld.f90 => amg_d_parmatch_smth_bld.F90} | 17 ++-- ...mm_bld.f90 => amg_d_parmatch_spmm_bld.F90} | 43 ++-------- ....f90 => amg_d_parmatch_spmm_bld_inner.F90} | 18 ++-- ..._ov.f90 => amg_d_parmatch_spmm_bld_ov.F90} | 19 ++-- ..._bld.f90 => amg_d_parmatch_unsmth_bld.F90} | 18 ++-- ...g_s_parmatch_aggregator_inner_mat_asb.F90} | 79 ++--------------- ... => amg_s_parmatch_aggregator_mat_asb.F90} | 81 ++--------------- ... => amg_s_parmatch_aggregator_mat_bld.F90} | 46 +++------- ...90 => amg_s_parmatch_aggregator_tprol.F90} | 86 +++---------------- ...th_bld.f90 => amg_s_parmatch_smth_bld.F90} | 17 ++-- ...mm_bld.f90 => amg_s_parmatch_spmm_bld.F90} | 43 ++-------- ....f90 => amg_s_parmatch_spmm_bld_inner.F90} | 18 ++-- ..._ov.f90 => amg_s_parmatch_spmm_bld_ov.F90} | 19 ++-- ..._bld.f90 => amg_s_parmatch_unsmth_bld.F90} | 18 ++-- .../impl/aggregator/preProcessorDirectives.h | 2 + ..._d_genpde_mod.f90 => amg_d_genpde_mod.F90} | 44 ++++++++++ tests/pdegen/amg_d_pde2d_base_mod.f90 | 36 ++++++++ tests/pdegen/amg_d_pde2d_box_mod.f90 | 36 ++++++++ tests/pdegen/amg_d_pde2d_exp_mod.f90 | 36 ++++++++ tests/pdegen/amg_d_pde3d_base_mod.f90 | 36 ++++++++ tests/pdegen/amg_d_pde3d_exp_mod.f90 | 36 ++++++++ tests/pdegen/amg_d_pde3d_gauss_mod.f90 | 36 ++++++++ ..._s_genpde_mod.f90 => amg_s_genpde_mod.F90} | 44 ++++++++++ tests/pdegen/amg_s_pde2d_base_mod.f90 | 36 ++++++++ tests/pdegen/amg_s_pde2d_box_mod.f90 | 36 ++++++++ tests/pdegen/amg_s_pde2d_exp_mod.f90 | 36 ++++++++ tests/pdegen/amg_s_pde3d_base_mod.f90 | 36 ++++++++ tests/pdegen/amg_s_pde3d_exp_mod.f90 | 36 ++++++++ tests/pdegen/amg_s_pde3d_gauss_mod.f90 | 36 ++++++++ 38 files changed, 731 insertions(+), 637 deletions(-) rename amgprec/impl/aggregator/{amg_d_parmatch_aggregator_inner_mat_asb.f90 => amg_d_parmatch_aggregator_inner_mat_asb.F90} (65%) rename amgprec/impl/aggregator/{amg_d_parmatch_aggregator_mat_asb.f90 => amg_d_parmatch_aggregator_mat_asb.F90} (69%) rename amgprec/impl/aggregator/{amg_d_parmatch_aggregator_mat_bld.f90 => amg_d_parmatch_aggregator_mat_bld.F90} (84%) rename amgprec/impl/aggregator/{amg_d_parmatch_aggregator_tprol.f90 => amg_d_parmatch_aggregator_tprol.F90} (81%) rename amgprec/impl/aggregator/{amg_d_parmatch_smth_bld.f90 => amg_d_parmatch_smth_bld.F90} (98%) rename amgprec/impl/aggregator/{amg_d_parmatch_spmm_bld.f90 => amg_d_parmatch_spmm_bld.F90} (78%) rename amgprec/impl/aggregator/{amg_d_parmatch_spmm_bld_inner.f90 => amg_d_parmatch_spmm_bld_inner.F90} (95%) rename amgprec/impl/aggregator/{amg_d_parmatch_spmm_bld_ov.f90 => amg_d_parmatch_spmm_bld_ov.F90} (94%) rename amgprec/impl/aggregator/{amg_d_parmatch_unsmth_bld.f90 => amg_d_parmatch_unsmth_bld.F90} (97%) rename amgprec/impl/aggregator/{amg_s_parmatch_aggregator_inner_mat_asb.f90 => amg_s_parmatch_aggregator_inner_mat_asb.F90} (65%) rename amgprec/impl/aggregator/{amg_s_parmatch_aggregator_mat_asb.f90 => amg_s_parmatch_aggregator_mat_asb.F90} (69%) rename amgprec/impl/aggregator/{amg_s_parmatch_aggregator_mat_bld.f90 => amg_s_parmatch_aggregator_mat_bld.F90} (84%) rename amgprec/impl/aggregator/{amg_s_parmatch_aggregator_tprol.f90 => amg_s_parmatch_aggregator_tprol.F90} (81%) rename amgprec/impl/aggregator/{amg_s_parmatch_smth_bld.f90 => amg_s_parmatch_smth_bld.F90} (98%) rename amgprec/impl/aggregator/{amg_s_parmatch_spmm_bld.f90 => amg_s_parmatch_spmm_bld.F90} (78%) rename amgprec/impl/aggregator/{amg_s_parmatch_spmm_bld_inner.f90 => amg_s_parmatch_spmm_bld_inner.F90} (95%) rename amgprec/impl/aggregator/{amg_s_parmatch_spmm_bld_ov.f90 => amg_s_parmatch_spmm_bld_ov.F90} (94%) rename amgprec/impl/aggregator/{amg_s_parmatch_unsmth_bld.f90 => amg_s_parmatch_unsmth_bld.F90} (97%) rename tests/pdegen/{amg_d_genpde_mod.f90 => amg_d_genpde_mod.F90} (93%) rename tests/pdegen/{amg_s_genpde_mod.f90 => amg_s_genpde_mod.F90} (93%) diff --git a/amgprec/amg_d_parmatch_aggregator_mod.F90 b/amgprec/amg_d_parmatch_aggregator_mod.F90 index 422b37af..fdbf961a 100644 --- a/amgprec/amg_d_parmatch_aggregator_mod.F90 +++ b/amgprec/amg_d_parmatch_aggregator_mod.F90 @@ -119,7 +119,10 @@ module amg_d_parmatch_aggregator_mod use amg_d_base_aggregator_mod use dmatchboxp_mod - +#if defined(SERIAL_MPI) + type, extends(amg_d_base_aggregator_type) :: amg_d_parmatch_aggregator_type + end type amg_d_parmatch_aggregator_type +#else type, extends(amg_d_base_aggregator_type) :: amg_d_parmatch_aggregator_type integer(psb_ipk_) :: matching_alg integer(psb_ipk_) :: n_sweeps ! When n_sweeps >1 we need an auxiliary descriptor @@ -681,5 +684,5 @@ contains return end subroutine amg_d_parmatch_aggregator_bld_map - +#endif end module amg_d_parmatch_aggregator_mod diff --git a/amgprec/amg_s_parmatch_aggregator_mod.F90 b/amgprec/amg_s_parmatch_aggregator_mod.F90 index a102340f..32a3b711 100644 --- a/amgprec/amg_s_parmatch_aggregator_mod.F90 +++ b/amgprec/amg_s_parmatch_aggregator_mod.F90 @@ -119,7 +119,10 @@ module amg_s_parmatch_aggregator_mod use amg_s_base_aggregator_mod use smatchboxp_mod - +#if defined(SERIAL_MPI) + type, extends(amg_s_base_aggregator_type) :: amg_s_parmatch_aggregator_type + end type amg_s_parmatch_aggregator_type +#else type, extends(amg_s_base_aggregator_type) :: amg_s_parmatch_aggregator_type integer(psb_ipk_) :: matching_alg integer(psb_ipk_) :: n_sweeps ! When n_sweeps >1 we need an auxiliary descriptor @@ -681,5 +684,5 @@ contains return end subroutine amg_s_parmatch_aggregator_bld_map - +#endif end module amg_s_parmatch_aggregator_mod diff --git a/amgprec/impl/aggregator/MatchBoxPC.cpp b/amgprec/impl/aggregator/MatchBoxPC.cpp index 95aa4ef7..c1ec0976 100644 --- a/amgprec/impl/aggregator/MatchBoxPC.cpp +++ b/amgprec/impl/aggregator/MatchBoxPC.cpp @@ -40,7 +40,9 @@ // ************************************************************************ #include #include +#if !defined(SERIAL_MPI) #include +#endif #include "MatchBoxPC.h" #ifdef __cplusplus @@ -56,6 +58,7 @@ void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge, MilanLongInt* msgIndSent, MilanLongInt* msgActualSent, MilanReal* msgPercent, MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time, MilanLongInt* ph1_card, MilanLongInt* ph2_card ) { +#if !defined(SERIAL_MPI) MPI_Comm C_comm=MPI_Comm_f2c(icomm); #ifdef DEBUG fprintf(stderr,"MatchBoxPC: rank %d nlver %ld nledge %ld [ %ld %ld ]\n", @@ -68,6 +71,7 @@ void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge, msgIndSent, msgActualSent, msgPercent, ph0_time, ph1_time, ph2_time, ph1_card, ph2_card ); +#endif } void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge, @@ -78,6 +82,7 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge, MilanLongInt* msgIndSent, MilanLongInt* msgActualSent, MilanReal* msgPercent, MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time, MilanLongInt* ph1_card, MilanLongInt* ph2_card ) { +#if !defined(SERIAL_MPI) MPI_Comm C_comm=MPI_Comm_f2c(icomm); #ifdef DEBUG fprintf(stderr,"MatchBoxPC: rank %d nlver %ld nledge %ld [ %ld %ld ]\n", @@ -90,6 +95,7 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge, msgIndSent, msgActualSent, msgPercent, ph0_time, ph1_time, ph2_time, ph1_card, ph2_card ); +#endif } #ifdef __cplusplus diff --git a/amgprec/impl/aggregator/MatchBoxPC.h b/amgprec/impl/aggregator/MatchBoxPC.h index 090e0265..21d0a181 100644 --- a/amgprec/impl/aggregator/MatchBoxPC.h +++ b/amgprec/impl/aggregator/MatchBoxPC.h @@ -69,6 +69,8 @@ using namespace std; extern "C" { #endif +#if !defined(SERIAL_MPI) + #define MilanMpiLongInt MPI_LONG_LONG #ifndef _primitiveDataType_Definition_ @@ -190,6 +192,7 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge, MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time, MilanLongInt* ph1_card, MilanLongInt* ph2_card ); +#endif #ifdef __cplusplus } #endif diff --git a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC.cpp b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC.cpp index c1fc07c6..a43138ac 100644 --- a/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC.cpp +++ b/amgprec/impl/aggregator/algoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC.cpp @@ -70,6 +70,8 @@ Statistics: ph1_card, ph2_card : Size: |P| number of processes in the comm-world (number of matched edges in Phase 1 and Phase 2) */ +#ifdef SERIAL_MPI +#else //MPI type map template MPI_Datatype TypeMap(); template<> inline MPI_Datatype TypeMap() { return MPI_LONG_LONG; } @@ -90,6 +92,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC( MilanReal* msgPercent, MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time, MilanLongInt* ph1_card, MilanLongInt* ph2_card ) { + if !defined(SERIAL_MPI) #ifdef PRINT_DEBUG_INFO_ cout<<"\n("< amg_d_parmatch_aggregator_inner_mat_asb +#endif implicit none class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag type(amg_dml_parms), intent(inout) :: parms @@ -198,11 +133,11 @@ subroutine amg_d_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,& ictxt = desc_a%get_context() call psb_info(ictxt,me,np) +#if !defined(SERIAL_MPI) if (debug) write(0,*) me,' ',trim(name),' Start:',& & allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr) - select case(parms%coarse_mat) case(amg_distr_mat_) @@ -220,7 +155,7 @@ subroutine amg_d_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,& call psb_errpush(info,name,a_err='invalid amg_coarse_mat_') goto 9999 end select - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_asb.f90 b/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_asb.F90 similarity index 69% rename from amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_asb.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_asb.F90 index 145f453e..ed74fda8 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_asb.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_asb.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,78 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! File: amg_d_base_aggregator_mat_bld.f90 -! -! -! AMG4PSBLAS version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) -! -! (C) Copyright 2008-2018 -! -! Salvatore Filippone -! Pasqua D'Ambra -! Daniela di Serafino -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! ! File: amg_d_parmatch_aggregator_mat_asb.f90 ! ! Subroutine: amg_d_parmatch_aggregator_mat_asb @@ -170,7 +98,11 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,& & ac,desc_ac, op_prol,op_restr,info) use psb_base_mod use amg_base_prec_type +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_mat_asb +#endif implicit none class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag type(amg_dml_parms), intent(inout) :: parms @@ -204,6 +136,7 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,& end if +#if !defined(SERIAL_MPI) if (debug) write(0,*) me,' ',trim(name),' Start:',& & allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr) @@ -266,7 +199,7 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,& call psb_errpush(info,name,a_err='invalid amg_coarse_mat_') goto 9999 end select - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_bld.f90 b/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_bld.F90 similarity index 84% rename from amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_bld.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_bld.F90 index d1df1b6a..9b1171e0 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_bld.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_aggregator_mat_bld.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,39 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! ! ! File: amg_d_base_aggregator_mat_bld.f90 ! @@ -168,7 +135,11 @@ subroutine amg_d_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,& use psb_base_mod use amg_d_inner_mod use amg_base_prec_type +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_mat_bld +#endif implicit none class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag @@ -205,6 +176,7 @@ subroutine amg_d_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,& ! algorithm specified by ! +#if !defined(SERIAL_MPI) call clean_shortcuts(ag) ! ! When requesting smoothed aggregation we cannot use the @@ -237,13 +209,15 @@ subroutine amg_d_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,& call psb_errpush(psb_err_from_subroutine_,name,a_err='Inner aggrmat asb') goto 9999 end if - +#endif call psb_erractionrestore(err_act) return 9999 call psb_error_handler(err_act) return +#if !defined(SERIAL_MPI) + contains subroutine clean_shortcuts(ag) implicit none @@ -271,5 +245,5 @@ contains end if end if end subroutine clean_shortcuts - +#endif end subroutine amg_d_parmatch_aggregator_mat_bld diff --git a/amgprec/impl/aggregator/amg_d_parmatch_aggregator_tprol.f90 b/amgprec/impl/aggregator/amg_d_parmatch_aggregator_tprol.F90 similarity index 81% rename from amgprec/impl/aggregator/amg_d_parmatch_aggregator_tprol.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_aggregator_tprol.F90 index eda39c5c..8559fae0 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_aggregator_tprol.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_aggregator_tprol.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,73 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! MLD2P4 version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) -! -! (C) Copyright 2008-2018 -! -! Salvatore Filippone -! Pasqua D'Ambra -! Daniela di Serafino -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. ! ! File: amg_d_parmatch_aggregator_tprol.f90 ! @@ -114,7 +47,11 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,& use psb_base_mod use amg_base_prec_type use amg_d_inner_mod +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_build_tprol +#endif use iso_c_binding implicit none class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag @@ -181,6 +118,9 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,& call amg_check_def(parms%aggr_ord,'Ordering',& & amg_aggr_ord_nat_,is_legal_ml_aggr_ord) call amg_check_def(parms%aggr_thresh,'Aggr_Thresh',dzero,is_legal_d_aggr_thrs) + +#if !defined(SERIAL_MPI) + match_algorithm = ag%matching_alg n_sweeps = ag%n_sweeps if (2**n_sweeps /= ag%orig_aggr_size) then @@ -530,17 +470,11 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,& call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_bootCMatch_if') goto 9999 end if +#endif call psb_erractionrestore(err_act) return 9999 call psb_error_handler(err_act) return -contains - subroutine do_l1_jacobi(nsweeps,w,a,desc_a) - integer(psb_ipk_), intent(in) :: nsweeps - real(psb_dpk_), intent(inout) :: w(:) - type(psb_dspmat_type), intent(in) :: a - type(psb_desc_type), intent(in) :: desc_a - - end subroutine do_l1_jacobi + end subroutine amg_d_parmatch_aggregator_build_tprol diff --git a/amgprec/impl/aggregator/amg_d_parmatch_smth_bld.f90 b/amgprec/impl/aggregator/amg_d_parmatch_smth_bld.F90 similarity index 98% rename from amgprec/impl/aggregator/amg_d_parmatch_smth_bld.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_smth_bld.F90 index e8721fe8..80022b73 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_smth_bld.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_smth_bld.F90 @@ -1,14 +1,14 @@ ! ! -! AMG4PSBLAS version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2008-2018 +! (C) Copyright 2021 ! ! Salvatore Filippone ! Pasqua D'Ambra -! Daniela di Serafino +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -108,7 +108,11 @@ subroutine amg_d_parmatch_smth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& use amg_base_prec_type use amg_d_inner_mod use amg_d_base_aggregator_mod +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_smth_bld +#endif implicit none ! Arguments @@ -182,6 +186,8 @@ subroutine amg_d_parmatch_smth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& if (do_timings) call psb_tic(idx_phase1) +#if !defined(SERIAL_MPI) + naggr = nlaggr(me+1) ntaggr = sum(nlaggr) naggrm1 = sum(nlaggr(1:me)) @@ -372,6 +378,7 @@ subroutine amg_d_parmatch_smth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done smooth_aggregate ' +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld.f90 b/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld.F90 similarity index 78% rename from amgprec/impl/aggregator/amg_d_parmatch_spmm_bld.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_spmm_bld.F90 index b051d935..0311f274 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,40 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! ! ! File: amg_daggrmat_nosmth_bld.F90 ! @@ -133,7 +99,11 @@ subroutine amg_d_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,& & ac,desc_ac,op_prol,op_restr,t_prol,info) use psb_base_mod use amg_d_inner_mod +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_spmm_bld +#endif implicit none ! Arguments @@ -170,6 +140,7 @@ subroutine amg_d_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,& debug_unit = psb_get_debug_unit() debug_level = psb_get_debug_level() +#if !defined(SERIAL_MPI) call a%cp_to(acsr) call amg_d_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,& @@ -183,7 +154,7 @@ subroutine amg_d_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done spmm_bld ' - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_inner.f90 b/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_inner.F90 similarity index 95% rename from amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_inner.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_inner.F90 index e1166405..a2917e83 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_inner.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_inner.F90 @@ -1,11 +1,14 @@ ! ! -! AMG4PSBLAS Extensions +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2019 +! (C) Copyright 2021 ! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -96,7 +99,11 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,& & ac,desc_ac,op_prol,op_restr,t_prol,info) use psb_base_mod use amg_d_inner_mod +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_spmm_bld_inner +#endif implicit none ! Arguments @@ -156,6 +163,7 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,& naggrm1 = sum(nlaggr(1:me)) naggrp1 = sum(nlaggr(1:me+1)) +#if !defined(SERIAL_MPI) ! ! Here T_PROL should be arriving with GLOBAL indices on the cols ! and LOCAL indices on the rows. @@ -199,7 +207,7 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done smooth_aggregate ' - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_ov.f90 b/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_ov.F90 similarity index 94% rename from amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_ov.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_ov.F90 index 27186f28..2b35c797 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_ov.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_spmm_bld_ov.F90 @@ -1,11 +1,14 @@ ! ! -! AMG4PSBLAS Extensions +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2019 +! (C) Copyright 2021 ! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -96,7 +99,11 @@ subroutine amg_d_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,& & ac,desc_ac,op_prol,op_restr,t_prol,info) use psb_base_mod use amg_d_inner_mod +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_spmm_bld_ov +#endif implicit none ! Arguments @@ -134,6 +141,8 @@ subroutine amg_d_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,& debug_unit = psb_get_debug_unit() debug_level = psb_get_debug_level() +#if !defined(SERIAL_MPI) + call a%mv_to(acsr) call amg_d_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,& @@ -149,7 +158,7 @@ subroutine amg_d_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done spmm_bld ' - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_d_parmatch_unsmth_bld.f90 b/amgprec/impl/aggregator/amg_d_parmatch_unsmth_bld.F90 similarity index 97% rename from amgprec/impl/aggregator/amg_d_parmatch_unsmth_bld.f90 rename to amgprec/impl/aggregator/amg_d_parmatch_unsmth_bld.F90 index 1072a8cb..dc6574a0 100644 --- a/amgprec/impl/aggregator/amg_d_parmatch_unsmth_bld.f90 +++ b/amgprec/impl/aggregator/amg_d_parmatch_unsmth_bld.F90 @@ -1,14 +1,14 @@ ! ! -! AMG4PSBLAS version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2008-2018 +! (C) Copyright 2021 ! ! Salvatore Filippone ! Pasqua D'Ambra -! Daniela di Serafino +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -34,7 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! ! File: amg_d_parmatch_unsmth_bld.F90 ! ! Subroutine: amg_d_parmatch_unsmth_bld @@ -108,7 +107,11 @@ subroutine amg_d_parmatch_unsmth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& use amg_base_prec_type use amg_d_inner_mod use amg_d_base_aggregator_mod +#if defined(SERIAL_MPI) + use amg_d_parmatch_aggregator_mod +#else use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_unsmth_bld +#endif implicit none ! Arguments @@ -157,6 +160,7 @@ subroutine amg_d_parmatch_unsmth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& call psb_info(ictxt, me, np) +#if !defined(SERIAL_MPI) nglob = desc_a%get_global_rows() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() @@ -224,7 +228,7 @@ subroutine amg_d_parmatch_unsmth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& goto 9999 end if - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.f90 b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.F90 similarity index 65% rename from amgprec/impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.F90 index aeccc1f7..c05f00e2 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_inner_mat_asb.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,75 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! MLD2P4 version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) -! -! (C) Copyright 2008-2018 -! -! Salvatore Filippone -! Pasqua D'Ambra -! Daniela di Serafino -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! ! File: amg_s_parmatch_aggregator_mat_asb.f90 ! ! Subroutine: amg_s_parmatch_aggregator_mat_asb @@ -167,7 +98,11 @@ subroutine amg_s_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,& & ac,desc_ac, op_prol,op_restr,info) use psb_base_mod use amg_base_prec_type +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_inner_mat_asb +#endif implicit none class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag type(amg_sml_parms), intent(inout) :: parms @@ -198,11 +133,11 @@ subroutine amg_s_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,& ictxt = desc_a%get_context() call psb_info(ictxt,me,np) +#if !defined(SERIAL_MPI) if (debug) write(0,*) me,' ',trim(name),' Start:',& & allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr) - select case(parms%coarse_mat) case(amg_distr_mat_) @@ -220,7 +155,7 @@ subroutine amg_s_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,& call psb_errpush(info,name,a_err='invalid amg_coarse_mat_') goto 9999 end select - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_asb.f90 b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_asb.F90 similarity index 69% rename from amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_asb.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_asb.F90 index fac367f2..5f581299 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_asb.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_asb.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,78 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! File: amg_s_base_aggregator_mat_bld.f90 -! -! -! AMG4PSBLAS version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) -! -! (C) Copyright 2008-2018 -! -! Salvatore Filippone -! Pasqua D'Ambra -! Daniela di Serafino -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! ! File: amg_s_parmatch_aggregator_mat_asb.f90 ! ! Subroutine: amg_s_parmatch_aggregator_mat_asb @@ -170,7 +98,11 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,& & ac,desc_ac, op_prol,op_restr,info) use psb_base_mod use amg_base_prec_type +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_mat_asb +#endif implicit none class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag type(amg_sml_parms), intent(inout) :: parms @@ -204,6 +136,7 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,& end if +#if !defined(SERIAL_MPI) if (debug) write(0,*) me,' ',trim(name),' Start:',& & allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr) @@ -266,7 +199,7 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,& call psb_errpush(info,name,a_err='invalid amg_coarse_mat_') goto 9999 end select - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_bld.f90 b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_bld.F90 similarity index 84% rename from amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_bld.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_bld.F90 index 6ec3dc05..8c10d006 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_bld.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_mat_bld.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,39 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! ! ! File: amg_s_base_aggregator_mat_bld.f90 ! @@ -168,7 +135,11 @@ subroutine amg_s_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,& use psb_base_mod use amg_s_inner_mod use amg_base_prec_type +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_mat_bld +#endif implicit none class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag @@ -205,6 +176,7 @@ subroutine amg_s_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,& ! algorithm specified by ! +#if !defined(SERIAL_MPI) call clean_shortcuts(ag) ! ! When requesting smoothed aggregation we cannot use the @@ -237,13 +209,15 @@ subroutine amg_s_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,& call psb_errpush(psb_err_from_subroutine_,name,a_err='Inner aggrmat asb') goto 9999 end if - +#endif call psb_erractionrestore(err_act) return 9999 call psb_error_handler(err_act) return +#if !defined(SERIAL_MPI) + contains subroutine clean_shortcuts(ag) implicit none @@ -271,5 +245,5 @@ contains end if end if end subroutine clean_shortcuts - +#endif end subroutine amg_s_parmatch_aggregator_mat_bld diff --git a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_tprol.f90 b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_tprol.F90 similarity index 81% rename from amgprec/impl/aggregator/amg_s_parmatch_aggregator_tprol.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_aggregator_tprol.F90 index cd8bb719..2cb3d842 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_aggregator_tprol.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_aggregator_tprol.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,73 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! -! -! MLD2P4 version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) -! -! (C) Copyright 2008-2018 -! -! Salvatore Filippone -! Pasqua D'Ambra -! Daniela di Serafino -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. ! ! File: amg_s_parmatch_aggregator_tprol.f90 ! @@ -114,7 +47,11 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,& use psb_base_mod use amg_base_prec_type use amg_s_inner_mod +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_build_tprol +#endif use iso_c_binding implicit none class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag @@ -181,6 +118,9 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,& call amg_check_def(parms%aggr_ord,'Ordering',& & amg_aggr_ord_nat_,is_legal_ml_aggr_ord) call amg_check_def(parms%aggr_thresh,'Aggr_Thresh',szero,is_legal_s_aggr_thrs) + +#if !defined(SERIAL_MPI) + match_algorithm = ag%matching_alg n_sweeps = ag%n_sweeps if (2**n_sweeps /= ag%orig_aggr_size) then @@ -530,17 +470,11 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,& call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_bootCMatch_if') goto 9999 end if +#endif call psb_erractionrestore(err_act) return 9999 call psb_error_handler(err_act) return -contains - subroutine do_l1_jacobi(nsweeps,w,a,desc_a) - integer(psb_ipk_), intent(in) :: nsweeps - real(psb_dpk_), intent(inout) :: w(:) - type(psb_sspmat_type), intent(in) :: a - type(psb_desc_type), intent(in) :: desc_a - - end subroutine do_l1_jacobi + end subroutine amg_s_parmatch_aggregator_build_tprol diff --git a/amgprec/impl/aggregator/amg_s_parmatch_smth_bld.f90 b/amgprec/impl/aggregator/amg_s_parmatch_smth_bld.F90 similarity index 98% rename from amgprec/impl/aggregator/amg_s_parmatch_smth_bld.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_smth_bld.F90 index 3990d2af..a89ac411 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_smth_bld.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_smth_bld.F90 @@ -1,14 +1,14 @@ ! ! -! AMG4PSBLAS version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2008-2018 +! (C) Copyright 2021 ! ! Salvatore Filippone ! Pasqua D'Ambra -! Daniela di Serafino +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -108,7 +108,11 @@ subroutine amg_s_parmatch_smth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& use amg_base_prec_type use amg_s_inner_mod use amg_s_base_aggregator_mod +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_smth_bld +#endif implicit none ! Arguments @@ -182,6 +186,8 @@ subroutine amg_s_parmatch_smth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& if (do_timings) call psb_tic(idx_phase1) +#if !defined(SERIAL_MPI) + naggr = nlaggr(me+1) ntaggr = sum(nlaggr) naggrm1 = sum(nlaggr(1:me)) @@ -372,6 +378,7 @@ subroutine amg_s_parmatch_smth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done smooth_aggregate ' +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld.f90 b/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld.F90 similarity index 78% rename from amgprec/impl/aggregator/amg_s_parmatch_spmm_bld.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_spmm_bld.F90 index 2ae4589a..b88930eb 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld.F90 @@ -1,4 +1,4 @@ -! ! +! ! ! AMG4PSBLAS version 1.0 ! Algebraic Multigrid Package @@ -34,40 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! moved here from -! -! -! AMG4PSBLAS Extensions -! -! (C) Copyright 2019 -! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT -! -! Redistribution and use in source and binary forms, with or without -! modification, are permitted provided that the following conditions -! are met: -! 1. Redistributions of source code must retain the above copyright -! notice, this list of conditions and the following disclaimer. -! 2. Redistributions in binary form must reproduce the above copyright -! notice, this list of conditions, and the following disclaimer in the -! documentation and/or other materials provided with the distribution. -! 3. The name of the AMG4PSBLAS group or the names of its contributors may -! not be used to endorse or promote products derived from this -! software without specific written permission. -! -! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS -! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -! POSSIBILITY OF SUCH DAMAGE. -! ! ! File: amg_saggrmat_nosmth_bld.F90 ! @@ -133,7 +99,11 @@ subroutine amg_s_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,& & ac,desc_ac,op_prol,op_restr,t_prol,info) use psb_base_mod use amg_s_inner_mod +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_spmm_bld +#endif implicit none ! Arguments @@ -170,6 +140,7 @@ subroutine amg_s_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,& debug_unit = psb_get_debug_unit() debug_level = psb_get_debug_level() +#if !defined(SERIAL_MPI) call a%cp_to(acsr) call amg_s_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,& @@ -183,7 +154,7 @@ subroutine amg_s_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done spmm_bld ' - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_inner.f90 b/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_inner.F90 similarity index 95% rename from amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_inner.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_inner.F90 index 854dd552..cb64c0e1 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_inner.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_inner.F90 @@ -1,11 +1,14 @@ ! ! -! AMG4PSBLAS Extensions +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2019 +! (C) Copyright 2021 ! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -96,7 +99,11 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,& & ac,desc_ac,op_prol,op_restr,t_prol,info) use psb_base_mod use amg_s_inner_mod +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_spmm_bld_inner +#endif implicit none ! Arguments @@ -156,6 +163,7 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,& naggrm1 = sum(nlaggr(1:me)) naggrp1 = sum(nlaggr(1:me+1)) +#if !defined(SERIAL_MPI) ! ! Here T_PROL should be arriving with GLOBAL indices on the cols ! and LOCAL indices on the rows. @@ -199,7 +207,7 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done smooth_aggregate ' - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_ov.f90 b/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_ov.F90 similarity index 94% rename from amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_ov.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_ov.F90 index dcfd71c7..a4fa85e7 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_ov.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_spmm_bld_ov.F90 @@ -1,11 +1,14 @@ ! ! -! AMG4PSBLAS Extensions +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2019 +! (C) Copyright 2021 ! -! Salvatore Filippone Cranfield University -! Pasqua D'Ambra IAC-CNR, Naples, IT +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -96,7 +99,11 @@ subroutine amg_s_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,& & ac,desc_ac,op_prol,op_restr,t_prol,info) use psb_base_mod use amg_s_inner_mod +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_spmm_bld_ov +#endif implicit none ! Arguments @@ -134,6 +141,8 @@ subroutine amg_s_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,& debug_unit = psb_get_debug_unit() debug_level = psb_get_debug_level() +#if !defined(SERIAL_MPI) + call a%mv_to(acsr) call amg_s_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,& @@ -149,7 +158,7 @@ subroutine amg_s_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,& if (debug_level >= psb_debug_outer_) & & write(debug_unit,*) me,' ',trim(name),& & 'Done spmm_bld ' - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/amg_s_parmatch_unsmth_bld.f90 b/amgprec/impl/aggregator/amg_s_parmatch_unsmth_bld.F90 similarity index 97% rename from amgprec/impl/aggregator/amg_s_parmatch_unsmth_bld.f90 rename to amgprec/impl/aggregator/amg_s_parmatch_unsmth_bld.F90 index 7fcba845..6fcf65ac 100644 --- a/amgprec/impl/aggregator/amg_s_parmatch_unsmth_bld.f90 +++ b/amgprec/impl/aggregator/amg_s_parmatch_unsmth_bld.F90 @@ -1,14 +1,14 @@ ! ! -! AMG4PSBLAS version 2.2 -! MultiLevel Domain Decomposition Parallel Preconditioners Package -! based on PSBLAS (Parallel Sparse BLAS version 3.5) +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) ! -! (C) Copyright 2008-2018 +! (C) Copyright 2021 ! ! Salvatore Filippone ! Pasqua D'Ambra -! Daniela di Serafino +! Fabio Durastante ! ! Redistribution and use in source and binary forms, with or without ! modification, are permitted provided that the following conditions @@ -34,7 +34,6 @@ ! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ! POSSIBILITY OF SUCH DAMAGE. ! -! ! File: amg_s_parmatch_unsmth_bld.F90 ! ! Subroutine: amg_s_parmatch_unsmth_bld @@ -108,7 +107,11 @@ subroutine amg_s_parmatch_unsmth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& use amg_base_prec_type use amg_s_inner_mod use amg_s_base_aggregator_mod +#if defined(SERIAL_MPI) + use amg_s_parmatch_aggregator_mod +#else use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_unsmth_bld +#endif implicit none ! Arguments @@ -157,6 +160,7 @@ subroutine amg_s_parmatch_unsmth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& call psb_info(ictxt, me, np) +#if !defined(SERIAL_MPI) nglob = desc_a%get_global_rows() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() @@ -224,7 +228,7 @@ subroutine amg_s_parmatch_unsmth_bld(ag,a,desc_a,ilaggr,nlaggr,parms,& goto 9999 end if - +#endif call psb_erractionrestore(err_act) return diff --git a/amgprec/impl/aggregator/preProcessorDirectives.h b/amgprec/impl/aggregator/preProcessorDirectives.h index 4ff4276e..5c796cf0 100755 --- a/amgprec/impl/aggregator/preProcessorDirectives.h +++ b/amgprec/impl/aggregator/preProcessorDirectives.h @@ -72,7 +72,9 @@ #include //MPI: +#if !defined(SERIAL_MPI) #include "mpi.h" +#endif diff --git a/tests/pdegen/amg_d_genpde_mod.f90 b/tests/pdegen/amg_d_genpde_mod.F90 similarity index 93% rename from tests/pdegen/amg_d_genpde_mod.f90 rename to tests/pdegen/amg_d_genpde_mod.F90 index e06abfad..31748121 100644 --- a/tests/pdegen/amg_d_genpde_mod.f90 +++ b/tests/pdegen/amg_d_genpde_mod.F90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_genpde_mod @@ -225,7 +261,11 @@ contains ! A nifty MPI function will split the process list npdims = 0 +#if defined(SERIAL_MPI) + npdims = 1 +#else call mpi_dims_create(np,3,npdims,info) +#endif npx = npdims(1) npy = npdims(2) npz = npdims(3) @@ -675,7 +715,11 @@ contains ! A nifty MPI function will split the process list npdims = 0 +#if defined(SERIAL_MPI) + npdims = 1 +#else call mpi_dims_create(np,2,npdims,info) +#endif npx = npdims(1) npy = npdims(2) diff --git a/tests/pdegen/amg_d_pde2d_base_mod.f90 b/tests/pdegen/amg_d_pde2d_base_mod.f90 index c716d789..844405ef 100644 --- a/tests/pdegen/amg_d_pde2d_base_mod.f90 +++ b/tests/pdegen/amg_d_pde2d_base_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_pde2d_base_mod use psb_base_mod, only : psb_dpk_, dzero, done real(psb_dpk_), save, private :: epsilon=done/80 diff --git a/tests/pdegen/amg_d_pde2d_box_mod.f90 b/tests/pdegen/amg_d_pde2d_box_mod.f90 index b5518be2..39cc66c0 100644 --- a/tests/pdegen/amg_d_pde2d_box_mod.f90 +++ b/tests/pdegen/amg_d_pde2d_box_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_pde2d_box_mod use psb_base_mod, only : psb_dpk_, dzero, done real(psb_dpk_), save, private :: epsilon=done/80 diff --git a/tests/pdegen/amg_d_pde2d_exp_mod.f90 b/tests/pdegen/amg_d_pde2d_exp_mod.f90 index 1929d471..90fb8126 100644 --- a/tests/pdegen/amg_d_pde2d_exp_mod.f90 +++ b/tests/pdegen/amg_d_pde2d_exp_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_pde2d_exp_mod use psb_base_mod, only : psb_dpk_, done, dzero real(psb_dpk_), save, private :: epsilon=done/80 diff --git a/tests/pdegen/amg_d_pde3d_base_mod.f90 b/tests/pdegen/amg_d_pde3d_base_mod.f90 index 76aad5cd..7becb5a1 100644 --- a/tests/pdegen/amg_d_pde3d_base_mod.f90 +++ b/tests/pdegen/amg_d_pde3d_base_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_pde3d_base_mod use psb_base_mod, only : psb_dpk_, done real(psb_dpk_), save, private :: epsilon=done/80 diff --git a/tests/pdegen/amg_d_pde3d_exp_mod.f90 b/tests/pdegen/amg_d_pde3d_exp_mod.f90 index fdbb2970..e7249e6c 100644 --- a/tests/pdegen/amg_d_pde3d_exp_mod.f90 +++ b/tests/pdegen/amg_d_pde3d_exp_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_pde3d_exp_mod use psb_base_mod, only : psb_dpk_, done real(psb_dpk_), save, private :: epsilon=done/160 diff --git a/tests/pdegen/amg_d_pde3d_gauss_mod.f90 b/tests/pdegen/amg_d_pde3d_gauss_mod.f90 index 3787c76a..8a9eda7d 100644 --- a/tests/pdegen/amg_d_pde3d_gauss_mod.f90 +++ b/tests/pdegen/amg_d_pde3d_gauss_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_d_pde3d_gauss_mod use psb_base_mod, only : psb_dpk_, done real(psb_dpk_), save, private :: epsilon=done/80 diff --git a/tests/pdegen/amg_s_genpde_mod.f90 b/tests/pdegen/amg_s_genpde_mod.F90 similarity index 93% rename from tests/pdegen/amg_s_genpde_mod.f90 rename to tests/pdegen/amg_s_genpde_mod.F90 index 97f2fa8f..d75bb333 100644 --- a/tests/pdegen/amg_s_genpde_mod.f90 +++ b/tests/pdegen/amg_s_genpde_mod.F90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_genpde_mod @@ -225,7 +261,11 @@ contains ! A nifty MPI function will split the process list npdims = 0 +#if defined(SERIAL_MPI) + npdims = 1 +#else call mpi_dims_create(np,3,npdims,info) +#endif npx = npdims(1) npy = npdims(2) npz = npdims(3) @@ -675,7 +715,11 @@ contains ! A nifty MPI function will split the process list npdims = 0 +#if defined(SERIAL_MPI) + npdims = 1 +#else call mpi_dims_create(np,2,npdims,info) +#endif npx = npdims(1) npy = npdims(2) diff --git a/tests/pdegen/amg_s_pde2d_base_mod.f90 b/tests/pdegen/amg_s_pde2d_base_mod.f90 index a7223a8b..09376a68 100644 --- a/tests/pdegen/amg_s_pde2d_base_mod.f90 +++ b/tests/pdegen/amg_s_pde2d_base_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_pde2d_base_mod use psb_base_mod, only : psb_spk_, szero, sone real(psb_spk_), save, private :: epsilon=sone/80 diff --git a/tests/pdegen/amg_s_pde2d_box_mod.f90 b/tests/pdegen/amg_s_pde2d_box_mod.f90 index 96d3f2f0..77e92514 100644 --- a/tests/pdegen/amg_s_pde2d_box_mod.f90 +++ b/tests/pdegen/amg_s_pde2d_box_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_pde2d_box_mod use psb_base_mod, only : psb_spk_, szero, sone real(psb_spk_), save, private :: epsilon=sone/80 diff --git a/tests/pdegen/amg_s_pde2d_exp_mod.f90 b/tests/pdegen/amg_s_pde2d_exp_mod.f90 index bcb944f7..80d34f28 100644 --- a/tests/pdegen/amg_s_pde2d_exp_mod.f90 +++ b/tests/pdegen/amg_s_pde2d_exp_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_pde2d_exp_mod use psb_base_mod, only : psb_spk_, sone, szero real(psb_spk_), save, private :: epsilon=sone/80 diff --git a/tests/pdegen/amg_s_pde3d_base_mod.f90 b/tests/pdegen/amg_s_pde3d_base_mod.f90 index a58a10ca..7acac026 100644 --- a/tests/pdegen/amg_s_pde3d_base_mod.f90 +++ b/tests/pdegen/amg_s_pde3d_base_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_pde3d_base_mod use psb_base_mod, only : psb_spk_, sone real(psb_spk_), save, private :: epsilon=sone/80 diff --git a/tests/pdegen/amg_s_pde3d_exp_mod.f90 b/tests/pdegen/amg_s_pde3d_exp_mod.f90 index ad8f48c7..242ed429 100644 --- a/tests/pdegen/amg_s_pde3d_exp_mod.f90 +++ b/tests/pdegen/amg_s_pde3d_exp_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_pde3d_exp_mod use psb_base_mod, only : psb_spk_, sone real(psb_spk_), save, private :: epsilon=sone/160 diff --git a/tests/pdegen/amg_s_pde3d_gauss_mod.f90 b/tests/pdegen/amg_s_pde3d_gauss_mod.f90 index 5e62fa09..20d4017d 100644 --- a/tests/pdegen/amg_s_pde3d_gauss_mod.f90 +++ b/tests/pdegen/amg_s_pde3d_gauss_mod.f90 @@ -1,3 +1,39 @@ +! +! +! AMG4PSBLAS version 1.0 +! Algebraic Multigrid Package +! based on PSBLAS (Parallel Sparse BLAS version 3.7) +! +! (C) Copyright 2021 +! +! Salvatore Filippone +! Pasqua D'Ambra +! Fabio Durastante +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! 1. Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! 2. Redistributions in binary form must reproduce the above copyright +! notice, this list of conditions, and the following disclaimer in the +! documentation and/or other materials provided with the distribution. +! 3. The name of the AMG4PSBLAS group or the names of its contributors may +! not be used to endorse or promote products derived from this +! software without specific written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +! TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +! PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AMG4PSBLAS GROUP OR ITS CONTRIBUTORS +! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! module amg_s_pde3d_gauss_mod use psb_base_mod, only : psb_spk_, sone real(psb_spk_), save, private :: epsilon=sone/80