Tagged Questions

Questions on parallel computing in Mathematica.

learn more… | top users | synonyms

0
votes
1answer
262 views

Parallel computation of NDSolve and a problem

I used this code to solve a system of differential equations: ...
0
votes
1answer
190 views

Parallel computation of a system of differential equation

I need to solve a system of differential equations which contains, at minimum, ten thousands of differential equations. Actually, I am trying to solve density matrix equation. It's like something ...
6
votes
1answer
113 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 ...
2
votes
1answer
123 views

Copy a variable to a specific kernel in Mathematica [closed]

I would like to copy some parameter from the main Kernel of Mathematica to the parallel kernels available. So I'm running now a command like: ...
0
votes
1answer
92 views

Can ParallelDo speed up a counting problem?

How to make parallelize the following code keeping the same "idea". The example I have in mind is more complicated, but I would like to know if a program of this structure can be parallelized? ...
0
votes
0answers
66 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
36 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
65 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
144 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
326 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
737 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. ...
3
votes
0answers
70 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
2answers
86 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 ...
11
votes
5answers
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 ...
1
vote
3answers
121 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 ...
1
vote
1answer
77 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
93 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
65 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
241 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
133 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
125 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
34 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
129 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
254 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
130 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
90 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
312 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
91 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
178 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 ...
4
votes
0answers
168 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
112 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
145 views

Definitions inside ParallelTable?

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

ParallelTable and DistributeDefinitions

I have a function in the following form: function[...] := With[ {...}, Table[ anotherfunction[i, j, ...], {i, ...}, {j, ...}, ... ] ] If ...
3
votes
0answers
697 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
305 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
261 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
234 views

Suppress warnings in ParallelTable

I'm using ParallelTable to evaluate a function that involves NIntegrate. There are a lot of ...
2
votes
2answers
130 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 ...
6
votes
1answer
233 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
44 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 ...
9
votes
2answers
307 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
172 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
161 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
99 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
180 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
201 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
380 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 ...