Tag Info

New answers tagged

1

After a few days of searching I finally found a solution. The problem is that Workbench in debug mode changes the options of InstallJava on parallel kernels. So the solution is just to use on the parallel kernels the command line used on the main kernel by InstallJava, like below. Needs["JLink`"] commandLine=InstallJava[]//First LaunchKernels[1] ...


0

Here's a simple approach: ParallelTable[With[{g = grab[i]}, If[FreeQ[g, $Failed], g, Nothing]], {i, 2000000, 3000000}] Note: Nothing requires version 10.2


0

How about results=Cases[ ParallelTable[If[!FailedQ[g = grab[i]], g], {i, 2000000, 3000000}],Except[Null]] At some point you'll run into a memory issue with all the Nulls, but I think with only 10^6 you are ok.


1

This may not be the fastest way, but it's a way: SetSharedFunction[ParallelSow] ParallelSow[expr_] := Sow[expr] Reap[ParallelDo[If[countedQ[i], ParallelSow[f[i]]], {i, 1, 10^7}]] where countedQ[i] is some Boolean function that determines whether f[i] gets added to the accumulated list. Feel free to make improvements. Note that AppendTo scales as $O(n^2)$ ...


2

After multiple failures to achieve truly unattended batch plotting setup solely in Mathematica, I have finally decided to go with a hybrid approach instead. I have exported the plotting commands into a Mathematica script, then use a separate Python script to call WolframScript. After a couple of plots, the MathKernel will still crash as usual. This will ...


0

ParallelSum will get you some memory savings. I get a successful evaluation of the following: In[1]:= hugeList = Range[0, 6*10^3]; MemoryConstrained[ Apply[Plus, ParallelMap[N[Pi, 50]^#/#! &, hugeList]] - N[Pi, 50], 2^20 ] Out[1]= 19.999099979189475767266442984669044496068936843225 But, taking the range up to 7e3 ...


5

(Reposting my comment as an answer, just to take the question off the unanswered list) This is a bug and has been fixed in version 10.2. I am not aware of any workarounds that may be applicable in earlier versions.


3

This was not really a Mathematica problem. The system disc was full. (Zero bytes free.) Freeing up some space enabled kernel launches to work again.



Top 50 recent answers are included