53 double &maxrelresidual,
57 std::string StringFilename = filename ;
58 bool ImpcolB = ( StringFilename.find(
"ImpcolB") < StringFilename.find(
"xdz_notaname_garbage") );
68 bool MyVerbose = false ;
78 ParamList.
set(
"Redistribute",
true );
79 ParamList.
set(
"AddZeroToDiag",
true );
80 ParamList.
set(
"AddToDiag", 1e2 );
82 SuperludistParams.
set(
"ReuseSymbolic",
true );
83 SuperludistParams.
set(
"MaxProcesses", 2 );
86 const int ExpectedError = 0 ;
104 std::cout <<
"Amesos_Superludist failed with error code " << Errors<< std::endl ;
108 NumErrors += Errors ;
109 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
110 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
120 ParamList.
set(
"Redistribute",
true );
121 ParamList.
set(
"AddZeroToDiag",
false );
122 ParamList.
set(
"AddToDiag", 1e2 );
124 SuperludistParams.
set(
"ReuseSymbolic",
true );
125 SuperludistParams.
set(
"MaxProcesses", 2 );
144 std::cout <<
"Amesos_Superludist failed with error code " << Errors<< std::endl ;
148 NumErrors += Errors ;
149 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
150 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
160 ParamList.
set(
"Redistribute",
true );
161 ParamList.
set(
"AddZeroToDiag",
true );
163 SuperludistParams.
set(
"ReuseSymbolic",
false );
164 SuperludistParams.
set(
"MaxProcesses", 2 );
167 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
168 <<
" ParamList = " <<
169 ParamList << std::endl ;
182 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
183 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
191 ParamList.
set(
"Redistribute",
true );
192 ParamList.
set(
"AddZeroToDiag",
true );
194 SuperludistParams.
set(
"ReuseSymbolic",
true );
195 SuperludistParams.
set(
"MaxProcesses", 1 );
198 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
199 <<
" ParamList = " <<
200 ParamList << std::endl ;
213 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
214 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
223 ParamList.
set(
"Redistribute",
true );
224 ParamList.
set(
"AddZeroToDiag",
true );
226 SuperludistParams.
set(
"ReuseSymbolic",
false );
227 SuperludistParams.
set(
"MaxProcesses", 1 );
230 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
231 <<
" ParamList = " <<
232 ParamList << std::endl ;
245 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
246 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
257 ParamList.
set(
"Redistribute",
true );
258 ParamList.
set(
"AddZeroToDiag",
true );
260 SuperludistParams.
set(
"ReuseSymbolic",
false );
261 SuperludistParams.
set(
"MaxProcesses", 10 );
275 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
276 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
286 ParamList.
set(
"Redistribute",
true );
287 ParamList.
set(
"AddZeroToDiag",
false );
289 SuperludistParams.
set(
"ReuseSymbolic",
true );
290 SuperludistParams.
set(
"MaxProcesses", -1 );
293 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
294 <<
" ParamList = " <<
295 ParamList << std::endl ;
308 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
309 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
319 ParamList.
set(
"Redistribute",
true );
320 ParamList.
set(
"AddZeroToDiag",
false );
322 SuperludistParams.
set(
"ReuseSymbolic",
true );
323 SuperludistParams.
set(
"MaxProcesses", -2 );
326 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
327 <<
" ParamList = " <<
328 ParamList << std::endl ;
341 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
342 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
352 ParamList.
set(
"Redistribute",
true );
353 ParamList.
set(
"AddZeroToDiag",
false );
355 SuperludistParams.
set(
"ReuseSymbolic",
false );
356 SuperludistParams.
set(
"MaxProcesses", -3 );
359 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
360 <<
" ParamList = " <<
361 ParamList << std::endl ;
374 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
375 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
385 ParamList.
set(
"Redistribute",
true );
386 ParamList.
set(
"AddZeroToDiag",
false );
388 SuperludistParams.
set(
"ReuseSymbolic",
false );
389 SuperludistParams.
set(
"MaxProcesses", 4 );
392 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
393 <<
" ParamList = " <<
394 ParamList << std::endl ;
407 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
408 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
418 ParamList.
set(
"AddZeroToDiag",
true );
420 SuperludistParams.
set(
"ReuseSymbolic",
true );
421 SuperludistParams.
set(
"MaxProcesses", 4 );
423 ParamList.
set(
"Redistribute",
true );
425 ParamList.
set(
"Redistribute",
false );
428 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
429 <<
" ParamList = " <<
430 ParamList << std::endl ;
443 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
444 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
454 ParamList.
set(
"Redistribute",
true );
456 ParamList.
set(
"Redistribute",
false );
457 ParamList.
set(
"AddZeroToDiag",
true );
459 SuperludistParams.
set(
"ReuseSymbolic",
true );
460 SuperludistParams.
set(
"MaxProcesses", 4 );
463 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
464 <<
" ParamList = " <<
465 ParamList << std::endl ;
478 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
479 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
490 ParamList.
set(
"Redistribute",
true );
492 ParamList.
set(
"Redistribute",
false );
493 ParamList.
set(
"AddZeroToDiag",
true );
495 SuperludistParams.
set(
"ReuseSymbolic",
false );
496 SuperludistParams.
set(
"MaxProcesses", 1 );
499 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
500 <<
" ParamList = " <<
501 ParamList << std::endl ;
514 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
515 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
526 ParamList.
set(
"Redistribute",
true );
528 ParamList.
set(
"Redistribute",
false );
529 ParamList.
set(
"AddZeroToDiag",
true );
531 SuperludistParams.
set(
"ReuseSymbolic",
false );
532 SuperludistParams.
set(
"MaxProcesses", 2 );
535 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
536 <<
" ParamList = " <<
537 ParamList << std::endl ;
550 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
551 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
562 ParamList.
set(
"Redistribute",
true );
564 ParamList.
set(
"Redistribute",
false );
565 ParamList.
set(
"AddZeroToDiag",
false );
567 SuperludistParams.
set(
"ReuseSymbolic",
true );
568 SuperludistParams.
set(
"MaxProcesses", 1 );
571 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
572 <<
" ParamList = " <<
573 ParamList << std::endl ;
586 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
587 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
598 ParamList.
set(
"Redistribute",
true );
600 ParamList.
set(
"Redistribute",
false );
601 ParamList.
set(
"AddZeroToDiag",
false );
603 SuperludistParams.
set(
"ReuseSymbolic",
true );
604 SuperludistParams.
set(
"MaxProcesses", 2 );
607 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
608 <<
" ParamList = " <<
609 ParamList << std::endl ;
622 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
623 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
632 ParamList.
set(
"Redistribute",
true );
634 ParamList.
set(
"Redistribute",
false );
635 ParamList.
set(
"AddZeroToDiag",
false );
637 SuperludistParams.
set(
"ReuseSymbolic",
true );
638 SuperludistParams.
set(
"Fact",
"SamePattern" );
639 SuperludistParams.
set(
"MaxProcesses", 2 );
642 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
643 <<
" ParamList = " <<
644 ParamList << std::endl ;
657 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
658 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
668 ParamList.
set(
"Redistribute",
true );
669 ParamList.
set(
"AddZeroToDiag",
false );
671 SuperludistParams.
set(
"ReuseSymbolic",
false );
672 SuperludistParams.
set(
"RowPerm",
"NATURAL" );
673 SuperludistParams.
set(
"MaxProcesses", 10 );
676 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
677 <<
" ParamList = " <<
678 ParamList << std::endl ;
691 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
692 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
702 ParamList.
set(
"Redistribute",
true );
703 ParamList.
set(
"AddZeroToDiag",
false );
705 SuperludistParams.
set(
"ReuseSymbolic",
false );
706 #if (SUPERLU_DIST_MAJOR_VERSION > 5) || ( SUPERLU_DIST_MAJOR_VERSION == 5 && SUPERLU_DIST_MINOR_VERSION > 3)
707 SuperludistParams.
set(
"RowPerm",
"LargeDiag_MC64" );
709 SuperludistParams.
set(
"RowPerm",
"LargeDiag" );
711 SuperludistParams.
set(
"MaxProcesses", 10 );
714 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
715 <<
" ParamList = " <<
716 ParamList << std::endl ;
729 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
730 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
741 ParamList.
set(
"Redistribute",
true );
742 ParamList.
set(
"AddZeroToDiag",
false );
744 SuperludistParams.
set(
"ReuseSymbolic",
true );
745 SuperludistParams.
set(
"RowPerm",
"NATURAL" );
746 SuperludistParams.
set(
"MaxProcesses", 10 );
749 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
750 <<
" ParamList = " <<
751 ParamList << std::endl ;
764 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
765 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
775 ParamList.
set(
"Redistribute",
true );
776 ParamList.
set(
"AddZeroToDiag",
false );
778 SuperludistParams.
set(
"ReuseSymbolic",
true );
779 #if (SUPERLU_DIST_MAJOR_VERSION > 5) || ( SUPERLU_DIST_MAJOR_VERSION == 5 && SUPERLU_DIST_MINOR_VERSION > 3)
780 SuperludistParams.
set(
"RowPerm",
"LargeDiag_MC64" );
782 SuperludistParams.
set(
"RowPerm",
"LargeDiag" );
784 SuperludistParams.
set(
"MaxProcesses", 10 );
787 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
788 <<
" ParamList = " <<
789 ParamList << std::endl ;
802 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
803 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
812 ParamList.
set(
"Redistribute",
true );
813 ParamList.
set(
"AddZeroToDiag",
false );
815 SuperludistParams.
set(
"ReuseSymbolic",
true );
816 SuperludistParams.
set(
"ReplaceTinyPivot",
true );
817 SuperludistParams.
set(
"MaxProcesses", 10 );
820 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
821 <<
" ParamList = " <<
822 ParamList << std::endl ;
835 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
836 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
845 ParamList.
set(
"Redistribute",
true );
846 ParamList.
set(
"AddZeroToDiag",
false );
848 SuperludistParams.
set(
"ReuseSymbolic",
true );
849 SuperludistParams.
set(
"ReplaceTinyPivot",
false );
850 SuperludistParams.
set(
"MaxProcesses", 10 );
853 if ( MyVerbose ) std::cout << __FILE__ <<
"::" << __LINE__
854 <<
" ParamList = " <<
855 ParamList << std::endl ;
868 maxrelerror =
EPETRA_MAX( relerror, maxrelerror ) ;
869 maxrelresidual =
EPETRA_MAX( relresidual, maxrelresidual ) ;
ParameterList & set(std::string const &name, T const &value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
const Epetra_Map & RowMatrixRowMap() const
RCP< ParameterList > sublist(const RCP< ParameterList > ¶mList, const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
int TestSuperludist(Epetra_CrsMatrix *&Amat, int EpetraMatrixType, bool transpose, bool verbose, int Levels, const double Rcond, double &maxrelerror, double &maxrelresidual, const char *filename, int &NumTests)
const Epetra_Comm & Comm() const