Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
7
votes
1answer
119 views

Documentation example gives different answer in Mathematica 11.3 [duplicate]

I have been looking at the very first example on this page of the documentation in Mathematica 11.3 (default installation options) and I get a different result: ...
7
votes
1answer
272 views

Register “initialization code” to run on any newly started parallel kernel

Is it possible to register a some "initialization code" to be run on any newly started parallel kernel? This would be similar to how ParallelNeeds registers a ...
7
votes
3answers
634 views

Parallel and non-Parallel functions return different results?

A friend of mine observed that when running ParallelMap or ParallelTable that he would get different results than when running <...
7
votes
1answer
195 views

Local logfiles for remote kernels

I'd like remote slave kernels to produce log files on my local machine, subject to the following constraints: 1) I don't want to install a distributed filesystem or do other administrative work on ...
7
votes
1answer
391 views

Setting $RecursionLimit across all parallel kernels

I'm trying to optimize an elliptic curve factoring method by running it in parallel. There is a recursive step which required me to set the recursion limit higher than 256, however when I try and run ...
7
votes
2answers
78 views

Parallelizing MapAt

What is the best way to parallelize MapAt? Only ParallelMap is provided, but seems bad when executing functions on a subset of a ...
7
votes
2answers
859 views

Does Eigenvalues evaluate in a parallelized way?

I use mathematica on a computer with linux operating system. The computer has 2 cpus and each cpu has 4 cores, so there are totally 8 cores available. Now I got confused with whether the evaluation ...
7
votes
1answer
890 views

Evaluate while external command is being run [duplicate]

Possible Duplicate: Computing Many Slow I/O Operations I'm launching an external command with the Mathematica front end that takes two arguments: ...
7
votes
1answer
272 views

Remote Raspberry Pi Kernel from 2nd Raspberry Pi Front End

I've reviewed the following posts: Connecting two Raspberry Pi's using MathLink remote kernel through SSH How to connect the front end of one raspberry pi with the kernel of another But have been ...
7
votes
2answers
754 views

Communication between local kernels

this is my first post but you have already helped me so many times that I have to start by saying thanks a lot! I have a really long calculation to do, and I have used the Evaluation->Kernel ...
7
votes
1answer
334 views

What do the elements of the Parallel Kernel Status screen mean?

I just managed to get my multiple kernels up and humming on a new multi-core machine, which I am quite happy about. I am slightly at a loss, though, about the meaning of the different parts of the ...
7
votes
1answer
925 views

Communication between parallel kernels

Greetings. This is my first post here, also, I am not a seasoned programmer, so any advice pertaining to coding that is not directly related to the problem (stated below) is welcome. I am having ...
7
votes
1answer
116 views

AbortKernels, CloseKernels may crash Mathematica

Let us start with a variant of an example in the documentation of AbortKernels. We launch four subkernels: LaunchKernels[4]; ...
7
votes
1answer
108 views

Association lookup in sub-kernel seems slow

While developing a parallel version of some code, I noticed that looking up an item in an association seemed much slower than in the serial version of the code. To show the effect, I created the ...
7
votes
1answer
2k views

Causes “libGL error: failed to load driver: swrast” an Huge Overhead in Parallel under Version 10.3?

Under Linux (SUSE Linux Enterprise 11) for Mathematica Version 10.2/10.3 I observe the following error in parallel ...
7
votes
1answer
253 views

Garbage collection for memoized functions on subkernels

I have a top-level function which operates on some data: findBestIntegers[data_]:=ParallelMap[optimize,data] which makes parallelized calls to an optimization ...
7
votes
1answer
256 views

Parallelize[Mapindexed[]], level={-1}? Sal Mangano's 《Cookbook》

It is easy to Parallelize[] Map[] & MapIndexed[], as having been shown in MMA9 Help for ParallelMap[] and Parallelize[]. For MapIndexed[], the default levelspec is {1}. However there are many ...
7
votes
1answer
867 views

Export graphics in parallel

I run a heavy simulation, using NDSolve and the method of lines. This means that the result of NDSolve is a list of, say, 400-...
7
votes
0answers
66 views

What's with the weird HoldRest Attribute of ParallelMap?

Bug introduced in 10.0 or earlier and persisting through 11.1 I have noticed some odd behavior of ParallelMap: When the list, that is mapped over, is not inserted ...
7
votes
0answers
131 views

ParallelSubmit executes only on one kernel

I'm trying to use Parallesubmit to run some calculations in parallel, but it looks like all the calculations are evaluated at one kernel. Consider this example: <...
7
votes
0answers
306 views

WolframScript never exits (v11 only)

after updating to version 11, I came across a problem with the execution of package files via bash. The WolframScript program runs the entire code, but frequently it does not exit properly and as a ...
7
votes
0answers
169 views

Bug: Calling `SetSharedVariable` while kernels are running hangs them up/crashes them

Bug introduced in 9.0 or earlier and persisting through 11.0.1 or later Start a fresh kernel Quit, and maybe launch ...
6
votes
2answers
592 views

Why doesn't ParallelTable work on this very simple example?

For some reason, I'd like to use ParallelTable with a variable number of iterators. Table[a[1], {a[1], 0, 10}] works fine: ...
6
votes
1answer
135 views

Speeding up tensor contractions and multiplication

Consider a tensor $T\in\mathbb{R}^{N\times N\times N\times M}$ and two vectors $x,y\in\mathbb{R}^N$. I want to compute the $N\times M$ vector defined by $X_{ij}=\operatorname{tr}(x^\top T_{:,:,i,j}y)=\...
6
votes
2answers
232 views

