I'm working with a huge amount of data, so I'm avoiding using AppendTo. I used to use the Reap and Sow command, in parallel, as follows:
SetSharedFunction[ParallelSow];
ParallelSow[expr_] := Sow[expr]
list = Reap[ParallelDo[psa= Eigenvalues[Adj$A, -1];
psaData = {N[Abs@psa, Prec][[1]]};
ParallelSow[psaData], {s, lists}]][[2,1]]
Everything worked fine until I updated Mathematica to version 14.0.0. Now, all my attempts give me
{Null, {}}
If, however, I use just Do and Sow (or ParallelSow as defined above), the code works fine!
What changed? Can anyone help me regain the old functionality?
SetSharedFunction. It simply doesn't work now. ) Have you reported this to WRI? – xzczd Mar 25 '24 at 07:33Soweven works though parallel functions. I don't think it's documented anywhere that it should work? As a workaround, you can always use anAssociationtoAppendTo. It's much faster than appending to a list. – Sjoerd Smit Mar 25 '24 at 10:13SetSharedFunction. See also https://mathematica.stackexchange.com/q/313/1871 – xzczd Mar 25 '24 at 11:21Thanks, @Sjoerd Smit, I'll try to use
– Pedro Croti Mar 26 '24 at 11:06Association.