Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

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

Converting Do expression to ParallelDo

I'm trying to use ParallelDo to speed up my code, but a problem confused me. In the following code I use Do and get the expected ...
2
votes
1answer
48 views

Vectorized RootFind for interpolated function

I've spent the last few days trying to vectorize my code to speed up root-finding on a grid. Apologies in advance if my code is poorly formatted. I have a fair amount of setup for the problem. It ...
1
vote
0answers
50 views

Faster methods for performing repeated list manipulations?

I've done my best to pore over the other posts on this site, and to the best of my ability I can't seem to find a good solution to my problem, so I apologize in advance if elements of my question are ...
5
votes
1answer
49 views

Compiling with Listable option and Parallelization

I have a bunch of triangles (200k) I need to calculate the normals of. Here are five of them below, each one with its vertices in CCW order. ...
0
votes
1answer
28 views

Map of an expression in a 3D grid is very slow

I have a quite large expression as function of $R$, $\phi$ and $Z$ as you can see: ...
2
votes
1answer
54 views

LetL Breaks in ParallelEvaluate

This was a wild head-scratcher for me to hunt down, but I now am sure LetL is the culprit. Here's a small example: ...
4
votes
1answer
148 views

Optimization: Differences between Map and ParallelMap

I just was studying Map and ParallelMap in a MacBook Air of 2 kernels. So, I tried comparing the AbosoluteTiming of these input lines and the outputs sorprised me because I thought a ParallelMap would ...
1
vote
1answer
56 views

Parallel computation gives different result

This is a followup question to this one. Following the comment, I used the code in this answer in this way: ...
1
vote
0answers
40 views

How to use Reap and Sow with ParallelDo

Consider the two cases: ...
5
votes
2answers
248 views

Is it possible to speed up this code by eliminating “For” loop?

I am finding how to speed up a code. The code and general equation are as below. ...
0
votes
1answer
95 views

Parallel computations [closed]

I'm having some problems with memory use and speed of a parallel computation. I've searched through the answers but only found allusions to the existence of a solution, but nothing concrete. The ...
5
votes
2answers
81 views

Monitor progress of each kernel within ParallelTable

I am generating a table using ParallelTable and for each table entry a Do loop is required. I want to monitor the progress of ...
1
vote
1answer
71 views

How to plot this geometric object in 3D? [closed]

Let $v_{0}=(1,0,0)$. Then how to plot in 3D the geometric object $$\left\{ \left(v_{0}\cdot v_{1},v_{0}\cdot v_{2},v_{1}\cdot v_{2}\right):v_{1},v_{2}\in\mathbb{R}^{3} \text{are unit vectors}\right\} ...
4
votes
1answer
67 views

Parallelization of MATLink

I am attempting to parallelize the construction of a table using MATLink and ParallelTable. Let's consider a sample ...
2
votes
0answers
46 views

Connect Raspberry pi front end to remote kernel(s) (Ubuntu, the free Wolfram engine)

I am trying to connect a Raspberry pi front end (notebook) to a remote kernel running Ubuntu with the free Wolfram engine. I have researched this answer but it never worked. Using the code below I ...
1
vote
1answer
52 views

Monitoring Parallel Processes

I have a problem where my For loop will not get rid of my PrintTemporary monitor, and it means I end up with loads and loads of ...
4
votes
1answer
78 views
3
votes
0answers
42 views

Bags don't work in parallel code?

Appending to a list in parallel works: b = {}; SetSharedVariable[b] WaitAll[Table[ParallelSubmit[{p}, AppendTo[b, 1]], {p, 3}]]; (* b is now {1,1,1} *) But ...
3
votes
1answer
37 views

How to get KernelID in from KernelObject?

In a nutshell, how can I get this number: I'm having trouble because $KernelID isn't a function and the FullForm is this crazy thing: Motivation: After you call ...
2
votes
1answer
42 views

AppendTo inside ParallelMap

I think this question has never been fully answered. In here the problem has already been mentioned, but let me give a MWE. I will solve a given ODE for a wide range of initial conditions and I want ...
4
votes
1answer
111 views

Right syntax to launch multiple kernels on SLURM cluster

I have access to a SLURM based cluster where I allocate 2 nodes, each with 12 processors. I am looking for a way to launch all 24 kernels to utilize the resources to the maximum for parallel ...
3
votes
2answers
63 views

Inconsistent LaunchKernels[8] versus LaunchKernels[] on Linux?

Context I am interested in doing parallel computation on a linux machine. Odd behaviour When I chose explicitly the number of kernels ...
1
vote
1answer
59 views

Using more than 6 kernels in ParallelTable function [duplicate]

I have the following code: ParallelTable[ If[IntegerQ@Sqrt[80892036 + 17994 x (1 + x) (-5995 + 5998 x)], x, Nothing], {x, 6694300, 31072325}] It uses 6 ...
2
votes
1answer
65 views

Using Parallelize in a solve function

Is there a way to use Parallelize the following operation, in order to make it do the calculations faster? Or is there another way to speed up this calculation? ...
1
vote
0answers
46 views

Is it possible to generate iterators dynamically during parallel processing?

I have a parallel processing code written in Wolfram Mathematica, similar to: ...
0
votes
0answers
43 views

How to use Parallel computing on Manipulate option on ParametricNDSolveValue

My aim is to use Manipulate option on the ParametricNDSolveValue. When ever i run my code "Manipulate" option runs very slow and some time shows Aborted when check for that value of parameter it works ...
0
votes
2answers
52 views

Parallelize[] dos not parallelize sum of integrals [closed]

I am not sure why this simple command cannot be executed in parallel. Parallelize[ Integrate[ Sin[x], x] + Integrate[ Tan[x], x] ] Error message: Parallelize:...
4
votes
0answers
39 views

Lightweight Grid: transfer a file to the master kernel? [closed]

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
29 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
46 views

Parallelize and tensor calculus

Is it possible to use Parallelize with tensor calculus functions like TensorContract and ...
0
votes
0answers
27 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
51 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
219 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
35 views

Compiling simple parallel function gives inconsistent results and errors

Im trying to compile the following function: ...
3
votes
1answer
75 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
35 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
317 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
76 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
66 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
74 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 ...
6
votes
2answers
106 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
110 views

ParallelTable giving totally wrong answer

Following suggestion I created the simplest error giving code ...
1
vote
0answers
136 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
45 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
24 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
77 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
154 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)=\...
1
vote
0answers
29 views

Having trouble distributing a large association to sub-kernels

The following seems to work based on memory usage. ...

1
2 3 4 5
15