Contexts and parallelization

This question is related to my previous one here. I opened a new question because I think that the root cause is different though. BTW I use MMA 9 on a mac OS X 10.11 (El Capitan). I put here a ...
6
votes
1answer
569 views

Why does compiling a function with ConstantArray give an error when used in parallel?

Here is a sample compiled function: ...
6
votes
1answer
499 views

Definitions are not distributed to parallel kernels

Bug introduced in 10.0 and fixed in 10.0.2. I have a small package with utilities, which looks like that: ...
6
votes
2answers
243 views

Parallelizing or optimizing a script for calculating the size of all pairwise intersections between collections of sets

I need to speed up or parallelize an operation that looks essentially like this: ...
6
votes
1answer
673 views

Progress indicator with shared variables

I'm trying to create a custom progress indicator for a parallelized computation, using Dynamic and SetSharedVariables to display ...
6
votes
1answer
980 views

Export to file from ParallelDo loop

I currently have a Mathematica code similar to: ...
6
votes
1answer
169 views

Are more cores at lower GHz always faster for parallel processing?

Web searches have not yielded a definitive answer to this question: I am doing Monte Carlo simulations in Mathematica using ParallelTable, etc. to speed up the computation. I have an Enterprise ...
6
votes
2answers
173 views

Average length (in words) of paragraphs in document

I try to calculate the average length (in words) of paragraphs in a document. The data look like: ...
6
votes
1answer
550 views

Cell evaluation and parallel kernels

Is it possible to simply force Mathematica to evaluate one cell with let's say kernel A and another cell with kernel B etc. so that they can be evaluated in parallel? There is a similar answer here ...
6
votes
2answers
4k views

Why can't I define a commutator operator in this way?

I am trying to define some operators I use frequently. For example, I defined a KroneckerProduct operator as $\otimes $ as follows: ...
6
votes
1answer
130 views

Is it safe to use older version subkernels with a newer version main kernel?

At the moment we only have access to version 8 of the Lightweight Grid (i.e. version 8 of the Mathematica kernel). Is it safe to run version 8 subkernels together with a version 9 main kernel? It ...
6
votes
1answer
71 views

Parallel Computation with the possibility of calculation failure

I would like to use Mathematica to speed-up a parallel calculation. I envisage each sub-process producing a list of 4 million machine reals. My problem is that sometimes the sub-process (based ...
6
votes
1answer
192 views

ParallelTable and Random

Each time I execute the following code it generates the same cylinders with the same format. ...
6
votes
1answer
509 views

How to avoid unpacking from Language`ExtendedFullDefinition

Consider this code: LaunchKernels[]; On["Packing"] a = RandomReal[{0., 1.}, {64, 30000}]; ParallelMap[Fourier, a]; // AbsoluteTiming Developer...
6
votes
1answer
146 views

2D interpolation of function with dependent interpolation border

My problem is to compute $$\int\limits_{x_{min}}^{x_{max}}\int\limits_{y_{min}}^{\sqrt{x^{2}-a^{2}}}W(x,y)g(x)\ dx\ dy$$ Because $W$ have highly oscillatory 2d complex numeric integral inside, dumb ...
6
votes
1answer
274 views

Calculate the ESP Grid based on Density Grid

I want to build a fast way to convert a density grid file into a grid file of the respective electrostatic potential (ESP; also known as MEP, the molecular electrostatic potential). This calculation ...
6
votes
1answer
1k views

Efficiency of ParallelDo when a global variable./matrix is being updated

(Disclaimer: I realize that the addition of matrices a and b below can be done very fast just by typing a+b. The code below is just meant to illustrate behavior similar to what I observe in much more ...
6
votes
1answer
135 views

init.m in Autoload directory is not read by parallel kernels in M11.2

Parallel kernels are not reading the init.m files in $UserBaseDirectory/Autoload since version 11.2. The master kernel reads it ...
6
votes
1answer
120 views

$DistributedContexts and ParallelEvaluate

This is a small question regarding the relationship between the $DistributedContexts variable and the ParallelEvaluate command. ...
6
votes
1answer
399 views

Selecting the parallel kernels where tasks can be executed

When I use ParallelSubmit, is it possible to select on which kernel a task can possibly be executed? For example if have 3 parallel kernels, can I only use 2 of ...
6
votes
2answers
212 views

How can I terminate a MathKernel that is running an external program after a timeout?

I'm using ParrallelDo to parallel run another program (windows executable) in 8 subkernels. Sometimes a SubKernel freezes. What I see in the task-manager is that ...
6
votes
1answer
115 views

UsingFrontEnd with compute kernels

I am trying to have each compute kernel in a Mathematica session evaluate a notebook with NotebookEvaluate. Here is a sketch of my code: ...
6
votes
1answer
245 views

Can a package append its context to $DistributedContexts?

I am writing a package (for reference, this one) which I use extensively in parallel computations, and to lighten the coding load on the 'run-time' notebook, I want my package to sit on the ...
6
votes
1answer
74 views

How to properly Abort from within a ParallelMap?

If a condition is met within a sub-kernel in the function being mapped, how does one cancel the whole ParallelMap operation? ...
6
votes
1answer
128 views

Finer granularity with ParallelDo

ParallelDo only parallelizes by the innermost variable. Is it possible to distribute the calculation over all the points (all the variable) separately? let me ...
6
votes
1answer
663 views

Is matrix multiplication automatically done in parallel in Mathematica 9?

In good old Mathematica versions (5.2, 6.0), matrix multiplication was automatically done in parallel. For example, on an 8-core machine, define two square real matrices: ...