Questions on parallel computing in Mathematica.

learn more… | top users | synonyms

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 ...
1
vote
3answers
119 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
67 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
87 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 ...
0
votes
0answers
44 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
64 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 ...
6
votes
1answer
212 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
1answer
124 views

Experimental`NumericalFunction in NMinimize solution

I try to make a number of optimizations using this code: ...
0
votes
0answers
19 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: ...
1
vote
1answer
122 views

Parallel numerically integrated function can't be plotted [closed]

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
32 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. ...
4
votes
1answer
96 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 ...
2
votes
0answers
221 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
110 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 ...
4
votes
1answer
76 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 ...
2
votes
1answer
226 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 ...
4
votes
1answer
89 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
169 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
41 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 ...
3
votes
0answers
123 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
100 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 ...
2
votes
2answers
137 views

Definitions inside ParallelTable?

How can I make definitions inside ParallelTable to use them outside? For example, if I execute: ...
0
votes
1answer
118 views

ParallelTable and DistributeDefinitions

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

Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
2
votes
2answers
113 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 ...
0
votes
0answers
68 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
221 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
41 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 ...
0
votes
0answers
44 views

ParallelTable: explicitly assign iterator values to kernels

I've a construct that reads ParallelTable[ MyFunction[i], {i, 16} ] Now, MyFunction[i] takes an amount of time to be evaluated which is a decreasing function ...
9
votes
2answers
284 views

Why is ParallelMap way slower than Map

I recently tried to use ParallelMap instead of Map and to my surprise encountered that ...
5
votes
2answers
135 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 ...
-4
votes
1answer
158 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 ...
0
votes
1answer
96 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 ...
5
votes
1answer
159 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
197 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: ...
9
votes
1answer
358 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 ...
1
vote
1answer
101 views

ParallelTable of ParametricNDSolve objects fail

There seems to be a problem with ParametricNDSolveValue togeteher with ParallelTable First we create a ParametricNDSolveValue object ...
0
votes
1answer
97 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 ...
2
votes
2answers
234 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 ...
5
votes
0answers
84 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 ...
9
votes
1answer
163 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 ...
5
votes
1answer
233 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...
1
vote
0answers
80 views

Why does ParallelTable give different answer than Table [closed]

Consider the following code a0 = 6.; ls1 = ParallelTable[k, {k, -π/a0, π/a0, π/a0/100}]; ls2 = Table[k, {k, -π/a0, π/a0, π/a0/100}]; ls1 == ls2 (*False*) Why ...
9
votes
1answer
272 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: ...
3
votes
1answer
163 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 : ...
2
votes
0answers
95 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 ...
2
votes
1answer
159 views

How to parallel this nested table efficiently?

I have an 8 core CPU and want to parallel evaluate the following nested Table Table[Table[expr[i,j], {i,1,10}], {j,1,4}] But ...