From f26b66334a3be6f068a280fd6d80f0939b26c6ad Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Sun, 19 Apr 2026 12:49:24 +0200 Subject: [PATCH] Comment on onelev. --- amgprec/amg_c_onelev_mod.f90 | 21 +++++++++++++++++++++ amgprec/amg_d_onelev_mod.f90 | 21 +++++++++++++++++++++ amgprec/amg_s_onelev_mod.f90 | 21 +++++++++++++++++++++ amgprec/amg_z_onelev_mod.f90 | 21 +++++++++++++++++++++ 4 files changed, 84 insertions(+) diff --git a/amgprec/amg_c_onelev_mod.f90 b/amgprec/amg_c_onelev_mod.f90 index e70b6716..f863d7c6 100644 --- a/amgprec/amg_c_onelev_mod.f90 +++ b/amgprec/amg_c_onelev_mod.f90 @@ -154,6 +154,27 @@ module amg_c_onelev_mod private :: c_wrk_alloc, c_wrk_free, & & c_wrk_clone, c_wrk_move_alloc, c_wrk_cnv, c_wrk_sizeof + ! + ! Remap. + ! This keeps track of remapping. + ! Logic here is as follows: + ! 1. AC_PRE_REMAP need to figure out if we + ! really need it. + ! 2. DESC_AC_PRE_REMAP contains the descriptor before + ! remapping. Meaning that it is possible + ! to implement the RESTRICTOR operator by + ! a. Doing LINMAP_U2V onto this one + ! b. For each process, send the data to + ! IDEST. + ! This assumes that remapping goes by + ! a factor of 2. + ! For the PROLONGATOR operators, we first + ! use DESC_AC, then split and send onto + ! the processes in DESC_AC_PRE_REMAP. + ! + ! To be fixed: what happens if NP the starting processes + ! is not an even number? Coordinate with _X_remap in PSBLAS + ! type amg_c_remap_data_type type(psb_cspmat_type) :: ac_pre_remap type(psb_desc_type) :: desc_ac_pre_remap diff --git a/amgprec/amg_d_onelev_mod.f90 b/amgprec/amg_d_onelev_mod.f90 index e12dad3f..1a46d393 100644 --- a/amgprec/amg_d_onelev_mod.f90 +++ b/amgprec/amg_d_onelev_mod.f90 @@ -155,6 +155,27 @@ module amg_d_onelev_mod private :: d_wrk_alloc, d_wrk_free, & & d_wrk_clone, d_wrk_move_alloc, d_wrk_cnv, d_wrk_sizeof + ! + ! Remap. + ! This keeps track of remapping. + ! Logic here is as follows: + ! 1. AC_PRE_REMAP need to figure out if we + ! really need it. + ! 2. DESC_AC_PRE_REMAP contains the descriptor before + ! remapping. Meaning that it is possible + ! to implement the RESTRICTOR operator by + ! a. Doing LINMAP_U2V onto this one + ! b. For each process, send the data to + ! IDEST. + ! This assumes that remapping goes by + ! a factor of 2. + ! For the PROLONGATOR operators, we first + ! use DESC_AC, then split and send onto + ! the processes in DESC_AC_PRE_REMAP. + ! + ! To be fixed: what happens if NP the starting processes + ! is not an even number? Coordinate with _X_remap in PSBLAS + ! type amg_d_remap_data_type type(psb_dspmat_type) :: ac_pre_remap type(psb_desc_type) :: desc_ac_pre_remap diff --git a/amgprec/amg_s_onelev_mod.f90 b/amgprec/amg_s_onelev_mod.f90 index d2159ace..9b78a9d5 100644 --- a/amgprec/amg_s_onelev_mod.f90 +++ b/amgprec/amg_s_onelev_mod.f90 @@ -155,6 +155,27 @@ module amg_s_onelev_mod private :: s_wrk_alloc, s_wrk_free, & & s_wrk_clone, s_wrk_move_alloc, s_wrk_cnv, s_wrk_sizeof + ! + ! Remap. + ! This keeps track of remapping. + ! Logic here is as follows: + ! 1. AC_PRE_REMAP need to figure out if we + ! really need it. + ! 2. DESC_AC_PRE_REMAP contains the descriptor before + ! remapping. Meaning that it is possible + ! to implement the RESTRICTOR operator by + ! a. Doing LINMAP_U2V onto this one + ! b. For each process, send the data to + ! IDEST. + ! This assumes that remapping goes by + ! a factor of 2. + ! For the PROLONGATOR operators, we first + ! use DESC_AC, then split and send onto + ! the processes in DESC_AC_PRE_REMAP. + ! + ! To be fixed: what happens if NP the starting processes + ! is not an even number? Coordinate with _X_remap in PSBLAS + ! type amg_s_remap_data_type type(psb_sspmat_type) :: ac_pre_remap type(psb_desc_type) :: desc_ac_pre_remap diff --git a/amgprec/amg_z_onelev_mod.f90 b/amgprec/amg_z_onelev_mod.f90 index 15ed90f9..7c0da195 100644 --- a/amgprec/amg_z_onelev_mod.f90 +++ b/amgprec/amg_z_onelev_mod.f90 @@ -154,6 +154,27 @@ module amg_z_onelev_mod private :: z_wrk_alloc, z_wrk_free, & & z_wrk_clone, z_wrk_move_alloc, z_wrk_cnv, z_wrk_sizeof + ! + ! Remap. + ! This keeps track of remapping. + ! Logic here is as follows: + ! 1. AC_PRE_REMAP need to figure out if we + ! really need it. + ! 2. DESC_AC_PRE_REMAP contains the descriptor before + ! remapping. Meaning that it is possible + ! to implement the RESTRICTOR operator by + ! a. Doing LINMAP_U2V onto this one + ! b. For each process, send the data to + ! IDEST. + ! This assumes that remapping goes by + ! a factor of 2. + ! For the PROLONGATOR operators, we first + ! use DESC_AC, then split and send onto + ! the processes in DESC_AC_PRE_REMAP. + ! + ! To be fixed: what happens if NP the starting processes + ! is not an even number? Coordinate with _X_remap in PSBLAS + ! type amg_z_remap_data_type type(psb_zspmat_type) :: ac_pre_remap type(psb_desc_type) :: desc_ac_pre_remap