78void AlephKappaService::
81 debug() <<
"[AlephKappaService] Retrieving world size...";
82 m_world_size = m_world_parallel->commSize();
83 m_world_rank = m_world_parallel->commRank();
85 debug() <<
"[AlephKappaService] I should be an additional site #"
86 << m_world_rank <<
" among " << m_world_size;
88 debug() <<
"[AlephKappaService] Retrieving configuration...";
94 m_world_parallel->broadcast(
cfg, 0);
95 for (Integer
rnk = 0, max =
cfg.size();
rnk < max;
rnk += 1) {
96 debug() <<
"[AlephKappaService] cfg[" <<
rnk <<
"]=" <<
cfg[
rnk];
99 debug() <<
"[AlephKappaService] factory";
100 m_factory =
new AlephFactory(m_application, m_world_parallel->traceMng());
101 debug() <<
"[AlephKappaService] kernel";
105 m_underlying_solver =
cfg.at(0),
106 m_solver_size =
cfg.at(1),
107 m_reorder = (
cfg.at(2) == 1) ?
true :
false);
113 TypesSolver::DIAGONAL,
125 "SolveErrorAlephMatrix.dbg",
134 TypesSolver::SymHybGSJ_smoother,
135 TypesSolver::ParallelRugeStuben,
136 TypesSolver::CG_coarse_solver,
152 debug() <<
"[AlephKappaService] listening for a token...";
154 m_world_parallel->broadcast(
token.view(), 0);
156 debug() <<
"[AlephKappaService] found token " <<
token.at(0);
159 switch (
token.at(0)) {
163 case (0xd80dee82l): {
164 debug() <<
"[AlephKappaService] AlephKernel::initialize!";
167 m_world_parallel->broadcast(args.view(), 0);
168 m_kernel->initialize((Integer)args.at(0), (Integer)args.at(1));
176 debug() <<
"[AlephKappaService] AlephKernel::createSolverMatrix (new A[" <<
A_matrix_queue.size() <<
"])!";
184 case (0xba9488bel): {
185 debug() <<
"[AlephKappaService] AlephKernel::postSolver!";
187 m_world_parallel->broadcast(
real_args.view(), 0);
191 params->setDDMCParameterAmgDiagonalThreshold(
real_args.at(3));
194 m_world_parallel->broadcast(
bool_args.view(), 0);
195 params->setXoUser((
bool)
bool_args.at(0));
196 params->setCheckRealResidue((
bool)
bool_args.at(1));
197 params->setPrintRealResidue((
bool)
bool_args.at(2));
198 params->setDebugInfo((
bool)
bool_args.at(3));
199 params->setConvergenceAnalyse((
bool)
bool_args.at(4));
200 params->setStopErrorStrategy((
bool)
bool_args.at(5));
201 params->setWriteMatrixToFileErrorStrategy((
bool)
bool_args.at(6));
202 params->setDDMCParameterListingOutput((
bool)
bool_args.at(7));
203 params->setPrintCpuTimeResolution((
bool)
bool_args.at(8));
204 params->setKeepSolverStructure((
bool)
bool_args.at(9));
205 params->setSequentialSolver((
bool)
bool_args.at(10));
208 m_world_parallel->broadcast(
int_args.view(), 0);
211 params->setPrecond((TypesSolver::ePreconditionerMethod)
int_args.at(2));
212 params->setMethod((TypesSolver::eSolverMethod)
int_args.at(3));
213 params->setAmgCoarseningMethod((TypesSolver::eAmgCoarseningMethod)
int_args.at(4));
214 params->setOutputLevel(
int_args.at(5));
215 params->setAmgCycle(
int_args.at(6));
216 params->setAmgSolverIter(
int_args.at(7));
217 params->setAmgSmootherIter(
int_args.at(8));
218 params->setAmgSmootherOption((TypesSolver::eAmgSmootherOption)
int_args.at(9));
219 params->setAmgCoarseningOption((TypesSolver::eAmgCoarseningOption)
int_args.at(10));
220 params->setAmgCoarseSolverOption((TypesSolver::eAmgCoarseSolverOption)
int_args.at(11));
221 params->setCriteriaStop((TypesSolver::eCriteriaStop)
int_args.at(12));
232 debug() <<
"[AlephKappaService] AlephKernel::createSolverVector (new b[" <<
b.size() <<
"])";
233 b.add(m_kernel->createSolverVector());
236 debug() <<
"[AlephKappaService] AlephKernel::createSolverVector (new x[" << x.size() <<
"])";
237 x.add(m_kernel->createSolverVector());
247 debug() <<
"[AlephKappaService] AlephMatrix::create(void)!";
255 case (0x6bdba30al): {
257 debug() <<
"[AlephKappaService] firstVectorCreateForTmp";
263 debug() <<
"[AlephKappaService] AlephVector::create (b[" << m_kernel->index() <<
"])";
264 b.at(m_kernel->index())->create();
267 debug() <<
"[AlephKappaService] AlephVector::create (x[" << m_kernel->index() <<
"])";
268 x.at(m_kernel->index())->create();
277 case (0x74f253cal): {
278 debug() <<
"[AlephKappaService] AlephMatrix::assemble! (kernel->index=" << m_kernel->index() <<
")";
290 case (0xec7a979fl): {
292 debug() <<
"[AlephKappaService] AlephVector::assemble! (b" << m_kernel->index() <<
")";
293 b.at(m_kernel->index())->assemble();
296 debug() <<
"[AlephKappaService] AlephVector::assemble! (x" << m_kernel->index() <<
")";
297 x.at(m_kernel->index())->assemble();
306 case (0xbf8d3adfl): {
307 debug() <<
"[AlephKappaService] AlephKernel::syncSolver";
310 m_world_parallel->broadcast(
gid.view(), 0);
314 debug() <<
"[AlephKappaService] AlephKernel::syncSolver group id=" <<
gid.at(0);
323 case (0xdfeb699fl): {
324 debug() <<
"[AlephKappaService] AlephKernel::finalize!";
334 debug() <<
"[AlephKappaService] default";