Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
2
votes
0answers
6 views

Lightweight Grid: transfer a file to the master kernel?

I am trying to run code on a Lightweight Grid using ParallelDo. I have ~300 jobs that each take ~20 minutes to run and produce ~8 MB of data, and I am using a ...
0
votes
0answers
28 views

How to monitor the progress of building a ParallelArray?

I managed to get the below code working for Array as I wish to track array building for 2d arrays. The code inside the array elements is reasonably expensive, so ...
2
votes
0answers
36 views

Parallelize and tensor calculus

Is it possible to use Parallelize with tensor calculus functions like TensorContract and ...
0
votes
0answers
35 views

How to use all nodes and cores in parallelization

Here is the link for the code that I have written, I have taken very less sample for the check. I have 10 nodes available with 24 cores, but while running this program only 24 kernels are being used ...
0
votes
0answers
20 views

ParallelTable with NIntegrate and Append

to evaluate a NIntegration inside a loop, so to do faster, I have try to use the ParallelTable, the program runs without error, but get the wrong results. Using Table I get for the list: {0.2, 0, 0....
0
votes
1answer
39 views

Parallelizing FindMinimum

I have complicated 6-dimensional function to optimise. Using FindMinimum works all right, but takes a few minutes. Considering that I want to check multiple starting points, I'm looking at run times ...
16
votes
1answer
200 views

When does NDSolve parallelize ODE system solving?

I've long believed that NDSolve cannot make use of multiple cores to solve ODE system, but things seem to be different at least since v12. Consider the following ...
0
votes
1answer
34 views

Compiling simple parallel function gives inconsistent results and errors

Im trying to compile the following function: ...
3
votes
1answer
48 views

wolframscript command line output from ParallelDo kernels contains lots of gibberish

I run this code: ParallelDo[ Print["Hi"];, {i,Range[2]} ] And I get this: ...
0
votes
0answers
64 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 ...
3
votes
1answer
34 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
295 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 <...
2
votes
0answers
65 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
62 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
0answers
73 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
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
97 views

ParallelTable giving totally wrong answer

Following suggestion I created the simplest error giving code ...
1
vote
0answers
82 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
41 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
71 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 ...
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 ...
6
votes
1answer
136 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
0answers
26 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,...
2
votes
0answers
45 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 ...
1
vote
0answers
72 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
88 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 ...
0
votes
1answer
57 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 ...
3
votes
0answers
34 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
126 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 ...
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
94 views

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

Here as a simple example ...
0
votes
0answers
46 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
88 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 ...
0
votes
1answer
54 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 ...
0
votes
0answers
25 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
61 views

Write in ParallelTable

Why does ...
0
votes
0answers
80 views
0
votes
0answers
45 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 ...
2
votes
2answers
176 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
73 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 ...
0
votes
0answers
32 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 ...
5
votes
1answer
548 views

Why is ParallelDo slower than Do?

I have problems to write parallel code in mathematica. Why is ...
1
vote
1answer
137 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: ...
3
votes
1answer
49 views

PatternTest vs Parallelization

Bug introduced in 10.0 or earlier and fixed in 11.2 Consider the following function ...
0
votes
1answer
98 views

Parallelise numerical integral for contour plot

I have the following integral that I would like to evaluate: ...
5
votes
0answers
119 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 "...
1
vote
0answers
54 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: ...