New answers tagged

1

From the link in the comment above I have devised a solution included here for ParallelSubmit specific searches. Monitor can not be used so I make a progress function that will assist with the visual status update. progress[current_, total_] := Column[{StringRiffle[ToString /@ {current, total}, " of "], ProgressIndicator[current, {0, total}]}, ...


5

You may be going to too much trouble here. Consider that Position works on a matrix just as well as a vector. You did not include values for your parameters, so I can't use your code, but take a look at the following example. I have a matrix selector that contains $0$ or $1$ entries, and I want to grab the elements of another matrix target that correspond ...


2

The simplest and cleanest solution is to use a printing function which evaluates on the main kernel. SetSharedFunction causes a function to always evaluate on the main kernel (despite the somewhat confusing documentation). Example (run in a terminal): Mathematica 10.4.1 for Mac OS X x86 (64-bit) Copyright 1988-2016 Wolfram Research, Inc. In[1]:= print[...


2

The reason for this behaviour is that Table and ParallelTable generate the range from 1 to 10 by steps of 0.3 in slightly different ways. You are working with inexact (floating point) numbers. This means that even the slightest change in the order of arithmetic operations may change the result. (a+b) + c may give a different result from a + (b+c). ...


3

What you are seeing can be traced back to the behavior of DistributeDefinitions which is used internally by ParallelTable. DistributeDefinitions seems to have some way to determine which of its argument should in fact be distributed [1]. If the value of a variable is unchanged, it will do nothing. Consider the following snippet, for example: a1 = ...



Top 50 recent answers are included