Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
1 vote
0 answers
51 views

What do the Compile options" RuntimeAttributes -> {Listable}, Parallelization -> True" mean?

I am confused about what Compile's Listable and Parallelization options do. (edit: This post is relevant: stack exchange "The option parallelization for compile") My initial assumption was ...
user avatar
  • 2,617
1 vote
0 answers
85 views

Speeding up and avoiding unwanted crash of nested Table by NearestNeighborGraph

I have a code that generates coordinate points for a 2 dimensional lattice. So the coordinates are of the form {x,y}. Now, I generate a graph out of these ...
user avatar
  • 611
0 votes
0 answers
28 views

Parallel Computation to Solve a Set of Equation and Simplify the Solution's Expression

1)I have a set of equation below : ...
user avatar
9 votes
4 answers
251 views

Parallelize two independent loops

tab = Table[Random[], {10^7}]; Block[{sum = 0, sum2 = 0}, Do[sum += tab[[i]], {i, Length[tab]}]; Do[sum2 += tab[[i]]^2, {i, Length[tab]}]; {sum, sum2}] In ...
user avatar
  • 515
3 votes
2 answers
289 views

Solving hyperbolic equation with parallelization in python by elucidating Mathematica algorithm [closed]

So! I have what seems like a rather basic hyperbolic equation to be solved written in Mathematica, with an integer input ‘n’, for which I am seeking the First {x,y} Integer solution to satisfy the ...
user avatar
6 votes
1 answer
103 views

Optimal parallelization on Apple Silicon

I have the 2021 13 inch Macbook Pro with the M1 Pro chip (with $ProcessorCount equal to 10), currently running Mathematica 13.0.0. I have had a good experience with serial computations on this chip, ...
user avatar
  • 385
0 votes
0 answers
29 views

Any idea how to use Sub Mathematica license tokens?

I use mathematica with remote kernels for which my workplace has a bunch of tokens. There are 50 tokens for Sub MathKernel which I know how to use, with some ...
user avatar
  • 265
1 vote
1 answer
47 views

Several formulas to solve the same problem: how to make Mathematica to run them all at the same time and chose the best?

Suppose you have two functions that do basically the same but with different methods. For instance, integration by Integrate and integration by Rubi package, ...
user avatar
  • 2,911
1 vote
0 answers
41 views

Parallel evaluate mathematica notebook

I have several mathematical notebooks and want to evaluate them by NotebookEvaluate[], since there are irrelevant to each other, so I think I can evaluate them parallelly. However, it seems difficult ...
user avatar
0 votes
0 answers
44 views

Compile and QPochhammer Function

I am running into trouble trying to make a listable function run in parallel. Arguably, the function that I am trying to compile is rather complicated. Whenever I run the code below ...
user avatar
  • 525
2 votes
1 answer
86 views

Different output when using ParallelDo

I think this is a very naive question which emerges from my poor understanding of ParallelDo and parallel computation in general. Suppose, I have this simple code: <...
user avatar
  • 1,092
0 votes
1 answer
95 views

Problem with file locking

Before reporting this to Wolfram I want to make sure that I am not mistaken. I am using MMA version 13.0.1 The following will lock a file and then write "Hello" into it, all in the current ...
user avatar
  • 26.8k
0 votes
0 answers
54 views

Syntax for parallel processing

I have a Do[] loop that references a few global variables but doesn't modify anything. The only output is appending data to an external file. The order of appending doesn't matter, I just can't have ...
user avatar
0 votes
1 answer
45 views

Parallelization of indepedent Do

I'm struggling understanding the syntax for parallel process. I have two Do that are independent and I would like to parallelize them, ...
user avatar
0 votes
0 answers
33 views

Why is the parallelized version so much slower here?

