From 11d8c090c84c51fa5b0f668f60e5c7eccf81c8a6 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 10 Nov 2020 13:23:03 +0100 Subject: [PATCH] Begin preparation for applying remap. --- amgprec/impl/level/Makefile | 10 +++++++++- amgprec/impl/level/amg_c_base_onelev_map_rstr.F90 | 15 +++++++++++++++ amgprec/impl/level/amg_d_base_onelev_map_rstr.F90 | 15 +++++++++++++++ amgprec/impl/level/amg_s_base_onelev_map_rstr.F90 | 15 +++++++++++++++ amgprec/impl/level/amg_z_base_onelev_map_rstr.F90 | 15 +++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) diff --git a/amgprec/impl/level/Makefile b/amgprec/impl/level/Makefile index e24159ca..80d782da 100644 --- a/amgprec/impl/level/Makefile +++ b/amgprec/impl/level/Makefile @@ -21,6 +21,8 @@ amg_c_base_onelev_mat_asb.o \ amg_c_base_onelev_setag.o \ amg_c_base_onelev_setsm.o \ amg_c_base_onelev_setsv.o \ +amg_c_base_onelev_map_rstr.o \ +amg_c_base_onelev_map_prol.o \ amg_d_base_onelev_build.o \ amg_d_base_onelev_check.o \ amg_d_base_onelev_cnv.o \ @@ -34,6 +36,8 @@ amg_d_base_onelev_mat_asb.o \ amg_d_base_onelev_setag.o \ amg_d_base_onelev_setsm.o \ amg_d_base_onelev_setsv.o \ +amg_d_base_onelev_map_rstr.o \ +amg_d_base_onelev_map_prol.o \ amg_s_base_onelev_build.o \ amg_s_base_onelev_check.o \ amg_s_base_onelev_cnv.o \ @@ -47,6 +51,8 @@ amg_s_base_onelev_mat_asb.o \ amg_s_base_onelev_setag.o \ amg_s_base_onelev_setsm.o \ amg_s_base_onelev_setsv.o \ +amg_s_base_onelev_map_rstr.o \ +amg_s_base_onelev_map_prol.o \ amg_z_base_onelev_build.o \ amg_z_base_onelev_check.o \ amg_z_base_onelev_cnv.o \ @@ -59,7 +65,9 @@ amg_z_base_onelev_free.o \ amg_z_base_onelev_mat_asb.o \ amg_z_base_onelev_setag.o \ amg_z_base_onelev_setsm.o \ -amg_z_base_onelev_setsv.o +amg_z_base_onelev_setsv.o \ +amg_z_base_onelev_map_rstr.o \ +amg_z_base_onelev_map_prol.o LIBNAME=libamg_prec.a diff --git a/amgprec/impl/level/amg_c_base_onelev_map_rstr.F90 b/amgprec/impl/level/amg_c_base_onelev_map_rstr.F90 index 44a6ffa9..3f714e57 100644 --- a/amgprec/impl/level/amg_c_base_onelev_map_rstr.F90 +++ b/amgprec/impl/level/amg_c_base_onelev_map_rstr.F90 @@ -52,6 +52,21 @@ subroutine amg_c_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,work,vt ! Remap has happened, deal with it ! write(0,*) 'Remap handling not implemented yet ' + block + integer(psb_ipk_) :: i,j,ip,nctxt,ictxt, idest + integer(psb_ipk_) :: me, np, rme, rnp + + ictxt = lv%remap_data%desc_ac_pre_remap%get_ctxt() + call psb_info(ictxt,me,np) + nctxt = lv%desc_ac%get_ctxt() + call psb_info(nctxt,rme,rnp) + idest = lv%remap_data%idest + associate(isrc => lv%remap_data%isrc, nrsrc => lv%remap_data%nrsrc) + write(0,*) 'Should apply maps, then send data from ',me,' to ',idest + if (rme >= 0) write(0,*) rme, ' Receiving data from ',isrc(:) + end associate + end block + else ! Default transfer call lv%linmap%map_U2V(alpha,vect_u,beta,vect_v,info,& diff --git a/amgprec/impl/level/amg_d_base_onelev_map_rstr.F90 b/amgprec/impl/level/amg_d_base_onelev_map_rstr.F90 index 58353cab..455bdac0 100644 --- a/amgprec/impl/level/amg_d_base_onelev_map_rstr.F90 +++ b/amgprec/impl/level/amg_d_base_onelev_map_rstr.F90 @@ -52,6 +52,21 @@ subroutine amg_d_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,work,vt ! Remap has happened, deal with it ! write(0,*) 'Remap handling not implemented yet ' + block + integer(psb_ipk_) :: i,j,ip,nctxt,ictxt, idest + integer(psb_ipk_) :: me, np, rme, rnp + + ictxt = lv%remap_data%desc_ac_pre_remap%get_ctxt() + call psb_info(ictxt,me,np) + nctxt = lv%desc_ac%get_ctxt() + call psb_info(nctxt,rme,rnp) + idest = lv%remap_data%idest + associate(isrc => lv%remap_data%isrc, nrsrc => lv%remap_data%nrsrc) + write(0,*) 'Should apply maps, then send data from ',me,' to ',idest + if (rme >= 0) write(0,*) rme, ' Receiving data from ',isrc(:) + end associate + end block + else ! Default transfer call lv%linmap%map_U2V(alpha,vect_u,beta,vect_v,info,& diff --git a/amgprec/impl/level/amg_s_base_onelev_map_rstr.F90 b/amgprec/impl/level/amg_s_base_onelev_map_rstr.F90 index d19b2924..fad8ceac 100644 --- a/amgprec/impl/level/amg_s_base_onelev_map_rstr.F90 +++ b/amgprec/impl/level/amg_s_base_onelev_map_rstr.F90 @@ -52,6 +52,21 @@ subroutine amg_s_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,work,vt ! Remap has happened, deal with it ! write(0,*) 'Remap handling not implemented yet ' + block + integer(psb_ipk_) :: i,j,ip,nctxt,ictxt, idest + integer(psb_ipk_) :: me, np, rme, rnp + + ictxt = lv%remap_data%desc_ac_pre_remap%get_ctxt() + call psb_info(ictxt,me,np) + nctxt = lv%desc_ac%get_ctxt() + call psb_info(nctxt,rme,rnp) + idest = lv%remap_data%idest + associate(isrc => lv%remap_data%isrc, nrsrc => lv%remap_data%nrsrc) + write(0,*) 'Should apply maps, then send data from ',me,' to ',idest + if (rme >= 0) write(0,*) rme, ' Receiving data from ',isrc(:) + end associate + end block + else ! Default transfer call lv%linmap%map_U2V(alpha,vect_u,beta,vect_v,info,& diff --git a/amgprec/impl/level/amg_z_base_onelev_map_rstr.F90 b/amgprec/impl/level/amg_z_base_onelev_map_rstr.F90 index 60b9d46c..d857e5b2 100644 --- a/amgprec/impl/level/amg_z_base_onelev_map_rstr.F90 +++ b/amgprec/impl/level/amg_z_base_onelev_map_rstr.F90 @@ -52,6 +52,21 @@ subroutine amg_z_base_onelev_map_rstr_v(lv,alpha,vect_u,beta,vect_v,info,work,vt ! Remap has happened, deal with it ! write(0,*) 'Remap handling not implemented yet ' + block + integer(psb_ipk_) :: i,j,ip,nctxt,ictxt, idest + integer(psb_ipk_) :: me, np, rme, rnp + + ictxt = lv%remap_data%desc_ac_pre_remap%get_ctxt() + call psb_info(ictxt,me,np) + nctxt = lv%desc_ac%get_ctxt() + call psb_info(nctxt,rme,rnp) + idest = lv%remap_data%idest + associate(isrc => lv%remap_data%isrc, nrsrc => lv%remap_data%nrsrc) + write(0,*) 'Should apply maps, then send data from ',me,' to ',idest + if (rme >= 0) write(0,*) rme, ' Receiving data from ',isrc(:) + end associate + end block + else ! Default transfer call lv%linmap%map_U2V(alpha,vect_u,beta,vect_v,info,&