Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
0
votes
0answers
53 views

How to Parallelize a Function Efficiently

I have a Mathematica function that I call a great many times in a notebook, as shown below. What the function does is try to identify the optimal combination of stop loss and profit target for a ...
19
votes
2answers
666 views

Partial Differential Equation in Parallel

is there any native way to implement multi-core parallel solving of PDE in Wolfram Mathematica? WM 10 now supports Finite Elements Method, but it is actually useless without parallelization. Usually ...
40
votes
1answer
2k views

Mma 10: Half the parallel power (Macs)?

Here is a comparison of the parallel kernels launched under Mathematica under v9 and v10, on the same identical current 2014 R2-D2 Mac Pro ... [ Update: Valerio has commented that the same issue ...
3
votes
1answer
32 views

Is there any sequence using OpenAppend and ParalleTable for continuing writing data?

After I post the question writing data without erasing exist data when quit kernel , I can successfully use OpenAppend to realize it. But if I work with ...
10
votes
2answers
292 views

Understanding Parallelize methods

In the documentation page for Parallelize, we find the methods that can be used. I do not quite understand the difference between Method->"CoarsestGrained" and <...
0
votes
1answer
71 views

Update initial conditions recursively/sequentially within ParallelTable using NDSolve

I am modelling 3D motion of particles inside a force-field using second-order coupled PDEs, which I solve from time t=t0 to t=t1 with initial conditions x0,y0,z0. I have a total number of "particles" ...
2
votes
0answers
62 views

Launch Kernels on Windows 10 from Raspberry Pi (linux) over SSH

I am trying to launch remote kernels on a Windows 10 PC (remote) from a Raspberry Pi 4 (Master or local). Both machines have V12 installed. On the Windows machine, I have installed OpenSSH per ...
2
votes
0answers
72 views

ParallelSubmit does not trigger computations

I am having some problems with parallel computations. I'm afraid it may be a "known issue" but I haven't found any solution. In general, my script looks like this ("prepare" and "process" are my own ...
2
votes
0answers
60 views

NBodySimulation in ParallelTable [closed]

When I use the NBodySimulation in a ParallelTable I do not get multiple processors effectively activating. If I want to sweep ...
2
votes
1answer
34 views

Operators without built-in meaning are incompatible with parallel evaluation

Mathematica has a useful set of Operators Without Built-In Meanings. For example: CenterDot, CircleDot, ...
2
votes
1answer
94 views

ParallelTable giving totally wrong answer

Following suggestion I created the simplest error giving code ...
1
vote
0answers
63 views

How to use Mathematica with Slurm?

We have a cluster that uses Slurm. On each node we have put a license that allows for 128 computation kernels (we have a Mathematica for Sites License). How can we run Mathematica on more than one ...
2
votes
0answers
35 views

How to read and write the same text file in Parallelization using ParallelTable? [closed]

I want to know how to write and read a same text file (for example, external.txt ) without conflicts in parallelization. The following is just a small idea, but the problem is there seems a conflicts ...
0
votes
0answers
23 views

Optimizing and Parallel Computing for Large Dyadic Intervals

I need help with the efficiency of my code i.e. less time so I can compute for large range of values. My function n[x] takes in a number x and outputs the ...
6
votes
1answer
67 views

Parallel Computation with the possibility of calculation failure

I would like to use Mathematica to speed-up a parallel calculation. I envisage each sub-process producing a list of 4 million machine reals. My problem is that sometimes the sub-process (based ...
6
votes
1answer
131 views

Speeding up tensor contractions and multiplication

Consider a tensor $T\in\mathbb{R}^{N\times N\times N\times M}$ and two vectors $x,y\in\mathbb{R}^N$. I want to compute the $N\times M$ vector defined by $X_{ij}=\operatorname{tr}(x^\top T_{:,:,i,j}y)=\...
0
votes
1answer
45 views

How to build a matrix of size n + 4 from a matrix of size n and 4 rows and 4 columns?

I have a matrix size n + 4 very long and very complicated and to find my matrix I have a matrix of size n and 3 rows and 3 columns To better understand my problem here is a simple example ...
0
votes
0answers
12 views

Parallel evaluate a cell distributing the definitions

In Cell evaluation and parallel kernels a solution is proposed for how to evaluate multiple cells in parallel. I tried it, but ran into the problem that definitions do not get distributed to the new ...
2
votes
0answers
44 views

Possible bug ParallelDo (or better practices for ParallelDo)

ParallelDo is having problems evaluate an expression that evaluates fine outside ParallelDo. The problem is not due to the use ...
0
votes
0answers
25 views

Having trouble distributing a large association to sub-kernels

The following seems to work based on memory usage. ...
0
votes
0answers
28 views

How to parallelize the following table

Consider a table: ...
1
vote
1answer
65 views

Parallelization command possible bug

In the following Mathematica compiled program, 3 persons take turns in a fair Russian Roulette Game with 1 bullet in the 6th chamber and we find the probabilities of each person being killed after 1,...
1
vote
0answers
70 views

How can I devote all the cores to Mathematica?

I have a problem with the calculations speeds in xAct package. In fact, some of them take lots of seconds. Is there any way to speed up the calculations by engaging all the cores for Mathematica (or ...
2
votes
1answer
82 views

Passing Package Dependencies to Subkernels

Say I have a function f[x_,...]:=... in a *.wl-Package form that depends on a bunch of Packages (some other *.wl files), and say I want to call this function ...
3
votes
0answers
32 views

ParallelDo and Reap/Sow in combination fails

I just realized the following problem. I tried to speed up a program that reads hundreds of files each of size up to 200+ MB and processes them, therefore I changed a ...
1
vote
0answers
123 views

Surprise: I don't need a new kernel to make to MMA notebooks independent [closed]

People seem to suggest that one needs to start a new kernel to keep multiple Mathematica (MMA) notebooks independent e.g. Kernel management link. But I did not do so and still found my two notebooks ...
0
votes
1answer
53 views

Parallel XML import

I need to import some xml information from many pages. I have list of this pages. Doing it in single thread is too long. But I can't access multiple pages from the same IP at the same time. So I need ...
7
votes
2answers
78 views

Parallelizing MapAt

What is the best way to parallelize MapAt? Only ParallelMap is provided, but seems bad when executing functions on a subset of a ...
0
votes
1answer
79 views

How do I share my variables and my function output in parallel computing?

Here as a simple example ...
0
votes
0answers
45 views

Parameter sweeps on a HPC cluster

I have a mathematica *.wl file set up, such that there are a couple of parameters defined in the beginning, and, when run, it produces a few outputs. I can run this script on a Slurm-run HPC cluster ...
3
votes
0answers
84 views

Parallel evaluation of RandomVariate for an InterpolatingFunction

I need to generate a lot of point according to a given distribution. I don't have an analytic form of this distribution so I am using an InterpolatingFunction of ~100 points computed numerically. I ...
3
votes
0answers
86 views

Language`ExpressionStore and ParallelMap

Is there a way to access NewExpressionStore from within a parallelized calculation? I have tried variations of ...
0
votes
0answers
21 views

Parallezation gives LaunchLocal::somefail

I was running a program using parallelization, and I got the following warning message: LinkOpen::linke: No MathLink problem encountered.. SubKernels`LocalKernels`LaunchLocal::somefail: 1 ...
1
vote
0answers
59 views
0
votes
0answers
78 views
0
votes
0answers
37 views

Saving DownValues for a function computed in parallel

Is it possible to save DownValues of a function computed using a parallelization routine? I have a rather costly function f I wish to evaluate at a grid and save ...
10
votes
1answer
104 views

Parallelize[MapIndexed[…,Association[…]]] returns broken result

Bug introduced in 10.0.2 or earlier and persisting through 12.0 Confirmed: CASE:4041910 Consider the following example: ...
2
votes
2answers
173 views

Parallel Computing Problem [closed]

The program runs out quickly(30 seconds) if I don't do parallel.But when I replace Table with ParallelTable,the Program will keep running,no output results. My code https://privatebin.net/?...
0
votes
1answer
60 views

Parallelizing nested for loops

I'm currently computing nested for loops. I count up a few counting variables and compute a value for each set of counting variables, then that value is added to an array. It is a way of adding up ...
37
votes
1answer
682 views

Parallelize Map and ParallelMap

Bug introduced in 8.0 and fixed in 11.2 It is stated in the documentation that Parallelize[Map[f, expr]] is equivalent to ...
0
votes
0answers
31 views

Reading a chunk of data from a stream using Parallelization

I am trying to read a stream and perform some operations in parallel. Here is the logic of the code inside the ParallelDo: 1- Open stream 2- Read chunk of data 3- Close stream 4- Process the data ...
1
vote
1answer
130 views

How to run multiple functions simultaneously by multi-core CPU in Windows?

There exist multiple functions, take them for instance, 3 functions as follows: ...
5
votes
1answer
543 views

Why is ParallelDo slower than Do?

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

Parallelise numerical integral for contour plot

I have the following integral that I would like to evaluate: ...
3
votes
1answer
48 views

PatternTest vs Parallelization

Bug introduced in 10.0 or earlier and fixed in 11.2 Consider the following function ...
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 "...
61
votes
4answers
4k 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 Math....
1
vote
0answers
49 views

Conversion of STL files to 3D Images

I am trying to convert some stl files to 3d images in MMA 11.3. I came across this post that contained some code making use of parallelization to speed up the process, as follows: ...
6
votes
1answer
74 views

How to properly Abort from within a ParallelMap?

If a condition is met within a sub-kernel in the function being mapped, how does one cancel the whole ParallelMap operation? ...
1
vote
0answers
40 views

How badly does switching kernel slow down or completely stop Mathematica running jobs?

I have a question on how to run two or more Mathematica jobs on one laptop. For example, I use a local kernel to run a job. Then I open another job and choose Kernel configuration option and choose ...