I evaluated the following code: spikes = Select[waveforms[[channel]], #[[2]] < thresholds[[channel]] &] and according to ...
user avatar
4 votes
1 answer
76 views

Problem with labeled functions and ParallelEvaluate [duplicate]

Bug introduced in 8 or earlier and persisting through 13.0.1 I came across behaviour of ParallelEvaluate that I do not understand. In a loop I define five ...
user avatar
  • 913
0 votes
1 answer
79 views

Parallelize for loop in mathematica

I have the following code which essentially consists of a first for loop that iterates through a very large number of rows and a small for loop that iterates through a small number of columns. The ...
user avatar
  • 111
0 votes
0 answers
60 views

Manipulation of a large list

I am doing a few fairly simple math operations on a large array with dimensions of 21600 by 43200 integers (ByteCount of 22,396,780,880 bytes) and I'm surprised at the long time that the computations ...
user avatar
2 votes
1 answer
119 views

Speed Up the Gelman-Rubin-History function

A bit of background information I have created a function to calculate the convergence of the Gelman Rubin diagnostic (useful in Bayesian analysis). The function seems to work as I want, however I ...
user avatar
0 votes
0 answers
17 views

Context problems with ParallelTable and Import/Export

I work with notebooks with contexts unique to each notebook and I want to compute a list of functions $f(z,w)$ via ParallelTable and save them to files in NotebookA ...
user avatar
  • 1,169
3 votes
0 answers
61 views

Parallel Evaluation Stops Evaluating Without Warning Message

This is my full code ...
user avatar
5 votes
3 answers
249 views

ParallelDo barely faster than Do

I am new to parallel computing, so I am trying to get a grasp as to how this works. Many posts seem to indicate that overhead (like here) is a common pitfall, but I do not see why this would be the ...
user avatar
  • 1,217
1 vote
0 answers
44 views

Parallel computing environment

In the following environment ...
user avatar
4 votes
2 answers
88 views

Limit the number of cores used

Sometimes, when Mathematica thinks it is needed, it automatically threads a computation on several cores, it can happen for NIntegrate or ...
user avatar
  • 6,164
0 votes
1 answer
80 views

Vectorise IF statement

I would like to perform an iteration on a list, component-wise. The iteration is time consuming and it would be hence beneficial to be able to stop it once an element of the list has reached a ...
user avatar
2 votes
0 answers
88 views

How to avoid running out of memory in ParallelMap?

I am mapping a function over a list of length 77237. ParallelMap[AnalyzeZernikeRecord,records] The result of each function application is just a list of 12 numbers....
user avatar
  • 1,857
1 vote
0 answers
65 views

How can I make ParallelDo faster than Do?

I am trying to optimize my code as much as possible. So first I used a compile and now I am trying to parallelize the code in order to make it faster because in the end I will need to make a loop that ...
user avatar
  • 21
4 votes
1 answer
190 views

Speeding up Fourier transform and eigenvector calculation

I have a matrix $M$ in Bloch basis (momentum space). Then I have to take Fourier transform of $M$ to go to real space. The size of this lattice in real space can be fixed to some value $N_{unit}$. ...
user avatar
  • 611
1 vote
2 answers
82 views

Parallelize elements of a vector or array

Suppose I want to calculate a vector or an array (say, for simplicity a 4-by-1 vector), but each element contains independent numerically evaluated functions $f_1,f_2,f_3,f_4$ and each takes long time....
user avatar
  • 242
1 vote
0 answers
48 views

Possible bug: Wrong differentiation of ParametricFunction inside Parallelize?

In the note RootSearch problem when called from within ParallelDo I described the problem with Ted Ersek's RootSearch package and came to the conclusion that it is ...
user avatar
1 vote
0 answers
120 views

RootSearch problem when called from within ParallelDo

I have been using Ted Ersek's RootSearch package for Wolfram Mathematica for many years. The package worked great, including inside the ...
user avatar
4 votes
1 answer
120 views

ParallelTable/ParallelDo for Newton's Method doesn't work [closed]

We run such ParallelTable based on @Syed https://mathematica.stackexchange.com/a/261603/54516. ...
user avatar
  • 1,756
0 votes
1 answer
94 views

Trying to speed up finding solutions of quadratic form related to the weight of a matrix

Say I have an integer matrix of size $5 \times 5$ - I am trying to find the solutions to the equation $n^4 wtM = n w^2 + x1^2 + x2^2 +x3^2 +x4^2 + x5^2$ subject to the constraints $x1+x2+x3+x4+x5 = 0$ ...
user avatar
  • 525
2 votes
0 answers
66 views

Set Default System Options

I have a new Mac M1 machine and am getting Mathematica set up on it. I noticed that when I run some simple benchmarking tests, for example matrix diagonalization, the code runs significantly slower if ...
user avatar
7 votes
0 answers
155 views

Are all MMA computations single-core unless explicitly parallelized?

I was wondering if the WolframMark Benchmark uses more than one core. This becomes relevant when comparing Benchmark scores between, say, 4-core and 8-core machines. I looked at Benchmark's code, and ...
user avatar
  • 3,456
3 votes
1 answer
77 views

Parallel Cellprint Not Rendered

I'd like to parallelly construct cells (possibly dynamically updating ones) and output render them on the front-end. However, I found this is not working. For example, ...
user avatar
  • 777
4 votes
0 answers
62 views

A WolframKernel (with PID) is created by a LocalSubmit. After the LocalSubmit finishes its job, the kernel remains. How to kill it within Mathematica?

When defining a task with LocalSubmit, a new subkernel is created. When you remove the task after the task is done, the task is removed but the subkernel remains ...
user avatar
  • 375
0 votes
1 answer
71 views

Parallelization in While[] loop when testing if a condition is met

Well, I am trying to run the following code: ...
user avatar
  • 1,723
0 votes
0 answers
76 views

Effectively using all CPU cores while exporting a sequence of plots

In Wolfram Mathematica 12.3.1 on macOS I use Do[Export i-th plot to PNG file,{i,LargeNumber}] to generate a sequence of plots. This works well, but I noticed that ...
user avatar
  • 339
0 votes
0 answers
36 views

Parallel Table dont use Paralization after long calculation

at first: This is my first post and I hope you understand me. If I made any mistakes how to write a question please feel free to correct me. Now to the question. I wrote a module which evaluates a ...
user avatar
  • 1
2 votes
0 answers
44 views

What is the difference between "SessionSubmit" and "LocalSubmit" in performance?

Does SessionSubmit forward the computation to the master thread and LocalSubmit to some other idle thread? By thread, I mean CPU ...
user avatar
  • 375
9 votes
2 answers
358 views

How to parallelize and speedup AppendTo? [duplicate]

Say I have a list of original data (for now generating random list as follows): ...
user avatar
  • 157
0 votes
0 answers
45 views

Launch remote kernels on the cluster node

I run the Mathematica front end with Xterm on main machine of Unix cluster. It can start parallel kernels locally ...
user avatar
2 votes
0 answers
54 views

Parallel kernel configuration settings missing on MacBook ARM

$Version (* 12.3.1 for Mac OS X ARM (64-bit) (July 8, 2021) *) In the preferences panel, the parallel kernel settings are missing. Evaluating ...
user avatar
1 vote
1 answer
57 views

Data parallelism for independent probabilistic trials

I'm considering the best way to implement the data parallelism features of Mathematica for a specific task. To that end I have a minimal code example below which contains the basic features of my ...
user avatar
  • 271
1 vote
0 answers
93 views

Increase the speed of Machine learning based on 'Predict'

I am training a ANN model with a large dataset (~million level) using Predict or NetTrain function. I do not have a GPU machine but have a server equipped with 16 CPU cores. How can I maximize the ...
user avatar
0 votes
1 answer
42 views

Cannot retrieve a function definition from file after save with ParallelDo

This is an example of a problem I have retrieving functions from a file I save using ParalleDo. ...
user avatar
  • 1,169
4 votes
1 answer
70 views

Why are DownValues of symbols in System` such as CircleDot not distributed to subkernels?

Consider a symbol in System such as CircleDot. I want to redefine this symbol and distribute the definition to subkernel, to use ...
user avatar
  • 7,319
5 votes
0 answers
191 views

How to allow one process to take advantage of all available cores while other processes run in parallel?

I have to run multiple tasks simultaneously: Data download from stock exchange during live market session and append it to a global variable. Process the data by taking the data from the front of the ...
user avatar
  • 91
0 votes
0 answers
63 views

MathLink related error on HPC

Most of the times, Mathematica gives the following error for the jobs submitted on multiple nodes in queue: ...
user avatar
  • 902

1
2 3 4 5
18