Newish to Mathematica here. I'm running some code to compute regions of the parameter space where the covariance between innovations is positive or negative. On my Windows PC, it's been running for over a day but hasn't used that much RAM. When submitting to a SLURM cluster, I get an OOM error even when utilizing 96GB of RAM.
Given the complexity of my problem, is this expected behavior, or is it a coding error/bad memory management? Are there any best practices for simplifying the computational complexity of such a problem?
The line below, which causes the overhead begins with exp1 = ...
.
$Assumptions = ((ρ ∈ PostiveReals) && (ρ < 1));
AppendTo[$Assumptions, β ∈ Reals];
AppendTo[$Assumptions, α ∈ Reals];
AppendTo[$Assumptions, ϕ ∈ PositiveReals ];
AppendTo[$Assumptions, δ ∈ Reals ];
AppendTo[$Assumptions, (Subscript[μ, g] ∈ PostiveReals) && (Subscript[μ, g] < 1)];
AppendTo[$Assumptions, (Subscript[μ, π] ∈ PostiveReals) && (Subscript[μ, π] < 1)];
AppendTo[$Assumptions, Subscript[σ, g] ∈ PositiveReals];
AppendTo[$Assumptions, Subscript[σ, π] ∈ PositiveReals];
AppendTo[$Assumptions, Subscript[σ, r] ∈ PositiveReals];
AppendTo[$Assumptions, Subscript[μ, g] ∈ Reals];
AppendTo[$Assumptions, Subscript[μ, π] ∈ Reals];
AppendTo[$Assumptions, β > -1 / (ϕ*(1 - ρ))]
B0 = {{1, 0, ϕ}, {-δ, 1, 0}, {-(1 - ρ)* β, 0, 1}};
B01Inv = FullSimplify[Inverse[B0]];
Γ = {{Subscript[σ, g], 0, 0}, {0, Subscript[σ, π], 0}, {0, 0, Subscript[σ, r]}};
B1 = {{Subscript[μ, g], ϕ, 0}, {0, Subscript[μ, π], 0}, {0, (1 - ρ) α, 0}};
Bm1 = {{1 - Subscript[μ, g], 0, 0}, {0, 1 - Subscript[μ, π], 0}, {0, 0, ρ}};
Σ1 = FullSimplify[Inverse[B0] . Γ];
Ω1 = FullSimplify[Σ1 . Transpose[Σ1]];
F1= FullSimplify[B01Inv . Bm1];
A1 = FullSimplify[B01Inv . B1];
C1 = FullSimplify[{{1,0,0},{0,1,0},{0,0,1}}- A1 . F1];
Σ2 = FullSimplify[Inverse[C1] . Σ1];
Ω2 = FullSimplify[Σ2 . Transpose[Σ2]];
Print["Starting Computation 1: ", DateString[]]
exp1 = FullSimplify@Reduce[Ω2[[1,2]] > 0] // FullForm
Export["computation_12.m", {exp1}];
Print["Starting Computation 2: ", DateString[]]
exp2 = FullSimplify@Reduce[Ω2[[1,3]] > 0] // FullForm
Export["computation_13.m", {exp2}];
Print["Starting Computation 3: ", DateString[]];
exp3 = FullSimplify@Reduce[Ω2[[2,3]] > 0] // FullForm
Export["computation_23.m", {exp3}];
Print["All Computations Finished at: ", DateString[]]
Export["all_computations.m", {exp1,exp2,exp3}];
Quit[];
FullSimplify
do nothing .LeafCount[\[CapitalOmega]2[[1,2]]]
produces13518
, soReduce[\[CapitalOmega]2[[1, 2]]>0]
is too difficult for MMA. $\endgroup$Reduce[Subscript[\[Mu], g]^2 < 1, Reals]
produces-1 < Subscript[\[Mu], g] < 1
. $\endgroup$Subscript
variables. See eg 1004, 869, 373, and many others. $\endgroup$Subscript
makes troubles in the case under consideration? In other case your words are off-topic. $\endgroup$