# Tagged Questions

Questions on parallel computing in Mathematica.

114 views

### How to parallelize this code

Here I obtained one code which should tests some zeros of the poly for various g, but sometimes I have to many cycles because of step and I need to parallelize the running on all cores. Classical ...
107 views

### Creating a parallelizable DiscretePlot

To my knowledge, DiscretePlot cannot be parallelized, although one can simulate the default behavior of DiscretePlot and get the ...
268 views

### Do multiple instances of Mathematica run completely independently?

Let me simplify the problem I am trying to solve so that the issue I face is highlighted. Say, I want to generate $n$ samples of a Gaussian random variable. I have a script (say ...
397 views

### Making Monte Carlo simulation with ParallelTable

I would like to to MonteCarlo simulations of various regressions - basically, doing OLS under various conditions to test approaches. On my macpro 2x 2.8 GHz quad core Xeon, 32 Gb RAM DDR2 @ 667 Mhz, ...
111 views

I'm trying to use a LibraryLink function in parallel. It is an embarrassingly parallel problem, so that no dependency between those parallel tasks. However I can only get the parallel efficiency about ...
152 views

### Distributing value of variable to specific kernel

I want to distribute the value of a variable to a specific kernel in a parallel computing setup. Using DistributeDefinitions of course does the job, but it ...
2k views

### What is the fastest way to extract a substring from a huge string?

I develop an algorithm to find the most common substrings of a given length n up to a certain distance l in front of a pattern p in a huge sequence S. E.g. I want to find the most common hexamers ...
136 views

### Where Statement

Is there a "parallel" way to perform these operations? Indices = {} For[i = 1, i <= Length[w], i++, If[w[[i]] < 0, AppendTo[Indices, i]]] Which gives a ...
162 views

### Launching external program in background process with ParallelSubmit

I work on the implementation of an image processing pipeline in Mathematica in which I also would like to use external programs to do certain processing steps. As an example I have macros for the ...
183 views

### SSH known hosts in Windows (Error code = 124)

I had to re-install Raspbian OS and now it has new SSH key. SSH clients usually let ignore this fact and save the new key, but not now. Mathematica gives no way to go if the Host Key was changed. I ...
527 views

### Parallel optimization of Markov Chain Monte Carlo

I'm trying to reduce the computation time of a MCMC simulation. Essentially I have a set of particles performing a random walk in a periodic random potential. The particles are independent and every ...
205 views

### ExperimentalNumericalFunction in NMinimize solution

I try to make a number of optimizations using this code: ...
45 views

### Updating List with Do works but not with ParallelDo [duplicate]

I am trying to find 5 minimas for some function. I can obtain the results if I implement a simple Do function. I tried to speed it up by using ParallelDo and then my code returns spurious results. ...
210 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 ...
519 views

### Remote kernel shuts down after several seconds

I have Mathematica 9 installed on two Windows Server 2008 R2 machines. Now i want to try using one of them as a frontend with local kernels and the other one for remote kernels. OpenSSH 6.5 for ...
220 views

### Launching Remote Kernels takes a lot of time

I recently played around with establishing a remote kernel setup without using mathematica grid. To do this I use the LaunchKernels[] command and ...
145 views

### TimeConstrained for parallel computations

The Mathematica manual states TimeConstrained takes account only of CPU time spent inside the main Mathematica kernel process; it does not include additional ...
726 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 ...
142 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 ...
241 views

### Using Multiple Kernels When Making Plots

I am running a notebook that makes multiple plots. I define a function and then I want to plot that function for different choices of parameters, using RegionPlot. ...
47 views

### How to construct a list in a For Loop nested in a Parallel Loop [duplicate]

I've the following problem I cannot solve. I allocate an empty matrix, v, of size n x m. Then I want to do a Parallel loop (ex. ParallelDo), and do some operations (described by a function ...
231 views

### Discriminant of Characteristic Polynomial

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 ...
124 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 ...
200 views

### Definitions inside ParallelTable?

How can I make definitions inside ParallelTable to use them outside? For example, if I execute: ...
306 views

### ParallelTable and DistributeDefinitions

I have a function in the following form: function[...] := With[ {...}, Table[ anotherfunction[i, j, ...], {i, ...}, {j, ...}, ... ] ] If ...
2k views

### Threads vs Cores: How many kernels need to launch in parallel Mathematica?

I have a dual-core intel machine. I would like to test how many parallel local kernels should be launch to get the optimized performance. Knowing that the HyperThreading technology of Intel could run ...
393 views

### How to constrain memory usage on HPC?

I found the performance of built-in function MemoryConstrained is very poor. It stops the evaluation after the memory limit has already been exceeded greatly than ...
434 views

### How to parallel the computation tasks according to machines instead of kernels

On a HPC, there are many computation nodes, each node corresponds to an independent machine. Every node has several cores, for example 8 per node. Mathematica can launch remote kernels on different ...
642 views

### Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
243 views

### Executing several input cell simultaneously with parallelization

How can I execute more than one input cell simultaneously using different processor. For example consider this two cells ...
395 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: ...
65 views

### Parallelizing an associative binary operation

I have an associative binary operation '.', which I often use in this sort of way: result = expr1 . expr2 . expr3 . expr4 The ...
607 views

### Why is ParallelMap way slower than Map

I recently tried to use ParallelMap instead of Map and to my surprise encountered that ...
309 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 ...
206 views

### How to use all the kernels efficiently

We build a project with Java and Mathematica technologies. For this project we have written a bunch of functions in Mathematica and integrated some functions in one ...
117 views

### Problem with List Dimension Outer Map [duplicate]

I am currently handling a big list which has the following dimension: {6, 3, 4, 2, 2, 1, 8} where the last number 8 represent a ...
297 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 ...
219 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: ...
706 views

### ParallelEvaluate for function minimization

Is there a parallelized version of a minimization routine available in Mathematica? The objective function is non-linear and the gradients have to be numerically computed. Every function evaluation ...
150 views

### ParallelTable of ParametricNDSolve objects fail

There seems to be a problem with ParametricNDSolveValue togeteher with ParallelTable First we create a ParametricNDSolveValue object ...
178 views

### Parallelize matrix operations

I'm trying to reduce to a minimum the time of some matrix operations. When I don't parallelize and write the code in the most compact form I get the operation done in around 1sec (is this good? the ...
387 views

### Is there a way to parallelize the convolution component of EdgeDetect?

Provided an image like - test = Import["http://upload.wikimedia.org/wikipedia/commons/d/d5/Sunflowers.jpg"] We can run ...
174 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 ...
229 views

### How to monitor the communication between parallel kernels

Recently I increased the problem size in my code, and it scales up very badly using ParallelTable. With a lot of help from the this community, it seems that the ...
344 views

### How to avoid unpacking from LanguageExtendedFullDefinition

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

### Why I only get 2X speedup when parallelized with 16 kernels

I'm trying to parallelize a function by ParallelTable, and it seems the speedup is not very good. I have 16 parallel kernels on my computer node: ...
203 views

### Optimization of power tower fractal generator [closed]

I tried to optimize the code for generating power tower fractals from here. As the author suggested, I tried to memorize the points already tested in a list. Here is my code : ...
144 views

### Whether NIntegrate evaluation is multithreaded or not?

About MultiThread evaluation I am talking about here, see this post I am NIntegrate the function grarm[e, 3, dimension, 1, 1, 0.005]. There is matrix operation in ...