<< IHX.m

Difficulty[m_,cols_List] := N[m! / (Times @@ (cols!)) / Length[cols]]
Difficulty[beta[m_,cols_List]] := Difficulty[m,cols]

dont={
  beta[10, {8}], beta[11, {10}], beta[12, {10}], beta[13, {12}],
  beta[10, {9}], beta[12, {11}], beta[14, {13}], beta[16, {15}],
  beta[18, {17}], beta[20, {19}], beta[19, {16, 1, 1, 1, 1}]
}

Clear[DimB]
<< Dims.m
DimB[___]:=TooHard
do=Join @@ Table[Print[m];DimBTable[m],{m,8,8}]
Print["Found ",Length[do]," relevant partitions."]
do=List @@ First /@ Select[do,!FreeQ[#,TooHard]&]
do=Complement[do,dont]
do=Last /@ Sort[{Difficulty @@ #,#}& /@ do]
do=Take[do,Min[200,Length[do]]]

(* Get["!zcat BBasis/*"] *)

file=OpenWrite["do"]

Do[
  WriteString[file,ToString[StringForm[
    "math -run '\
      <<~/init.m;\
      <<IHX.m;\
      Print[\"DimB[`1`, `2`] = \",IHX\`DimB[`1`,`2`]];\
      Print[\"MemoryUsed[`1`, `2`] = \",MaxMemoryUsed[]];\
      Exit[]'\n\n",
    First[do[[i]]],Last[do[[i]]]
  ]]],
  {i,Length[do]}
]

Close[file]
