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
6
votes
1answer
265 views

DistributeDefinitions not working for compiled functions

Bug introduced in 8.0 or earlier and fixed in 9.0.0 I'm having trouble with parallel evaluation of compiled functions. Here is a simple example illustrating the problem: ...
6
votes
0answers
489 views

How to force the compilation language to be C++ (not C) in CreateExecutable or CreateLibrary

I'm trying to speed up a section of a Mathematica 9.0.1 notebook by performing some calculations in C++ with the Cilk Plus and Threading Building Blocks tools available for the Intel C++ 14.0 compiler ...
6
votes
0answers
380 views

Discriminant of Characteristic Polynomial [closed]

I'm doing a calculation which finds the characteristic polynomial of a matrix with rather complex entries and then determines the discriminant of that polynomial. For smaller matrices up to around 7x7 ...
6
votes
0answers
527 views

Parallelizing is much slower than single kernel evaluation?

Starting with a vector of matrices, tVec, I would like to parallelize the multiplication of each element with the same matrix ...
5
votes
2answers
1k views

How can I speed up my code?

...
5
votes
2answers
251 views

ParallelMemberQ

I tried to make a parallel version of MemberQ for use with a large list, but failed miserably in terms of performance. I used Partition to subdivide the list and ParallelMap to perform the MemberQ ...
5
votes
2answers
189 views

Making calculation of correlation dimension faster

I am trying to make my calculation faster. I was hoping, when I compiled it, it would work much faster, but in the end its even slower. I don't know if I am using ...
5
votes
1answer
480 views

Parallelization inside a module: Proper use of local variables

I have the following Module which includes a ParallelDo call. Unfortunately, ParallelDo is ...
5
votes
1answer
2k views

Why is parallel slower?

I always assumed that distributing a computation is faster, but it isn't necessarily true. When I do Sum[i,{i,10^4}] I retrieve an answer much faster then if I do <...
5
votes
1answer
828 views

Which is the correct way to parallelize this code?

I am reading this blog on how to parallelize Sow and Reap, but it uses SetSharedFunction: <...
5
votes
2answers
495 views

ParallelMap and Sow/Reap - not behaving as expected? [duplicate]

Is ParallelMap and Parallelize@Map expected to work with Sow and Reap construct. This is a rather brief toy code to find all Primes just to force the use of Sow/Reap inside Map ...
5
votes
2answers
355 views

Do SetSharedVariable/SetSharedFunction ruin the benefits of ParallelTable?

Edit: I changed the sample code to get at my question better. Slowdown due to accessing a shared variable is a much more relevant issue (to me at least) than slowdown due to writing to a shared ...
5
votes
2answers
87 views

Why ParallelEvaluate[x = 0; {$KernelID, Dynamic[x]}] returns {{1,x},{2,x}}?

I'd expect that ParallelEvaluate[x = 0; {$KernelID, Dynamic[x]}] returns {{1, 0}, {2, 0}}, and that if in a parallel ...
5
votes
2answers
115 views

WhenEvent Issue with ParallelTable [closed]

I'm having a problem assigning the WhenEvent time value to a variable if NDSolve is iterated inside a ...
5
votes
2answers
254 views

Using Throw within ParallelDo

I've noticed that I can't Throw from within a ParallelDo in the same way that I can from inside Do. For instance, the following will work as anticipated with Do but not with ParallelDo: ...
5
votes
1answer
365 views

Listable vs Parallel

Are listability and being parallelized the same? In other words, Does parallelizing a listable function which has already a list as of its argument make the computation faster? In the documentation ...
5
votes
1answer
1k views

Bug in parallel computing

The following is a simplified example. We construct a library function f and another library function g, in which the library function f is called. ...
5
votes
1answer
234 views

Parallelize the construction of sparse matrices

I'm trying to parallelize a few constructions of chain complexes (given as a list of sparse matrices). I have a function that for any column (or row) computes the list of nonzero entries in that ...
5
votes
1answer
266 views

ParallelTable much slower than Table on RandomReal with arbitrary precision

So I was trying a very simple example (Mathematica 11.0.1) ...
5
votes
2answers
155 views

Parallel execution of an instructions block

I regularly use Parallelize and ParallelMap, andI've been reading the manual pages for parallel computing instructions but i could not find what I am looking for. Assume I have a sequence of ...
5
votes
1answer
270 views

memory leaks using NIntegrate on parallel kernel

Bug fixed in version 10.2.0 I'm running a large computation in parallel and the memory usage of the parallel kernels is increasing with every iteration of the calculation. Neither ...
5
votes
2answers
350 views

Running bits of code in a separate kernel

I am using Mathematica to generate 3D graphics frame for a video. The process goes as follows: Loop over a counter i Use Import...
5
votes
2answers
154 views

Paralleizing the Plot function internally

I have a function of several parameters, funct(a,b,c,d,f,...). Mathematica deals with this function fine but it takes a minute or so to make a data point. I want to plot graphs of funct using code ...
5
votes
1answer
78 views

Why does my Package not work when I use ParallelEvaluate?

I am developing a package in Mathematica for finding the conductivity of magnetic materials. The most important and time consuming processes are EigenSystem[] calls. I want to make the code modular so ...
5
votes
1answer
154 views

Adding a collection of neighbors to points in a list, concatenating strings, parallelization/optimizing run-time?

Before beginning, I want to note that there are some similarities with the questions Combining two lists of different dimensions into a list of all combinations of points? How can I make threading ...
5
votes
2answers
249 views

Parallel function evaluation for minimal value

