Questions on parallel computing in Mathematica.

learn more… | top users | synonyms

1
vote
0answers
43 views

ParallelTable, ParallelDo and ParallelMap all fail on simple evaluations, a BUG? [on hold]

Sorry I am relatively new to the parallel functionality mathematica.. Here is to code: ...
1
vote
1answer
93 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 ...
0
votes
0answers
46 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 ...
0
votes
0answers
19 views

KernelObject::rdead on local kernels

I'm trying to parallelize some tasks which involve fetching data from a URL and processing it. This is the code: ...
3
votes
1answer
45 views

Creating a parallelizable DiscretePlot

To my knowledge, DiscretePlot cannot be parallelized, although one can simulate the default behavior of DiscretePlot and get the ...
1
vote
2answers
89 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 ...
14
votes
1answer
269 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, ...
0
votes
0answers
128 views

Fastest way to create a NxNxNxN dimensional matrix

I have a function that outputs a complex number Func[x_,y_]:= blah blah; I have constructed a table of all possible values of this function. ...
23
votes
1answer
479 views

Is it safe to launch/close kernels in the middle of a parallel calculation?

It appears that it is possible to launch additional kernels (or close existing ones) during a parallel calculation. The newly launched kernels will be utilized for the rest of the calculation. ...
2
votes
0answers
45 views

LibraryLink parallel performance

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 ...
0
votes
0answers
37 views

Monitor progress of a ParallelMap computation

I think this question is very similar to http://stackoverflow.com/questions/7352461/monitoring-progress-of-a-parallel-computation-in-mathematica I have been a while trying to adapt that to my problem ...
11
votes
5answers
1k 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 ...
0
votes
2answers
44 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 ...
1
vote
3answers
109 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 ...
0
votes
1answer
37 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 ...
2
votes
1answer
59 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 ...
6
votes
1answer
135 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 ...
8
votes
3answers
264 views

Why is this parallel evaluation with Dispatch[] so slow?

Can you efficiently parallelize this? The parallel versions are much slower than the sequential version, and I'm not sure why. Does SetSharedVariable allow ...
0
votes
0answers
39 views

Aborting Multiple Trial Divisions if a Factor is found

I am using Mathematica to perform trial divisions on large Mersenne numbers using specific prime numbers (e.g., primes of the form 8n+1 or 8n-1) and would like the program to abort once a factor is ...
0
votes
0answers
56 views

coding simple structures, potential problems (multithreading) and how to solve them

This post contains two parts. In the first part I will explain what I am trying to do. In the second part I will explain what I fear. My questions are about these fears. Are they justified and if yes ...
5
votes
0answers
66 views
0
votes
0answers
18 views

save data in parallel table [duplicate]

Suppose we have a table such as: Table[a[i,j]= 3 i^2+5 j,{i,1,100},{j,1,1000}]; after running this command we will have access to a[i,j], for example: ...
9
votes
2answers
211 views

Why is ParallelMap way slower than Map

I recently tried to use ParallelMap instead of Map and to my surprise encountered that ...
4
votes
1answer
57 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 ...
4
votes
1answer
67 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 ...
1
vote
0answers
64 views

Parallel numerically integrated function can't be plotted

I've been working on a problem where I need to integrate a function numerically. The function is quite complex and it takes almost an hour for Mathematica to make a plot. To speed the process up I ...
0
votes
0answers
27 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. ...
2
votes
0answers
119 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 ...
3
votes
0answers
77 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 ...
0
votes
0answers
52 views

Parallel Computation [duplicate]

I have two codes below. One of them is for serial computation, the other is for parallel computation. ...
40
votes
4answers
2k views

Speeding up this fractal-generating code

I used the code below (which is a sample from this gist containing more similar code) in my answer to my own question about Mandelbrot-like sets for functions other than the simple quadratic on ...
4
votes
1answer
78 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 ...
4
votes
2answers
147 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. ...
0
votes
0answers
39 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 ...
4
votes
0answers
89 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 ...
5
votes
1answer
80 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 ...
5
votes
1answer
279 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 ...
2
votes
2answers
106 views

Definitions inside ParallelTable?

How can I make definitions inside ParallelTable to use them outside? For example, if I execute: ...
2
votes
2answers
193 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 ...
0
votes
1answer
75 views

ParallelTable and DistributeDefinitions

I have a function in the following form: function[...] := With[ {...}, Table[ anotherfunction[i, j, ...], {i, ...}, {j, ...}, ... ] ] If ...
1
vote
0answers
255 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 ...
1
vote
1answer
106 views

Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
14
votes
1answer
258 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 ...
1
vote
1answer
67 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 ...
14
votes
1answer
205 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 ...
19
votes
3answers
930 views

Does parallel programming use up large quantities of memory in Mathematica?

When I start Mathematica with a fresh kernel and load a program I am developing to analyze biology data, the amount of used system memory is 1.9 GB (free memory is 14.5 GB). These memory values are ...
0
votes
3answers
311 views

Silence debug output from Parallelize?

I have this script, which does a bunch of image aligning in parallel: https://gist.github.com/8848a25a15da013ed1ad However, on EVERY print, Mathematica also prints from what Kernel the message came ...
0
votes
0answers
64 views

Parallelising the solving of polynomials

I'm working on finding solutions to a, not so very nice, system of equations. They are all polynomials of degree $4$ with $5$ parameters and all terms are of even order. I'll post the code on request, ...
6
votes
1answer
182 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: ...
1
vote
0answers
35 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 ...