15 int lvlCommSize = 1 << (alvl + 1);
16 int lvlCommBase = (myGrid / lvlCommSize) * lvlCommSize;
17 int lvlCommRank = myGrid - lvlCommBase;
19 MPI_Comm_split(zComm, lvlCommBase, lvlCommRank, &lvlComm);
20 zCommOut[alvl] = lvlComm;
28template <
typename Ftype>
55 for (
int_t topoLvl = 0; topoLvl < maxTopoLevel; ++topoLvl)
58 int_t k_st = eTreeTopLims[topoLvl];
59 int_t k_end = eTreeTopLims[topoLvl + 1];
60 for (
int_t k0 = k_st; k0 < k_end; ++k0)
62 int_t k = perm_c_supno[k0];
63 int kRoot = anc25d.rootRank(k0, alvl);
67 void *sendBuf = (
void *)lPanelVec[g2lCol(k)].val;
68 if (anc25d.rankHasGrid(k0, alvl))
69 sendBuf = MPI_IN_PLACE;
71 MPI_Reduce(sendBuf, lPanelVec[g2lCol(k)].val,
72 lPanelVec[g2lCol(k)].nzvalSize(), get_mpi_type<Ftype>(), MPI_SUM, kRoot, anc25d.getComm(alvl));
77 void *sendBuf = (
void *)uPanelVec[g2lRow(k)].val;
78 if (anc25d.rankHasGrid(k0, alvl))
79 sendBuf = MPI_IN_PLACE;
80 MPI_Reduce(sendBuf, uPanelVec[g2lRow(k)].val,
81 uPanelVec[g2lRow(k)].nzvalSize(), get_mpi_type<Ftype>(), MPI_SUM, kRoot, anc25d.getComm(alvl));
84 if (anc25d.rankHasGrid(k0, alvl))
87 int_t offset = k0 - k_st;
90 if (iam == procIJ(k, k))
92 lPanelVec[g2lCol(k)].diagFactor(k, dFBufs[offset]->BlockUFactor, ksupc,
93 thresh, xsup, options, stat, info);
94 lPanelVec[g2lCol(k)].packDiagBlock(dFBufs[offset]->BlockLFactor, ksupc);
99 MPI_Bcast((
void *)dFBufs[offset]->BlockLFactor, ksupc * ksupc,
100 get_mpi_type<Ftype>(), kcol(k), (grid->rscp).comm);
101 if (mycol == kcol(k))
102 MPI_Bcast((
void *)dFBufs[offset]->BlockUFactor, ksupc * ksupc,
103 get_mpi_type<Ftype>(), krow(k), (grid->cscp).comm);
106 if (myrow == krow(k))
107 uPanelVec[g2lRow(k)].panelSolve(ksupc, dFBufs[offset]->BlockLFactor, ksupc);
109 if (mycol == kcol(k))
110 lPanelVec[g2lCol(k)].panelSolve(ksupc, dFBufs[offset]->BlockUFactor, ksupc);
115 if (myrow == krow(k))
117 k_upanel = uPanelVec[g2lRow(k)];
119 if (mycol == kcol(k))
120 k_lpanel = lPanelVec[g2lCol(k)];
122 if (UidxSendCounts[k] > 0)
125 MPI_Bcast(k_upanel.
val, UvalSendCounts[k], get_mpi_type<Ftype>(), krow(k), grid3d->
cscp.
comm);
128 if (LidxSendCounts[k] > 0)
131 MPI_Bcast(k_lpanel.
val, LvalSendCounts[k], get_mpi_type<Ftype>(), kcol(k), grid3d->
rscp.
comm);
135#warning single node only
138 if (UidxSendCounts[k] > 0 && LidxSendCounts[k] > 0)
141 dSchurComplementUpdate(k, k_lpanel, k_upanel);
146 if (mycol == kcol(k))
147 MPI_Bcast(lPanelVec[g2lCol(k)].val,
148 lPanelVec[g2lCol(k)].nzvalSize(), get_mpi_type<Ftype>(), kRoot, anc25d.getComm(alvl));
150 if (myrow == krow(k))
151 MPI_Bcast(uPanelVec[g2lRow(k)].val,
152 uPanelVec[g2lRow(k)].nzvalSize(), get_mpi_type<Ftype>(), kRoot, anc25d.getComm(alvl));
Definition: xlupanels.hpp:22
int_t * index
Definition: xlupanels.hpp:24
Ftype * val
Definition: xlupanels.hpp:25
Definition: xlupanels.hpp:176
int_t * index
Definition: xlupanels.hpp:178
int_t checkCorrectness()
Definition: xlupanels.hpp:276
Ftype * val
Definition: xlupanels.hpp:179
typename std::conditional< std::is_same< Ftype, double >::value, ddiagFactBufs_t, typename std::conditional< std::is_same< Ftype, float >::value, sdiagFactBufs_t, typename std::conditional< std::is_same< Ftype, doublecomplex >::value, zdiagFactBufs_t, void >::type >::type >::type diagFactBufs_type
Definition: luAuxStructTemplated.hpp:147
MPI_Comm * initComm(gridinfo3d_t *grid3d)
Definition: anc25d.cpp:5
int maxLvl
Definition: anc25d.hpp:16
Definition: superlu_defs.h:978
Definition: superlu_defs.h:414
superlu_scope_t zscp
Definition: superlu_defs.h:418
superlu_scope_t rscp
Definition: superlu_defs.h:416
int iam
Definition: superlu_defs.h:420
superlu_scope_t cscp
Definition: superlu_defs.h:417
Definition: superlu_defs.h:989
treeTopoInfo_t topoInfo
Definition: superlu_defs.h:999
int_t * nodeList
Definition: superlu_defs.h:992
int_t nNodes
Definition: superlu_defs.h:991
int Np
Definition: superlu_defs.h:399
MPI_Comm comm
Definition: superlu_defs.h:398
int Iam
Definition: superlu_defs.h:400
Definition: superlu_defs.h:970
int_t numLvl
Definition: superlu_defs.h:971
int_t * eTreeTopLims
Definition: superlu_defs.h:972
int_t dAncestorFactorBaseline(int_t alvl, sForest_t *sforest, diagFactBufs_type< Ftype > **dFBufs, gEtreeInfo_t *gEtreeInfo, int tag_ub)
Definition: anc25d_impl.hpp:29
int_t log2i(int_t index)
Definition: supernodal_etree.c:17
#define SuperSize(bnum)
Definition: superlu_defs.h:271
#define mpi_int_t
Definition: superlu_defs.h:120
int_t getNumLookAhead(superlu_dist_options_t *)
Definition: treeFactorization.c:186
int64_t int_t
Definition: superlu_defs.h:119
#define SUPERLU_MALLOC(size)
Definition: util_dist.h:48
#define CHECK_MALLOC(pnum, where)
Definition: util_dist.h:56