Console.WriteLine("Execution Date/time is " + DateTime.Now);
Execution Date/time is 11/24/2023 7:58:19 PM
System.Security.Principal.WindowsIdentity.GetCurrent().Name
FDY\JenkinsCI
//#r "C:\Users\jenkinsci\Documents\BoSSS-kummer\public\src\L4-application\BoSSSpad\bin\Debug\net5.0\BoSSSpad.dll"
#r "BoSSSpad.dll"
using System;
using System.Collections.Generic;
using System.Linq;
using ilPSP;
using ilPSP.Utils;
using BoSSS.Platform;
using BoSSS.Platform.LinAlg;
using BoSSS.Foundation;
using BoSSS.Foundation.XDG;
using BoSSS.Foundation.Grid;
using BoSSS.Foundation.Grid.Classic;
using BoSSS.Foundation.Grid.RefElements;
using BoSSS.Foundation.IO;
using BoSSS.Solution;
using BoSSS.Solution.Control;
using BoSSS.Solution.GridImport;
using BoSSS.Solution.Statistic;
using BoSSS.Solution.Utils;
using BoSSS.Solution.AdvancedSolvers;
using BoSSS.Solution.Gnuplot;
using BoSSS.Application.BoSSSpad;
using BoSSS.Application.XNSE_Solver;
using System.IO;
using BoSSS.Application.SipPoisson;
using static BoSSS.Application.BoSSSpad.BoSSSshell;
Init();
// Manually add database (e.g. when accessing the database of user `JenkinsCI` as some other, regular guy)
//var tempDb = OpenOrCreateDatabase(@"\\fdygitrunner\ValidationTests\bkup-2022Jul16_074633.WIP-k-LinslvPerfSer");
string PROJECT_NAME = System.Environment.GetEnvironmentVariable("LinslvPerfSer") ?? "LinslvPerfSer"; // this allows to modify the project name for testing purposes
wmg.Init(PROJECT_NAME);
wmg.SetNameBasedSessionJobControlCorrelation();
wmg.AllJobs
Project name is set to 'LinslvPerfSer'. Default Execution queue is chosen for the database. Opening existing database '\\fdygitrunner\ValidationTests\databases\LinslvPerfSer'.
databases
#0: { Session Count = 246; Grid Count = 36; Path = \\fdygitrunner\ValidationTests\databases\LinslvPerfSer }
//foreach(var s in wmg.Sessions) {
// Console.WriteLine(s.Database.Path);
//}
var FailedSessions = wmg.Sessions.Where(Si => Si.SuccessfulTermination == false
|| Convert.ToInt32(Si.KeysAndQueries["Conv"]) == 0);
FailedSessions
#0: LinslvPerfSer XdgStokes-J32768_p2_exp_Kcycle_schwarz* 10/29/2023 12:56:31 8b973436...
//NUnit.Framework.Assert.Zero(FailedSessions.Count(), "Some Sessions did not terminate successfully.");
//FailedSessions.ForEach(s => s.Delete(true));
The timing information that is requires for this study is not present in the default session table. Instead, it must be extracted from the session profiling.
To obtain timing-measurements, the instrumentation generated by certain BlockTrace
-blocks
within the UniSolver
, resp. the XdgBDFTimestepping
class is extracted and added to the data table:
// evaluators to add additional columns to the session table
static class AddCols {
static int GetSolType(ISessionInfo SI) {
if(SI.GetControl().GetSolverType().Name.Contains("XNSE"))
return 3;
if(SI.GetControl().GetSolverType().Name.Contains("XdgPoisson3Main"))
return 2;
return 1;
}
static public object XdgMatrixAssembly_time(ISessionInfo SI) {
var mcr = SI.GetProfiling()[0];
ilPSP.Tracing.MethodCallRecord nd;
if(GetSolType(SI) == 3)
nd = mcr.FindChildren("*.XdgTimestepping.ComputeOperatorMatrix").Single();
else
nd = mcr.FindChildren("MatrixAssembly").Single();
//var nd = ndS.ElementAt(0);
return nd.TimeSpentInMethod.TotalSeconds / nd.CallCount;
}
static public object Aggregation_basis_init_time(ISessionInfo SI) {
var mcr = SI.GetProfiling()[0];
var nd = mcr.FindChildren("Aggregation_basis_init").Single();
//var nd = ndS.ElementAt(0);
return nd.TimeSpentInMethod.TotalSeconds / nd.CallCount;
}
static public object Solver_Init_time(ISessionInfo SI) {
var mcr = SI.GetProfiling()[0];
var nd = mcr.FindChildren("Solver_Init").Single();
//var nd = ndS.ElementAt(0);
//Console.WriteLine("Number of nodes: " + ndS.Count() + " cc " + nd.CallCount );
return nd.TimeSpentInMethod.TotalSeconds / nd.CallCount;
}
static public object Solver_Run_time(ISessionInfo SI) {
var mcr = SI.GetProfiling()[0];
var nd = mcr.FindChildren("Solver_Run").Single();
//var nd = ndS.ElementAt(0);
return nd.TimeSpentInMethod.TotalSeconds / nd.CallCount;
}
static public object Solver_InitAndRun_time(ISessionInfo SI) {
double agitime = (double) Aggregation_basis_init_time(SI);
double initime = (double) Solver_Init_time(SI);
double runtime = (double) Solver_Run_time(SI);
return agitime + initime + runtime;
}
static public object Solver_TimePerIter(ISessionInfo SI) {
double runtime = (double) Solver_Run_time(SI);
double NoOfItr = Convert.ToDouble(SI.KeysAndQueries["NoIter"]);
return runtime/NoOfItr;
}
static public object NoOfCores(ISessionInfo SI){
return SI.GetProfiling().Length;
}
static public object ComputeNodeName(ISessionInfo SI) {
return SI.ComputeNodeNames.First();
}
//static public object DOFs(ISessionInfo SI) {
// int NoOfItr = Convert.ToInt32(SI.KeysAndQueries["NoIter"]);
// return NoOfItr;
//}
static public object DGdegree(ISessionInfo SI) {
switch(GetSolType(SI)) {
case 3:
return SI.KeysAndQueries.Single(kv => kv.Key.Contains("DGdegree:Velocity")).Value;
case 2:
return SI.KeysAndQueries.Single(kv => kv.Key == "DGdegree:u").Value;
case 1:
return SI.KeysAndQueries.Single(kv => kv.Key == "DGdegree:T").Value;
}
throw new ArgumentException();
}
}
wmg.AdditionalSessionTableColums.Clear();
wmg.AdditionalSessionTableColums.Add("MatrixAssembly", AddCols.XdgMatrixAssembly_time);
wmg.AdditionalSessionTableColums.Add("Aggregation_basis_init_time", AddCols.Aggregation_basis_init_time);
wmg.AdditionalSessionTableColums.Add("Solver_Init_time", AddCols.Solver_Init_time);
wmg.AdditionalSessionTableColums.Add("Solver_Run_time", AddCols.Solver_Run_time);
wmg.AdditionalSessionTableColums.Add("Solver_InitAndRun_time", AddCols.Solver_InitAndRun_time);
wmg.AdditionalSessionTableColums.Add("Solver_TimePerIter", AddCols.Solver_TimePerIter);
wmg.AdditionalSessionTableColums.Add("NoOfCores", AddCols.NoOfCores);
wmg.AdditionalSessionTableColums.Add("ComputeNodeName", AddCols.ComputeNodeName);
wmg.AdditionalSessionTableColums.Add("DGdegree", AddCols.DGdegree);
//wmg.AdditionalSessionTableColums.Add("DOFs", AddCols.DOFs);
var SessTab = wmg.SessionTable;
//// The Session column can't be serialized,
//// we have to remove it
//List<string> AllCols = FullSessTab.GetColumnNames().ToList();
//AllCols.Remove("Session");
//FullSessTab = FullSessTab.ExtractColumns(AllCols.ToArray());
List of all available Data Columns:
SessTab.GetColumnNames().ToConcatString("", "; ", "")
ProjectName; SessionName; DGdegree:Velocity*; DGdegree:Pressure; DGdegree:PhiDG; DGdegree:Phi; DGdegree:Phi2DG; DGdegree:Phi2; DGdegree:Curvature; Bndtype:wall; UseImmersedBoundary; TimesteppingMode; Timestepper_LevelSetHandling; GeneratedFromCode; ControlFileText_Index; NoOfMultigridLevels; dtFixed; DynamicLoadBalancing_CellCostEstimators[0].TypeToWgt[0].Item1; DynamicLoadBalancing_CellCostEstimators[0].TypeToWgt[0].Item2; DynamicLoadBalancing_CellCostEstimators[0].TypeToWgt[1].Item1; DynamicLoadBalancing_CellCostEstimators[0].TypeToWgt[1].Item2; DynamicLoadBalancing_CellCostEstimators[0].CellClassifier.VoidSpecies; DynamicLoadBalancing_CellCostEstimators[1].TypeToWgt[0].Item1; DynamicLoadBalancing_CellCostEstimators[1].TypeToWgt[0].Item2; DynamicLoadBalancing_CellCostEstimators[1].TypeToWgt[1].Item1; DynamicLoadBalancing_CellCostEstimators[1].TypeToWgt[1].Item2; DynamicLoadBalancing_CellCostEstimators[1].CellClassifier.VoidSpecies; UseSchurBlockPrec; RefineStrategy; BaseRefinementLevel; RefinementLevel; RefineNavierSlipBoundary; ClearVelocitiesOnRestart; ReInitOnRestart; adaptiveReInit; InitSignedDistance; AdvancedDiscretizationOptions.ViscosityMode; AdvancedDiscretizationOptions.LFFA; AdvancedDiscretizationOptions.LFFB; AdvancedDiscretizationOptions.PenaltySafety; AdvancedDiscretizationOptions.SurfStressTensor; AdvancedDiscretizationOptions.STFstabilization; AdvancedDiscretizationOptions.SetSurfaceTensionMaxValue; AdvancedDiscretizationOptions.freeSurfaceFlow; AdvancedDiscretizationOptions.SST_isotropicMode; AdvancedDiscretizationOptions.CurvatureNeeded; AdvancedDiscretizationOptions.FilterConfiguration.UseWholeField; AdvancedDiscretizationOptions.FilterConfiguration.gradOpt; AdvancedDiscretizationOptions.FilterConfiguration.hessOpt; AdvancedDiscretizationOptions.FilterConfiguration.useFiltLevSetGrad; AdvancedDiscretizationOptions.FilterConfiguration.useFiltLevSetHess; AdvancedDiscretizationOptions.FilterConfiguration.FilterCurvatureCycles; AdvancedDiscretizationOptions.FilterConfiguration.LevelSetSource; AdvancedDiscretizationOptions.FilterConfiguration.PatchRecoveryDomWidth; AdvancedDiscretizationOptions.FilterConfiguration.NoOfPatchRecoverySweeps; AdvancedDiscretizationOptions.FilterConfiguration.CurvatureLimiting; AdvancedDiscretizationOptions.GNBC_Localization; AdvancedDiscretizationOptions.GNBC_SlipLength; AdvancedDiscretizationOptions.ThermalSlip_Localization; AdvancedDiscretizationOptions.IBM_BoundaryType; AdvancedDiscretizationOptions.IBM_ThermalBoundaryType; AdvancedDiscretizationOptions.ObjectiveParam; AdvancedDiscretizationOptions.alpha; AdvancedDiscretizationOptions.Penalty1[0]; AdvancedDiscretizationOptions.Penalty1[1]; AdvancedDiscretizationOptions.Penalty2; AdvancedDiscretizationOptions.PresPenalty1[0]; AdvancedDiscretizationOptions.PresPenalty1[1]; AdvancedDiscretizationOptions.PresPenalty2; AdvancedDiscretizationOptions.StressPenalty; AdvancedDiscretizationOptions.DoubleCutSpecialQuadrature; PhysicalParameters.IncludeConvection; PhysicalParameters.IncludeDiffusion; PhysicalParameters.rho_A; PhysicalParameters.rho_B; PhysicalParameters.mu_A; PhysicalParameters.mu_B; PhysicalParameters.reynolds_B; PhysicalParameters.reynolds_A; PhysicalParameters.Sigma; PhysicalParameters.pFree; PhysicalParameters.mu_I; PhysicalParameters.lambda_I; PhysicalParameters.lambdaI_tilde; PhysicalParameters.betaS_A; PhysicalParameters.betaS_B; PhysicalParameters.betaL; PhysicalParameters.slipI; PhysicalParameters.theta_e; PhysicalParameters.sliplength; PhysicalParameters.Material; PhysicalParameters.useArtificialSurfaceForce; SkipSolveAndEvaluateResidual; FailOnSolverFail; Timestepper_BDFinit; EnforceLevelSetConservation; solveKineticEnergyEquation; equalTimesteppingForKineticEnergy; kinEViscousDiscretization; kinEPressureDiscretization; withDissipativePressure; KineticEnergyeBlockPrecondMode; ComputeEnergyProperties; CheckJumpConditions; CheckInterfaceProps; RegisterUtilitiesToIOFields; InterVelocAverage; ReInitControl.ConvergenceCriterion; ReInitControl.MaxIt; ReInitControl.Potential; ReInitControl.FastMarchingPrecond; ReInitControl.underrelaxation; ReInitControl.Upwinding; ReInitControl.PenaltyMultiplierFlux; ReInitControl.PenaltyMultiplierInterface; ReInitControl.PrintIterations; EllipticExtVelAlgoControl.FluxVariant; EllipticExtVelAlgoControl.subGridRestriction; EllipticExtVelAlgoControl.PenaltyMultiplierFlux; EllipticExtVelAlgoControl.PenaltyMultiplierInterface; EllipticExtVelAlgoControl.IsotropicViscosity; fullReInit; solveCoupledHeatEquation; useSolutionParamUpdate; conductMode; ThermalParameters.IncludeConvection; ThermalParameters.rho_A; ThermalParameters.rho_B; ThermalParameters.rho_C; ThermalParameters.c_A; ThermalParameters.c_B; ThermalParameters.c_C; ThermalParameters.k_A; ThermalParameters.k_B; ThermalParameters.k_C; ThermalParameters.alpha_A; ThermalParameters.alpha_B; ThermalParameters.hVap; ThermalParameters.sliplength; ThermalParameters.T_sat; ThermalParameters.p_sat; ThermalParameters.fc; ThermalParameters.Rc; ThermalParameters.pc; NonlinearCouplingSolidFluid; LSunderrelax; Option_LevelSetEvolution; Option_LevelSetEvolution2; FastMarchingPenaltyTerms; LS_TrackerWidth; FastMarchingReInitPeriod; ReInitPeriod; LSContiProjectionMethod; LinearSolver.Name; LinearSolver.Shortname; LinearSolver.UseILU; LinearSolver.MaxSolverIterations; LinearSolver.MinSolverIterations; LinearSolver.ConvergenceCriterion; NonLinearSolver.verbose; NonLinearSolver.MaxSolverIterations; NonLinearSolver.MinSolverIterations; NonLinearSolver.ConvergenceCriterion; NonLinearSolver.UnderRelax; NonLinearSolver.SolverCode; NonLinearSolver.constantNewtonIterations; NonLinearSolver.HomotopyStepLongFail; NonLinearSolver.Globalization; AgglomerationThreshold; MultiStepInit; TimeSteppingScheme; LevelSet_ConvergenceCriterion; GridPartType; NoOfTimesteps; staticTimestep; Endtime; saveperiod; rollingSaves; dtMin; dtMax; ImmediatePlotPeriod; SuperSampling; savetodb; TracingNamespaces; MemoryInstrumentationLevel; AlternateDbPaths[0].Item1; logFileDirectory; Paramstudy_ContinueOnError; DynamicLoadBalancing_RedistributeAtStartup; DynamicLoadBalancing_Period; DynamicLoadBalancing_ImbalanceThreshold; DynamicLoadBalancing_On; AdaptiveMeshRefinement; AMR_startUpSweeps; CutCellQuadratureType; ContinueOnIoError; BurstSave; Grid:NoOfCells; Grid:SpatialDimension; Grid:hMax; Grid:hMin; Conv; NoIter; NoOfCells; DOFs; Session; RegularTerminated; MatrixAssembly; Aggregation_basis_init_time; Solver_Init_time; Solver_Run_time; Solver_InitAndRun_time; Solver_TimePerIter; NoOfCores; ComputeNodeName; DGdegree; LinearSolver.SchwarzImplementation; LinearSolver.TargetBlockSize; LinearSolver.pMaxOfCoarseSolver; LinearSolver.NoOfMultigridLevels; LinearSolver.UsepTG; LinearSolver.CoarseKickIn; LinearSolver.CoarseUsepTG; DGdegree:T; DGdegree:Tex; Bndtype:Dirichlet; Bndtype:Neumann; InitialValues_EvaluatorsVec[0].Key; InitialValues_Evaluators_TimeDep[0].Key; penalty_poisson; ExactSolution_provided; SuppressExceptionPrompt; NoOfCutCellBlocks; NoOfCutCellDiagBlocks; NNZMtx; NNZblk; MtxMB; NumberOfMatrixBlox; minSolRunT; maxSolRunT; BlockSize; maxBlkSize; minBlkSize; LinearSolver.UseDiagonalPmg; LinearSolver.UseHiOrderSmoothing; LinearSolver.FullSolveOfCutcells; LinearSolver.MaxKrylovDim; DGdegree:u; InitialValues_EvaluatorsVec[1].Key; InitialValues_EvaluatorsVec[2].Key; InitialValues_Evaluators_TimeDep[1].Key; InitialValues_Evaluators_TimeDep[2].Key; SetDefaultDiriBndCnd; ViscosityMode; MU_A; MU_B; ExcactSolSupported; PrePreCond; penalty_multiplyer; LinearSolver.TestSolution; LinearSolver.UseDoublePrecision; LinearSolver.WhichSolver
Select those columns which are of interest:
var SubTab = SessTab.ExtractColumns(
"SessionName","DGdegree", "Grid:NoOfCells", "LinearSolver.Name", "LinearSolver.Shortname", "DOFs", "MatrixAssembly",
"Grid:SpatialDimension", "NoOfCores",
"Aggregation_basis_init_time", "Solver_Init_time", "Solver_Run_time", "Solver_InitAndRun_time", "NoIter",
"Solver_TimePerIter", "ComputeNodeName", "RegularTerminated");
// Filename
var now = DateTime.Now;
string docName = wmg.CurrentProject + "_" + now.Year + "-" + now.Month + "-" + now.Day;
SubTab.SaveToFile(docName + ".json");
SubTab.ToCSVFile(docName + ".csv");
Only consider runs which have been successful:
SubTab = SubTab.ExtractRows(delegate(int iRow, IDictionary<string, object> row) {
return (bool)(row["RegularTerminated"]);
});
//SubTab = SubTab.ExtractRows(delegate(int iRow, IDictionary<string, object> row) {
// return (bool)(row["RegularTerminated"]) && ((string)row["SessionName"]).Contains("Poisson");
//});
//SubTab.Print();
The following data is available:
SubTab.GetColumnNames()
index | value |
---|---|
0 | SessionName |
1 | DGdegree |
2 | Grid:NoOfCells |
3 | LinearSolver.Name |
4 | LinearSolver.Shortname |
5 | DOFs |
6 | MatrixAssembly |
7 | Grid:SpatialDimension |
8 | NoOfCores |
9 | Aggregation_basis_init_time |
10 | Solver_Init_time |
11 | Solver_Run_time |
12 | Solver_InitAndRun_time |
13 | NoIter |
14 | Solver_TimePerIter |
15 | ComputeNodeName |
16 | RegularTerminated |
Available DG degrees:
var DGdegrees = SubTab.GetColumn<int>("DGdegree").ToSet().OrderBy(s => s).ToArray();
DGdegrees
index | value |
---|---|
0 | 2 |
1 | 3 |
2 | 5 |
All used solvers:
SubTab.GetColumn<string>("LinearSolver.Shortname").ToSet()
index | value |
---|---|
0 | Ortho w pmG |
1 | OrthoMG w Add Swz |
2 | GMRES w p2G |
3 | PARDISO |
const string Pardiso = "PARDISO";
const string OrmgSwz = "OrthoMG w Add Swz";
const string GmrsP2g = "GMRES w p2G";
const string OrmgPmg = "Ortho w pmG";
const string OrmgILU = "OrthoMG w ILU";
Cases investigated:
const string Poisson = "SIP_Poisson";
const string XPoisson = "XdgPoisson";
const string Stokes2D = "BottiPietroStokes2D";
const string Stokes3D = "BottiPietroStokes3D";
const string XStokes = "XdgStokes";
string[] AllCases = new string[] { Poisson, XPoisson, Stokes2D, Stokes3D, XStokes };
string ExtractCase(string sessionName) {
return AllCases.Single(caseName => sessionName.Contains(caseName));
}
The following routine combines the plotting code which is common for all sub-plot in this evaluation; only the y-axis needs to be specified.
PlotFormat SlvCode2Pltfmt(string solver_name, string caseName) {
var Fmt = new PlotFormat();
switch(solver_name) {
case Pardiso:
Fmt.PointType = PointTypes.Asterisk;
Fmt.DashType = DashTypes.Dotted;
break;
case GmrsP2g:
Fmt.PointType = PointTypes.OpenUpperTriangle;
break;
case OrmgSwz:
Fmt.PointType = PointTypes.Box;
break;
case OrmgILU:
Fmt.PointType = PointTypes.Diamond;
break;
case OrmgPmg:
Fmt.PointType = PointTypes.OpenLowerTriangle;
break;
default:
Console.WriteLine("unknown: " + solver_name);
break;
}
//Console.WriteLine("name is: " + solver_name);
Fmt.PointSize = 0.85;
Fmt.LineWidth = 2;
Fmt.Style = Styles.LinesPoints;
if(caseName.Contains(Poisson))
Fmt.LineColor = LineColors.Blue;
else if(caseName.Contains(XPoisson))
Fmt.LineColor = LineColors.Red;
else if(caseName.Contains(Stokes2D))
Fmt.LineColor = LineColors.Green;
else if(caseName.Contains(Stokes3D))
Fmt.LineColor = LineColors.Blue;
else if(caseName.Contains(XStokes))
Fmt.LineColor = LineColors.Red;
return Fmt;
}
The following function will later be used to check the regression solpe of runtimes (ideally, one expects linear runtime of a solver with respect to degrees-of-freedom):
void AssertSlope(Plot2Ddata plot, string caseName, string solverName, double allowedSlope, string info) {
NUnit.Framework.Assert.LessOrEqual(
plot.Regression().Single(tt => tt.Key.Contains(caseName) && tt.Key.Contains(solverName)).Value,
allowedSlope,
$"{solverName}/{info} scaling for {caseName} exceeds limit");
}
Plot2Ddata[,] PlotSolverBehave(string Yname, bool LogY, double yMin, double yMax, double LegendYpos) {
int rows = DGdegrees.Length;
int columns = 2;
string[] ignore_solvers = {};
Plot2Ddata[,] multiplots = new Plot2Ddata[rows + 1,columns];
int pDegree = 0;
for(int iRow = 0; iRow < rows; iRow++) {
for(int iCol = 0; iCol < columns; iCol++) {
//if(pDegree > rows*columns-1)
// continue;
//int tmpDG = -1;
//if(pDegree < DGdegrees.Length)
// tmpDG = DGdegrees[pDegree];
int tmpDG = DGdegrees[iRow];
//Create Graphs
multiplots[iRow,iCol] = SubTab.ToPlot("DOFs", Yname, // column for x- and y
delegate (int iTabRow,
IDictionary<string, object> Row,
out string Nmn,
out PlotFormat Fmt) {
// - - - - - - - - - - - - - - - - - - - - - - - -
// PlotRowSelector:
// selects, which table row goes to which graph,
// and the respective color
// - - - - - - - - - - - - - - - - - - - - - - - -
int k = Convert.ToInt32(Row["DGdegree"]);
if(k != tmpDG) {
// degree does not match -> not in this plot
Nmn = null;
Fmt = null;
return;
}
string solver_name = (string) (Row["LinearSolver.Shortname"]);
//ignore the solvers specified in ingore_solvers
foreach(string sc in ignore_solvers){
if(solver_name == sc){
System.Console.WriteLine("skipped");
Nmn = null;
Fmt = null;
return;
}
}
string caseName = ExtractCase( (string) Row["SessionName"]);
if(iCol == 0) {
// in Column 0, draw only Poisson
if(!caseName.Contains("Poisson")) {
Nmn = null;
Fmt = null;
return;
}
} else if(iCol == 1) {
// in Column 1, draw only Poisson
if(!caseName.Contains("Stokes")) {
Nmn = null;
Fmt = null;
return;
}
} else {
throw new NotImplementedException();
}
//process the other solvers
Fmt = SlvCode2Pltfmt(solver_name, caseName);
Nmn = solver_name + "/" + caseName;
});
// plot the linear behavior reference line
double[] dof = new[] { 1e3, 1e6 }; // x-limits of the reference-line-plot
double[] linT = dof.Select(x => x*0.001).ToArray();
var linP = new Plot2Ddata.XYvalues("linear", dof, linT);
linP.Format.FromString("- black");
ArrayTools.AddToArray(linP, ref multiplots[iRow,iCol].dataGroups);
//all about axis
string Title = string.Format("$k = {0}$", tmpDG);
multiplots[iRow,iCol].Ylabel = Title;
multiplots[iRow,iCol].LogX = true;
multiplots[iRow,iCol].LogY = LogY;
//specify range of axis
multiplots[iRow,iCol].YrangeMin = yMin;
multiplots[iRow,iCol].YrangeMax = yMax;
multiplots[iRow,iCol].XrangeMin = 1e2;
multiplots[iRow,iCol].XrangeMax = 1e7;
//multiplots[iRow,iCol].Y2rangeMin = 1e-3;
//multiplots[iRow,iCol].Y2rangeMax = 1e+4;
//multiplots[iRow,iCol].X2rangeMin = 1e2;
//multiplots[iRow,iCol].X2rangeMax = 1e7;
//spacing around plots
multiplots[iRow,iCol].ShowLegend = false;
multiplots[iRow,iCol].tmargin = 0;
multiplots[iRow,iCol].bmargin = 2;
multiplots[iRow,iCol].lmargin = 5;
multiplots[iRow,iCol].rmargin = 5;
multiplots[iRow,iCol].ShowXtics = false;
//I am legend ...
if(iRow == rows - 1) {
multiplots[iRow,iCol].ShowLegend = true;
//multiplots[iRow,iCol].LegendAlignment = new string[]{"o", "r", "t" };
multiplots[iRow,iCol].LegendFont = 12;
multiplots[iRow,iCol].Legend_maxrows = 100;
multiplots[iRow,iCol].LegendPosition = new double[] { 4e7, LegendYpos };
//multiplots[iRow,iCol].LegendSwap = true;
}
//and i am special ...
if(iRow == rows - 1)
multiplots[iRow,iCol].ShowXtics = true;
pDegree++;
}
}
//multiplots.PlotCairolatex().WriteMinimalCompileableExample("latex/solvers.tex");
//multiplots.AddDummyPlotsForLegend(3,0);
return multiplots;
}
One would expect linear scaling with grid resolution; it may scale nonlinear with DG polynomial order.
var multiplotsRtime = PlotSolverBehave("Solver_InitAndRun_time", true, 1e-2, 1e+4, 1e-5);
//multiplots.PlotCairolatex().PlotNow()
//multiplots.AddDummyPlotsForLegend(3,0);
multiplotsRtime.ToGnuplot().PlotSVG(xRes:800,yRes:1200)
Using gnuplot: C:\Program Files (x86)\FDY\BoSSS\bin\native\win\gnuplot-gp510-20160418-win32-mingw\gnuplot\bin\gnuplot.exe Note: In a Jupyter Worksheet, you must NOT have a trailing semicolon in order to see the plot on screen; otherwise, the output migth be surpressed.!
warning CS1701: Assuming assembly reference 'Microsoft.AspNetCore.Html.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'BoSSSpad' matches identity 'Microsoft.AspNetCore.Html.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Html.Abstractions', you may need to supply runtime policy
//var multiplots = PlotSolverBehave("Solver_InitAndRun_time", true, 1e-2, 1e+4, 1e-5);
//multiplots.PlotCairolatex().SaveTo("Runtime.tex");
/*var legend = new Plot2Ddata();
legend.AddDataGroup("Pardiso",new double[] {1,2},new double[] {1,2}, "-og");
legend.ShowXtics = false;
legend.ShowXtics = false;
//legend.XrangeMin = 3;
//legend.XrangeMax = 3.1;
//legend.AddGnuplotCommand("set border 0");
//legend.AddGnuplotCommand("set style line 101 lc rgb '#808080' lt 1 lw 1");
legend.AddGnuplotCommand("unset xlabel");
legend.AddGnuplotCommand("unset ylabel");
legend.AddGnuplotCommand("set format x ''");
legend.AddGnuplotCommand("set format y ''");
legend.AddGnuplotCommand("set tics scale 0");
legend.PlotNow()*/
For polynomial degree 2:
multiplotsRtime[0,0].Regression()
index | Key | Value |
---|---|---|
0 | Ortho w pmG/XdgPoisson | 0.9765260842907412 |
1 | OrthoMG w Add Swz/XdgPoisson | 0.7969521106665026 |
2 | PARDISO/XdgPoisson | 0.9297919451820407 |
3 | OrthoMG w Add Swz/SIP_Poisson | 1.0334258433143189 |
4 | PARDISO/SIP_Poisson | 1.2552175354326283 |
5 | GMRES w p2G/XdgPoisson | 0.8551010509137044 |
6 | Ortho w pmG/SIP_Poisson | 0.9642612976765194 |
7 | GMRES w p2G/SIP_Poisson | 0.8950777113148289 |
8 | linear | 1 |
multiplotsRtime[0,1].Regression()
index | Key | Value |
---|---|---|
0 | OrthoMG w Add Swz/BottiPietroStokes2D | 0.9897468100252329 |
1 | GMRES w p2G/XdgStokes | 1.3333509733369315 |
2 | PARDISO/BottiPietroStokes2D | 0.841126571185951 |
3 | GMRES w p2G/BottiPietroStokes2D | 0.7939010937841153 |
4 | GMRES w p2G/BottiPietroStokes3D | 1.3305412138024018 |
5 | OrthoMG w Add Swz/BottiPietroStokes3D | 1.255353589849064 |
6 | PARDISO/BottiPietroStokes3D | 2.0504272632757097 |
7 | OrthoMG w Add Swz/XdgStokes | 1.4503872571002379 |
8 | PARDISO/XdgStokes | 1.9698466813632565 |
9 | linear | 1 |
For polynomial degree 3:
multiplotsRtime[1,0].Regression()
index | Key | Value |
---|---|---|
0 | PARDISO/XdgPoisson | 1.1440622181908786 |
1 | OrthoMG w Add Swz/XdgPoisson | 0.8205712989289173 |
2 | OrthoMG w Add Swz/SIP_Poisson | 1.0954327136067674 |
3 | Ortho w pmG/XdgPoisson | 0.9095813594462898 |
4 | GMRES w p2G/XdgPoisson | 0.7832150160711127 |
5 | GMRES w p2G/SIP_Poisson | 0.9049260850014619 |
6 | Ortho w pmG/SIP_Poisson | 0.8648113847911276 |
7 | PARDISO/SIP_Poisson | 1.457365303178135 |
8 | linear | 1 |
multiplotsRtime[1,1].Regression()
index | Key | Value |
---|---|---|
0 | Ortho w pmG/BottiPietroStokes2D | 0.9975620180425924 |
1 | GMRES w p2G/BottiPietroStokes2D | 0.8678749598618125 |
2 | OrthoMG w Add Swz/BottiPietroStokes2D | 1.0234217941317927 |
3 | PARDISO/BottiPietroStokes2D | 0.965988716993388 |
4 | GMRES w p2G/XdgStokes | 1.0703578928161175 |
5 | Ortho w pmG/XdgStokes | 1.554478734362199 |
6 | OrthoMG w Add Swz/XdgStokes | 1.685061099883128 |
7 | GMRES w p2G/BottiPietroStokes3D | 1.0707844928420058 |
8 | OrthoMG w Add Swz/BottiPietroStokes3D | 1.0895461189561515 |
9 | PARDISO/BottiPietroStokes3D | 2.1088785325404156 |
10 | PARDISO/XdgStokes | 2.105400962789117 |
11 | Ortho w pmG/BottiPietroStokes3D | 1.4848552011919887 |
12 | linear | 1 |
For polynomial degree 5:
multiplotsRtime[2,0].Regression()
index | Key | Value |
---|---|---|
0 | Ortho w pmG/SIP_Poisson | 1.039415844868636 |
1 | PARDISO/XdgPoisson | 1.2940729524694723 |
2 | Ortho w pmG/XdgPoisson | 1.1332799803602815 |
3 | GMRES w p2G/XdgPoisson | 0.89017044045502 |
4 | OrthoMG w Add Swz/XdgPoisson | 1.0445892600724052 |
5 | OrthoMG w Add Swz/SIP_Poisson | 1.0562519331489901 |
6 | PARDISO/SIP_Poisson | 1.650741776341093 |
7 | GMRES w p2G/SIP_Poisson | 0.9780889157459343 |
8 | linear | 1 |
multiplotsRtime[2,1].Regression()
index | Key | Value |
---|---|---|
0 | OrthoMG w Add Swz/BottiPietroStokes2D | 1.0889719229401222 |
1 | Ortho w pmG/BottiPietroStokes2D | 0.9322993887367246 |
2 | PARDISO/BottiPietroStokes2D | 1.0720428804348916 |
3 | Ortho w pmG/BottiPietroStokes3D | NaN |
4 | OrthoMG w Add Swz/XdgStokes | 1.4844483391745378 |
5 | OrthoMG w Add Swz/BottiPietroStokes3D | 1.0979804393859416 |
6 | PARDISO/XdgStokes | NaN |
7 | PARDISO/BottiPietroStokes3D | NaN |
8 | Ortho w pmG/XdgStokes | NaN |
9 | linear | 1 |
AssertSlope(multiplotsRtime[0,0], Poisson, GmrsP2g, 1.14, "k=2");
AssertSlope(multiplotsRtime[0,0], XPoisson, GmrsP2g, 1.0, "k=2");
AssertSlope(multiplotsRtime[0,1], Stokes2D, GmrsP2g, 1.0, "k=2");
AssertSlope(multiplotsRtime[0,1], XStokes, GmrsP2g, 1.5, "k=2");
AssertSlope(multiplotsRtime[0,0], Poisson, OrmgSwz, 1.2, "k=2");
AssertSlope(multiplotsRtime[0,0], XPoisson, OrmgSwz, 1.0, "k=2");
AssertSlope(multiplotsRtime[0,1], Stokes2D, OrmgSwz, 1.2, "k=2");
AssertSlope(multiplotsRtime[0,1], XStokes, OrmgSwz, 1.7, "k=2"); // really bad!
//AssertSlope(multiplotsRtime[0,0], Poisson, OrmgPmg, 1.1, "k=2");
//AssertSlope(multiplotsRtime[0,0], XPoisson, OrmgPmg, 1.1, "k=2");
////AssertSlope(multiplotsRtime[0,1], Stokes2D, OrmgPmg, 1.4, "k=2");
////AssertSlope(multiplotsRtime[0,1], XStokes, OrmgPmg, 1.0, "k=2"); // currently NAN
AssertSlope(multiplotsRtime[1,0], Poisson, GmrsP2g, 1.11, "k=3");
AssertSlope(multiplotsRtime[0,0], XPoisson, GmrsP2g, 1.0, "k=3");
AssertSlope(multiplotsRtime[0,1], Stokes2D, GmrsP2g, 1.0, "k=3");
AssertSlope(multiplotsRtime[0,1], XStokes, GmrsP2g, 1.5, "k=3");
AssertSlope(multiplotsRtime[0,0], Poisson, OrmgSwz, 1.2, "k=3");
AssertSlope(multiplotsRtime[0,0], XPoisson, OrmgSwz, 1.0, "k=3");
AssertSlope(multiplotsRtime[0,1], Stokes2D, OrmgSwz, 1.2, "k=3");
AssertSlope(multiplotsRtime[0,1], XStokes, OrmgSwz, 1.7, "k=3"); // really bad!
//AssertSlope(multiplotsRtime[0,0], Poisson, OrmgPmg, 1.1, "k=3");
//AssertSlope(multiplotsRtime[0,0], XPoisson, OrmgPmg, 1.1, "k=3");
////AssertSlope(multiplotsRtime[0,1], Stokes2D, OrmgPmg, 1.4, "k=3"); // not really good
////AssertSlope(multiplotsRtime[0,1], XStokes, OrmgPmg, 1.0, "k=3"); // currently NAN
AssertSlope(multiplotsRtime[2,0], Poisson, GmrsP2g, 1.1, "k=5");
AssertSlope(multiplotsRtime[0,0], XPoisson, GmrsP2g, 1.0, "k=5");
AssertSlope(multiplotsRtime[0,1], Stokes2D, GmrsP2g, 1.0, "k=5");
//AssertSlope(multiplotsRtime[0,1], XStokes, GmrsP2g, 1.4, "k=5");
AssertSlope(multiplotsRtime[0,0], Poisson, OrmgSwz, 1.1, "k=5");
AssertSlope(multiplotsRtime[0,0], XPoisson, OrmgSwz, 1.0, "k=5");
AssertSlope(multiplotsRtime[0,1], Stokes2D, OrmgSwz, 1.2, "k=5");
//AssertSlope(multiplotsRtime[0,1], XStokes, OrmgSwz, 1.7, "k=5"); // currently NAN
//AssertSlope(multiplotsRtime[0,0], Poisson, OrmgPmg, 1.1, "k=5");
//AssertSlope(multiplotsRtime[0,0], XPoisson, OrmgPmg, 1.1, "k=5");
////AssertSlope(multiplotsRtime[0,1], Stokes2D, OrmgPmg, 1.4, "k=5"); // not really good
////AssertSlope(multiplotsRtime[0,1], XStokes, OrmgPmg, 1.0, "k=5"); // currently NAN
For the iterative solvers, obe would expect almost constant number of solver iterations, independent of grid resolution. It may, however depend in nonlinar fashion on the DG polynomial order.
var multiplotsIter = PlotSolverBehave("NoIter", false, 0, 155, -50);
//multiplots.PlotCairolatex().WriteMinimalCompileableExample("latex/solvers.tex");
//multiplots.AddDummyPlotsForLegend(3,0);
multiplotsIter.ToGnuplot().PlotSVG(xRes:800,yRes:1200)
Using gnuplot: C:\Program Files (x86)\FDY\BoSSS\bin\native\win\gnuplot-gp510-20160418-win32-mingw\gnuplot\bin\gnuplot.exe Note: In a Jupyter Worksheet, you must NOT have a trailing semicolon in order to see the plot on screen; otherwise, the output migth be surpressed.!
warning CS1701: Assuming assembly reference 'Microsoft.AspNetCore.Html.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'BoSSSpad' matches identity 'Microsoft.AspNetCore.Html.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Html.Abstractions', you may need to supply runtime policy
The following function will later be used to check the regression solpe of runtimes (ideally, one expects constant number of iterations of a multigrid-solver with respect to degrees-of-freedom):
void AssertLimit(Plot2Ddata plot, string caseName, string solverName, double allowedLimit, string info) {
var max = plot.dataGroups.Single(tt => tt.Name.Contains(caseName) && tt.Name.Contains(solverName)).Values.Max();
Console.WriteLine($"Maximum {solverName}/{info} for {caseName} is " + max);
NUnit.Framework.Assert.LessOrEqual(
max,
allowedLimit,
$"{solverName}/{info} maximum for {caseName} exceeds limit");
}
multiplotsIter[0,0].dataGroups
index | Format | Name | UseX2 | UseY2 | Abscissas | Values |
---|---|---|---|---|---|---|
0 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/XdgPoisson | False | False | [ 160, 880, 5920, 43840, 339040, 2671600 ] | [ 1, 2, 5, 10, 28, 51 ] |
1 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/XdgPoisson | False | False | [ 160, 880, 5920, 43840, 339040, 2671600 ] | [ 1, 1, 1, 1, 1, 1 ] |
2 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/XdgPoisson | False | False | [ 160, 880, 5920, 43840, 339040 ] | [ 1, 1, 1, 1, 1 ] |
3 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/SIP_Poisson | False | False | [ 3200, 25600, 204800, 691200, 1638400 ] | [ 1, 1, 2, 2, 2 ] |
4 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/SIP_Poisson | False | False | [ 3200, 25600, 204800, 691200 ] | [ 1, 1, 1, 1 ] |
5 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/XdgPoisson | False | False | [ 160, 880, 5920, 43840, 339040, 2671600 ] | [ 3, 29, 42, 62, 62, 55 ] |
6 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/SIP_Poisson | False | False | [ 3200, 25600, 204800, 691200, 1638400 ] | [ 4, 7, 9, 9, 11 ] |
7 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/SIP_Poisson | False | False | [ 3200, 25600, 204800, 691200, 1638400 ] | [ 51, 50, 118, 121, 123 ] |
8 | BoSSS.Solution.Gnuplot.PlotFormat | linear | False | False | [ 1000, 1000000 ] | [ 1, 1000 ] |
multiplotsIter[0,1].dataGroups
index | Format | Name | UseX2 | UseY2 | Abscissas | Values |
---|---|---|---|---|---|---|
0 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/BottiPietroStokes2D | False | False | [ 960, 3840, 8640, 15360, 34560, 61440, 245760, 552960, 983040, 2211840 ] | [ 1, 1, 1, 1, 1, 1, 4, 5, 5, 6 ] |
1 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/XdgStokes | False | False | [ 18224, 142528, 478992, 1128800 ] | [ 60, 101, 117, 136 ] |
2 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/BottiPietroStokes2D | False | False | [ 960, 3840, 8640, 15360, 34560, 61440, 245760, 552960, 983040 ] | [ 1, 1, 1, 1, 1, 1, 1, 1, 1 ] |
3 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/BottiPietroStokes2D | False | False | [ 960, 3840, 8640, 15360, 34560, 61440, 245760, 552960, 983040, 2211840 ] | [ 45, 51, 50, 49, 47, 45, 40, 37, 35, 33 ] |
4 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/BottiPietroStokes3D | False | False | [ 17408, 139264, 470016, 1114112, 3760128 ] | [ 113, 125, 128, 130, 135 ] |
5 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/BottiPietroStokes3D | False | False | [ 17408, 139264, 470016, 1114112, 3760128 ] | [ 1, 6, 7, 8, 10 ] |
6 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/BottiPietroStokes3D | False | False | [ 17408, 139264, 470016 ] | [ 1, 1, 1 ] |
7 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/XdgStokes | False | False | [ 18224, 142528, 478992 ] | [ 1, 8, 12 ] |
8 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/XdgStokes | False | False | [ 18224, 142528, 478992 ] | [ 1, 1, 1 ] |
9 | BoSSS.Solution.Gnuplot.PlotFormat | linear | False | False | [ 1000, 1000000 ] | [ 1, 1000 ] |
AssertLimit(multiplotsIter[0,0], Poisson, GmrsP2g, 130, "k=2");
AssertLimit(multiplotsIter[0,0], XPoisson, GmrsP2g, 70, "k=2");
AssertLimit(multiplotsIter[0,1], Stokes2D, GmrsP2g, 80, "k=2");
AssertLimit(multiplotsIter[0,0], Poisson, OrmgSwz, 10, "k=2");
AssertLimit(multiplotsIter[0,0], XPoisson, OrmgSwz, 10, "k=2");
AssertLimit(multiplotsIter[0,1], Stokes2D, OrmgSwz, 25, "k=2"); // not working yet
AssertLimit(multiplotsIter[0,1], XStokes, OrmgSwz, 70, "k=2"); // not working yet
//AssertLimit(multiplotsIter[0,0], Poisson, OrmgPmg, 35, "k=2");
//AssertLimit(multiplotsIter[0,0], XPoisson, OrmgPmg, 60, "k=2"); // not really ideal
//AssertLimit(multiplotsIter[0,1], Stokes2D, OrmgPmg, 80, "k=2"); // not working yet
//AssertLimit(multiplotsIter[0,1], XStokes, OrmgPmg, 130, "k=2"); // not working yet
AssertLimit(multiplotsIter[0,0], Poisson, Pardiso, 1, "k=2");
AssertLimit(multiplotsIter[0,0], XPoisson, Pardiso, 1, "k=2");
AssertLimit(multiplotsIter[0,1], Stokes2D, Pardiso, 1, "k=2");
AssertLimit(multiplotsIter[0,1], XStokes, Pardiso, 1, "k=2");
Maximum GMRES w p2G/k=2 for SIP_Poisson is 123 Maximum GMRES w p2G/k=2 for XdgPoisson is 62 Maximum GMRES w p2G/k=2 for BottiPietroStokes2D is 51 Maximum OrthoMG w Add Swz/k=2 for SIP_Poisson is 2 Maximum OrthoMG w Add Swz/k=2 for XdgPoisson is 1 Maximum OrthoMG w Add Swz/k=2 for BottiPietroStokes2D is 6 Maximum OrthoMG w Add Swz/k=2 for XdgStokes is 12 Maximum PARDISO/k=2 for SIP_Poisson is 1 Maximum PARDISO/k=2 for XdgPoisson is 1 Maximum PARDISO/k=2 for BottiPietroStokes2D is 1 Maximum PARDISO/k=2 for XdgStokes is 1
multiplotsIter[1,0].dataGroups
index | Format | Name | UseX2 | UseY2 | Abscissas | Values |
---|---|---|---|---|---|---|
0 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/XdgPoisson | False | False | [ 320, 1760, 11840, 87680, 678080 ] | [ 1, 1, 1, 1, 1 ] |
1 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/XdgPoisson | False | False | [ 320, 1760, 11840, 87680, 678080 ] | [ 1, 1, 1, 1, 1 ] |
2 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/SIP_Poisson | False | False | [ 6400, 51200, 409600, 1382400 ] | [ 1, 1, 2, 2 ] |
3 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/XdgPoisson | False | False | [ 320, 1760, 11840, 87680, 678080 ] | [ 2, 3, 6, 9, 13 ] |
4 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/XdgPoisson | False | False | [ 320, 1760, 11840, 87680, 678080 ] | [ 3, 97, 104, 111, 119 ] |
5 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/SIP_Poisson | False | False | [ 6400, 51200, 409600, 1382400 ] | [ 72, 71, 141, 145 ] |
6 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/SIP_Poisson | False | False | [ 6400, 51200, 409600, 1382400 ] | [ 4, 4, 5, 5 ] |
7 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/SIP_Poisson | False | False | [ 6400, 51200, 409600 ] | [ 1, 1, 1 ] |
8 | BoSSS.Solution.Gnuplot.PlotFormat | linear | False | False | [ 1000, 1000000 ] | [ 1, 1000 ] |
multiplotsIter[1,1].dataGroups
index | Format | Name | UseX2 | UseY2 | Abscissas | Values |
---|---|---|---|---|---|---|
0 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/BottiPietroStokes2D | False | False | [ 1664, 6656, 14976, 26624, 59904, 106496, 425984, 958464 ] | [ 4, 4, 4, 4, 5, 5, 6, 5 ] |
1 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/BottiPietroStokes2D | False | False | [ 1664, 6656, 14976, 26624, 59904, 106496, 425984, 958464, 1703936 ] | [ 116, 128, 137, 144, 149, 154, 163, 164, 167 ] |
2 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/BottiPietroStokes2D | False | False | [ 1664, 6656, 14976, 26624, 59904, 106496, 425984, 958464, 1703936 ] | [ 1, 1, 1, 1, 1, 2, 3, 5, 5 ] |
3 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/BottiPietroStokes2D | False | False | [ 1664, 6656, 14976, 26624, 59904, 106496, 425984, 958464 ] | [ 1, 1, 1, 1, 1, 1, 1, 1 ] |
4 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/XdgStokes | False | False | [ 37520, 293440, 986160 ] | [ 201, 223, 232 ] |
5 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/XdgStokes | False | False | [ 37520, 293440 ] | [ 15, 28 ] |
6 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/XdgStokes | False | False | [ 37520, 293440, 986160 ] | [ 1, 13, 7 ] |
7 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/BottiPietroStokes3D | False | False | [ 35840, 286720, 967680, 2293760 ] | [ 215, 206, 194, 197 ] |
8 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/BottiPietroStokes3D | False | False | [ 35840, 286720, 967680, 2293760 ] | [ 1, 5, 6, 7 ] |
9 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/BottiPietroStokes3D | False | False | [ 35840, 286720 ] | [ 1, 1 ] |
10 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/XdgStokes | False | False | [ 37520, 293440 ] | [ 1, 1 ] |
11 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/BottiPietroStokes3D | False | False | [ 35840, 286720 ] | [ 13, 17 ] |
12 | BoSSS.Solution.Gnuplot.PlotFormat | linear | False | False | [ 1000, 1000000 ] | [ 1, 1000 ] |
AssertLimit(multiplotsIter[1,0], Poisson, GmrsP2g, 150, "k=3"); // not really ideal
AssertLimit(multiplotsIter[1,0], XPoisson, GmrsP2g, 120, "k=3");
AssertLimit(multiplotsIter[1,1], Stokes2D, GmrsP2g, 230, "k=3"); // not really ideal
AssertLimit(multiplotsIter[1,0], Poisson, OrmgSwz, 15, "k=3");
AssertLimit(multiplotsIter[1,0], XPoisson, OrmgSwz, 15, "k=3");
AssertLimit(multiplotsIter[1,1], Stokes2D, OrmgSwz, 15, "k=3"); // not working yet
AssertLimit(multiplotsIter[1,1], XStokes, OrmgSwz, 70, "k=3"); // slightly improved
//AssertLimit(multiplotsIter[1,0], Poisson, OrmgPmg, 10, "k=3");
//AssertLimit(multiplotsIter[1,0], XPoisson, OrmgPmg, 20, "k=3");
//AssertLimit(multiplotsIter[1,1], Stokes2D, OrmgPmg, 25, "k=3");
////AssertLimit(multiplotsIter[1,1], XStokes, OrmgPmg, 1, "k=3"); // not working
AssertLimit(multiplotsIter[1,0], Poisson, Pardiso, 1, "k=3");
AssertLimit(multiplotsIter[1,0], XPoisson, Pardiso, 1, "k=3");
AssertLimit(multiplotsIter[1,1], Stokes2D, Pardiso, 1, "k=3");
AssertLimit(multiplotsIter[1,1], XStokes, Pardiso, 1, "k=3");
Maximum GMRES w p2G/k=3 for SIP_Poisson is 145 Maximum GMRES w p2G/k=3 for XdgPoisson is 119 Maximum GMRES w p2G/k=3 for BottiPietroStokes2D is 167 Maximum OrthoMG w Add Swz/k=3 for SIP_Poisson is 2 Maximum OrthoMG w Add Swz/k=3 for XdgPoisson is 1 Maximum OrthoMG w Add Swz/k=3 for BottiPietroStokes2D is 5 Maximum OrthoMG w Add Swz/k=3 for XdgStokes is 13 Maximum PARDISO/k=3 for SIP_Poisson is 1 Maximum PARDISO/k=3 for XdgPoisson is 1 Maximum PARDISO/k=3 for BottiPietroStokes2D is 1 Maximum PARDISO/k=3 for XdgStokes is 1
multiplotsIter[2,0].dataGroups
index | Format | Name | UseX2 | UseY2 | Abscissas | Values |
---|---|---|---|---|---|---|
0 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/SIP_Poisson | False | False | [ 17920, 143360, 1146880 ] | [ 2, 3, 3 ] |
1 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/XdgPoisson | False | False | [ 896, 4928, 33152, 245504 ] | [ 1, 1, 1, 1 ] |
2 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/XdgPoisson | False | False | [ 896, 4928, 33152, 245504, 1898624 ] | [ 2, 4, 6, 19, 46 ] |
3 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/XdgPoisson | False | False | [ 896, 4928, 33152, 245504, 1898624 ] | [ 3, 163, 145, 159, 157 ] |
4 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/XdgPoisson | False | False | [ 896, 4928, 33152, 245504, 1898624 ] | [ 1, 1, 1, 1, 1 ] |
5 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/SIP_Poisson | False | False | [ 17920, 143360, 1146880 ] | [ 1, 2, 2 ] |
6 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/SIP_Poisson | False | False | [ 17920, 143360 ] | [ 1, 1 ] |
7 | BoSSS.Solution.Gnuplot.PlotFormat | GMRES w p2G/SIP_Poisson | False | False | [ 17920, 143360, 1146880 ] | [ 154, 171, 182 ] |
8 | BoSSS.Solution.Gnuplot.PlotFormat | linear | False | False | [ 1000, 1000000 ] | [ 1, 1000 ] |
multiplotsIter[2,1].dataGroups
index | Format | Name | UseX2 | UseY2 | Abscissas | Values |
---|---|---|---|---|---|---|
0 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/BottiPietroStokes2D | False | False | [ 3648, 14592, 32832, 58368, 131328, 233472, 933888, 2101248 ] | [ 1, 1, 1, 1, 3, 3, 5, 8 ] |
1 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/BottiPietroStokes2D | False | False | [ 3648, 14592, 32832, 58368, 131328, 233472, 933888 ] | [ 2, 2, 3, 3, 3, 4, 4 ] |
2 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/BottiPietroStokes2D | False | False | [ 3648, 14592, 32832, 58368, 131328, 233472, 933888 ] | [ 1, 1, 1, 1, 1, 1, 1 ] |
3 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/BottiPietroStokes3D | False | False | [ 103936 ] | [ 5 ] |
4 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/XdgStokes | False | False | [ 108808, 850976 ] | [ 4, 6 ] |
5 | BoSSS.Solution.Gnuplot.PlotFormat | OrthoMG w Add Swz/BottiPietroStokes3D | False | False | [ 103936, 831488 ] | [ 4, 6 ] |
6 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/XdgStokes | False | False | [ 108808 ] | [ 1 ] |
7 | BoSSS.Solution.Gnuplot.PlotFormat | PARDISO/BottiPietroStokes3D | False | False | [ 103936 ] | [ 1 ] |
8 | BoSSS.Solution.Gnuplot.PlotFormat | Ortho w pmG/XdgStokes | False | False | [ 108808 ] | [ 16 ] |
9 | BoSSS.Solution.Gnuplot.PlotFormat | linear | False | False | [ 1000, 1000000 ] | [ 1, 1000 ] |
AssertLimit(multiplotsIter[2,0], Poisson, GmrsP2g, 200, "k=5");
AssertLimit(multiplotsIter[2,0], XPoisson, GmrsP2g, 200, "k=5");
//AssertLimit(multiplotsIter[2,1], Stokes2D, GmrsP2g, 230, "k=5"); // not working yet
AssertLimit(multiplotsIter[2,0], Poisson, OrmgSwz, 8, "k=5");
AssertLimit(multiplotsIter[2,0], XPoisson, OrmgSwz, 8, "k=5");
AssertLimit(multiplotsIter[2,1], Stokes2D, OrmgSwz, 15, "k=5");
AssertLimit(multiplotsIter[2,1], XStokes, OrmgSwz, 20, "k=5"); // not working yet
//AssertLimit(multiplotsIter[2,0], Poisson, OrmgPmg, 10, "k=5");
//AssertLimit(multiplotsIter[2,0], XPoisson, OrmgPmg, 49, "k=5");
//AssertLimit(multiplotsIter[2,1], Stokes2D, OrmgPmg, 20, "k=5");
////AssertLimit(multiplotsIter[2,1], XStokes, OrmgPmg, 1, "k=5"); // not working
AssertLimit(multiplotsIter[2,0], Poisson, Pardiso, 1, "k=5");
AssertLimit(multiplotsIter[2,0], XPoisson, Pardiso, 1, "k=5");
AssertLimit(multiplotsIter[2,1], Stokes2D, Pardiso, 1, "k=5");
//AssertLimit(multiplotsIter[2,1], XStokes, Pardiso, 1, "k=5");
Maximum GMRES w p2G/k=5 for SIP_Poisson is 182 Maximum GMRES w p2G/k=5 for XdgPoisson is 163 Maximum OrthoMG w Add Swz/k=5 for SIP_Poisson is 2 Maximum OrthoMG w Add Swz/k=5 for XdgPoisson is 1 Maximum OrthoMG w Add Swz/k=5 for BottiPietroStokes2D is 8 Maximum OrthoMG w Add Swz/k=5 for XdgStokes is 6 Maximum PARDISO/k=5 for SIP_Poisson is 1 Maximum PARDISO/k=5 for XdgPoisson is 1 Maximum PARDISO/k=5 for BottiPietroStokes2D is 1
One would expect linear scaling with grid resolution; it may scale nonlinear with DG polynomial order.
var multiplotsTimePerIter = PlotSolverBehave("Solver_TimePerIter", true, 1e-2, 1e+6, 1e-3);
//multiplots.PlotCairolatex().WriteMinimalCompileableExample("latex/solvers.tex");
//multiplots.AddDummyPlotsForLegend(3,0);
multiplotsTimePerIter.ToGnuplot().PlotSVG(xRes:800,yRes:1200)
Using gnuplot: C:\Program Files (x86)\FDY\BoSSS\bin\native\win\gnuplot-gp510-20160418-win32-mingw\gnuplot\bin\gnuplot.exe Note: In a Jupyter Worksheet, you must NOT have a trailing semicolon in order to see the plot on screen; otherwise, the output migth be surpressed.!
warning CS1701: Assuming assembly reference 'Microsoft.AspNetCore.Html.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'BoSSSpad' matches identity 'Microsoft.AspNetCore.Html.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Html.Abstractions', you may need to supply runtime policy