I am asking myself, if the evaluation of a function f looking for a minimal value over a discrete set of values can be parallelize (brute scan for a potential ...
5
votes
2answers
770 views

NDSolve in Mathematica won't use all the cores avaiable

When I solve a system of differential equations in MATLAB, the task manager shows that all the CPU cores are in use. This is not true when I solve the same system in Mathematica. I have six cores. ...
5
votes
1answer
258 views

Parallelizing sparse array construction

I have a very large sparse array, and the computation of individual matrix elements is fairly expensive. The Matrix is Hermitian and traceless, so I would like to construct only the sub-diagonal ...
5
votes
1answer
269 views

Parallel evaluation of Image and Rasterize problem

The following command: ParallelTable[Image[Graphics[{{Red, Disk[{5, 5}, 4]}}]], {i, 10}] shows a very strange behaviour. It starts a new Mathematica process on ...
5
votes
1answer
777 views

How to change front end setting “Parallel Kernel Configuration” in the code?

I'm trying to run Mathematica parallel on multiple nodes on a HPC, and I use the remote kernel tab in the "Parallel Kernel Configuration" settings to set the communication between different nodes(...
5
votes
1answer
547 views

Why is ParallelDo slower than Do?

I have problems to write parallel code in mathematica. Why is ...
5
votes
1answer
142 views

What is the difference between controlling and computational kernels?

I have just dowloaded Mma 11.3 with a trial licence. In the download page you can see: That I can use 2 controlling kernels and 4 computing kernels. What is the difference between controlling and ...
5
votes
1answer
125 views

How can multiple kernels update a shared Association object?

In the examples below, the variable status is an Association object that is supposed to be shared by three concurrent kernels. ...
5
votes
1answer
355 views

gridMathematica on cluster with PBS Pro

I'm running my script (say "cluster.m") on the University cluster with PBS Pro installed. The script uses simple Parallelize like this: ...
5
votes
1answer
76 views

How to understand the different output of two UnsetShared?

Update 2 In v11.0.0, situation seems getting worse. UnsetShared doesn't unshare at all. Even the code in help documentation doesn't work as expected. Update From technical support, Thank you ...
5
votes
1answer
273 views

Side effects with ParallelDo

Hi guys I've the following problem with ParallelDo: if I run the code: ...
5
votes
1answer
555 views

Why is $ProcessorCount different than the selected number of cores in PBS?

By using ParallelTable and submitting my Mathematica code to a cluster, I noticed that it was enhancing the speed even when I selected a single core in a single ...
5
votes
2answers
179 views

ParallelTable with nonstandard iterator

This works as expected: Table[x[1], {x[1], 1, 10}] However, the parallel version ParallelTable[x[1], {x[1], 1, 10}] ...
5
votes
2answers
364 views

Computers running Wolfram lightweight grid manager won't fall asleep

I have a computing environment comprised of: 27" iMac with dual cores running Mac OS X 10.6.8 and 2 XServes each with 2 quad cores running Max OS X Server 10.6.8 All networking by ethernet to a Time ...
5
votes
1answer
926 views

How does Mathematica detect the number of cores in a system?

I'm running Mathematica 10.3.1.0 on a machine with 16 cores, but Mathematica (in the Parallel settings) says "Number of processor cores is 8." It's a 16-core Opteron 6300 chip on an Ubuntu system. All ...
5
votes
1answer
133 views

Problems with ParallelDo

As example I have the following two image sets (10 images each, png format, 8 bit gray scale) in two different directories and want to determine the mean intensity of each image: set 1: https://drive....
5
votes
2answers
281 views

ParallelTable vs. Table: Parallel gives NMinimize:nnum error

I have run into an issue where I am getting nnum errors when I use ParallelTable, which I do not get when I use Table (and even ...
5
votes
2answers
252 views

Creating a version of ParallelTable that parallelizes over all levels

Mathematica's ParallelTable (or any Parallel function based on iterators, like ParallelDo) only parallize the computation for the top level iterator (even with `Method -> "FinestGrained"' set). For ...
5
votes
1answer
496 views

How to Export from ParallelDo? [duplicate]

I'm running a simulation with parallel, and I want the results from each parameter set exported to a file whenever it's done (because the parameter space is huge and my computer doesn't have enough ...
5
votes
1answer
175 views

Print messages of parallel kernels to console

This question shows how to print output to the console, but how about messages? For the main kernel, I know this way: ...
5
votes
1answer
293 views

clear variables on parallel kernel

Short question: what is the proper way to clear a variable on a given kernel ? AND how can I ensure that the memory will indeed be freed subsequently ? Full question. Let me elaborate this question ...
5
votes
1answer
323 views

Dynamic Output during ParallelMap

I can't seem to figure out how to dynamically output a variable that is being used in a parallel evaluation. Below is an example function that demonstrates my problem. ...
5
votes
1answer
1k views

Parallel evaluation and memory use

I have never used Mathematica's parallel evaluation before and have some trouble getting it to work properly. For the record, I am running Mathematica 9 on Linux with an Intel Core i7 processor (4 ...
5
votes
1answer
385 views

Build recursion in parallel?

Problem Let's define a simple recursion. f[1] = 1; f[n_] := f[n] = f[n - 1]*n; If I evaluate f in parallel ...
5
votes
0answers
117 views

Optimize Use of PeakDetect in Mathematica

I am quite new to Mathematica and I am looking for some advice in order to improve and optimize my code. Here is what I am trying to do: Open a stream Read the stream line by line and store it in "...