Skip to main content

Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
3 votes
1 answer
79 views

Kernels die running parallel Eigensystem[]

I am diagonalising random (real) symmetric matrices M of sizes N up to $\sim 10^3$, doing it around $5.10^4$ times. For $N\ge330$, some kernels seem to die during the evaluation of Eigensystem[M] in ...
Kaio's user avatar
  • 85
0 votes
0 answers
17 views

ParallelTable: an unknown box name (TerminatedEvaluation) was sent as the box form for the expression [duplicate]

This seems to be a bug? The example code for MMA v.13.0 is: ...
Confuse-ray30's user avatar
0 votes
0 answers
49 views

Feyncalc computations using parallel computing (multicore computing)?

I'm doing very long computations with FeynCalc (they're dimensional regularizations of diagrams with a lot of D-dimensional metric and D-dimensional momentum contractions like Contract[ MTD[$\alpha,\...
adlc's user avatar
  • 1
12 votes
0 answers
171 views

How to parallelize Reap and Sow in Mathematica 14.0.0?

I'm working with a huge amount of data, so I'm avoiding using AppendTo. I used to use the Reap and ...
Pedro Croti's user avatar
4 votes
1 answer
169 views

Effective use of idle cores when using parallelization

Assume I have 10 cores in a CPU. And I run ParallelMap on them: LaunchKernels[10]; ParallelMap[F1,L1]; where L1 is a list of ...
seva011's user avatar
  • 316
1 vote
0 answers
95 views

The first step to Speed Up using GPU

If we run the following code, mathematica kernel uses only CPU : LinearOptimization[ x + y, {x + 2 y >= 3, x >= -1, y >= -1}, {x, y}] I want the ...
imida k's user avatar
  • 4,295
2 votes
0 answers
92 views

ParallelTable does not execute in parallel

I would like to construct a Table in Parallel in Mathematica. However, it only uses one Kernel for the calculation, the others run idle. My code looks like this (I will remove a big chunk of the ...
Julpe's user avatar
  • 21
2 votes
0 answers
83 views

Optimizing prallel computing for nested integration

I need an advice for optimization of computing with ParallelMap, as well as general hints to speed up computing discussed below. I have several questions about this ...
seva011's user avatar
  • 316
5 votes
1 answer
68 views

Is it possible to force ParallelDo to periodically close and launch subkernels?

I have a function f which calls an external library that has a memory leak, so I kind of have to live with it. I call this function thousands of times within ...
Greg Hurst's user avatar
  • 36.2k
1 vote
1 answer
145 views

Parallelized Monte-Carlo

I'm trying to do a little Monte-Carlo, and the code is working great, but slows down when I try to increase the number of iterations, any suggestions on how I can parallelize this? Every way I've ...
Daniel's user avatar
  • 115
2 votes
1 answer
47 views

Understanding Parallelization

I'm starting to use Mathematica's parallelization more frequently, and noticed an oddity I would appreciate to be explained. Please feel free to correct my terminology. When on the main kernel, ...
Chloe's user avatar
  • 165
3 votes
2 answers
194 views

Speed up the evaluation of For loop

I am writing a script to simulate the spins. I have used "For" loop, but the execution takes long time as I have a lot of dataset. Has there any way to make it faster ? Here is the code: <...
P Pyne's user avatar
  • 453
1 vote
2 answers
240 views

Mathematica Not Seeing All CPU Cores

I have a machine with 112 CPU cores, but $ProcessorCount reports only 32 cores. Windows 11 sees all 112 cores, and other applications are able to use them, but Mathematica only sees 32. Any idea how ...
Zoid's user avatar
  • 13
1 vote
1 answer
49 views

Sending definitions from the kernel to the subkernels: unnexpected differences for functions and variables

I don't understand the strange behaviour below. Is this expected? ...
Davi's user avatar
  • 671
1 vote
0 answers
86 views

Attempt to find a solution (out of potentially many) to a system of equations with FindInstance runs forever or crashes

I have a system of equations that in principle should have a solution (I would think not a unique one), which I want to solve. I am not interested in all solutions; I just want to locate one, assuming ...
AG1123's user avatar
  • 571
0 votes
0 answers
71 views

Retrieving cached definitions from subkernel into the main kernel during parallelization

I am trying to do a computation that takes a lot of CPU time and it is quite computationally intensive. I want to make it Parallel instead of serial to compute the results faster. Things I tried: <...
Khushal's user avatar
  • 31
1 vote
1 answer
181 views

Performance of polynomial functions in Mathematica vs Python [closed]

I am trying to compare the performance of Mathematica vs Python for vectorized operations involving polynomials. The data is floatMatrix which has dimensions (...
mmen's user avatar
  • 163
5 votes
2 answers
207 views

How to make FactorInteger iterative?

I want to factorize big numbers like 10^100. FactorInteger with no Automatic option can take a lot of time and as I know there ...
Андрей Яндуганов's user avatar
2 votes
1 answer
74 views

Parallel evaluation of Do loops [closed]

This is my first time trying to implement a parallel computation in Mathematica and my question could be very naive. I would like to ask how I can best implement the following: I have several Do loops ...
N P's user avatar
  • 21
0 votes
0 answers
69 views

I am having problem with initialization of parallelization in Mathematica

I have been using parallel computing in Mathematica for a couple of months. Today suddenly, parallel kernels are not starting. Can anyone tell me what can be the potential reason? ...
INDRANIL MAITI's user avatar
2 votes
2 answers
124 views

Using ParallelTable for assignment

...
Mam Mam's user avatar
  • 1,863
2 votes
0 answers
98 views

Asynchronous parallelization of LLM calls

The new LLM functionality in Mathematica 13.3 is really quite slick. But it is often the case that one wants to apply it to many items in parallel, i.e., to submit many jobs simultaneously. The ...
Joshua Schrier's user avatar
1 vote
0 answers
36 views

Sending definitions from the subkernels to the kernel

Sometimes it is convenient to define an indexed quantity g[i] as in f[i_] := (Pause[5]; i^2); Do[g[i] = f[i], {i, 10}]; A ...
Davi's user avatar
  • 671
5 votes
1 answer
88 views

Is it possible to improve the speed where parallelization is not efficient?

I tried to use Parallelize but did not boost the speed. how can improve the speed? ...
MMA13's user avatar
  • 4,732
1 vote
0 answers
15 views

How can I distribute computations requiring socket connections with ParallelSubmit?

I have two computers over which I would like to distribute some large-scale computations. On each computer there is a TCP server, written in another language, that listens for requests and return the ...
Shredderroy's user avatar
  • 5,249
0 votes
0 answers
39 views

Parallel Computing in the cloud

I'm currently processing a large dataset created from a search log of around 2.5 million entries using association rule mining. The pre-processing of the data alone to extract entities from the search ...
Nicholas Walton's user avatar
1 vote
0 answers
32 views

Getting DownValues from memoized function - ParallelEvaluate only uses one kernel at a time

I have the following code where I calculate primorial(n) using a memoized function. When I run this function in ParallelDo everything is fine - the calculation runs on 8 kernels. But I want to use ...
1729taxi's user avatar
  • 777
1 vote
0 answers
39 views

Parallelization with procedural functions, e.g. `AddTo`, `PreIncrement`, and so on

I have a problem that procedural functions don't work with parallelization, e.g. AddTo and PreIncrement. At first, I thought it ...
Taiki Bessho's user avatar
1 vote
1 answer
54 views

ParallelTable and NC polynomial simplification

I use NC algebra to apply simplification rules on non commutative polynomials. I would like to treat a huge number of polynomials, ~200, so I would like to run these computations in parallel. However, ...
Goupildz's user avatar
1 vote
0 answers
40 views

ParallelDo behaves unexpectedly (that is, against my expectations!) [closed]

Here's an example of a Do loop that performs as expected. (I realize that the DO loop is not the optimum construct here but my real work has a much more complicated structure so I've reduced to a ...
jmm's user avatar
  • 271
2 votes
2 answers
123 views

Speed up NDSolveValue

I'm trying to solve this differential equation to obtain the density matrix elements $\rho$. $$\frac{d\rho}{dt}=-i\Big(H_{0}(t)\rho(t)-\rho(t)H_{0}(t)\Big)$$, for Hermitian Hamiltonian $$H_{0}(t)=\...
Radmehr's user avatar
  • 51
1 vote
1 answer
66 views

Perform two computations in parallel without using ParallelTable or ParallelMap

I have two functions, f and g, that I wish to apply to large data sets, data1 and ...
Andrew's user avatar
  • 10.6k
1 vote
1 answer
119 views

Issue loading SubKernels`RemoteKernels` package for remote kernels in Mathematica

I am encountering a problem when trying to load the SubKernels`RemoteKernels package in Mathematica. The purpose of loading this package is to set up remote kernels ...
Canonical's user avatar
1 vote
0 answers
112 views

Random Seed and Parallelization in Compiled Functions

I am having trouble reproducing a random number from a compiled function with parallelization even with the random seed being set. Specifically, running the following script should give the same value ...
Kohei's user avatar
  • 11
1 vote
0 answers
66 views

Problem of " The kernel is not responsing to dynamic evaluation "

I am having this error again and again while using parallel computation. The code is fine because it runs when I am not using parallel computation. But as it takes a lot of time to run ( around 3 - 4 ...
INDRANIL MAITI's user avatar
5 votes
1 answer
85 views

Custom Graphics primitives can't work with parallel Rasterize

I tried to create Graphics primitives using the techniques in this, found problems with parallel rasterization ...
expression's user avatar
  • 5,652
0 votes
1 answer
68 views

How to use ParallelTable and Eigensystem in right way?

I have the next matrices: ...
Mam Mam's user avatar
  • 1,863
0 votes
0 answers
36 views

I am having problem in paralleltable and parallel sum ( Parallel computation in Mathematica)

You will receive the code here I want to do parallel computation here because I have planning to go further level and it will take a much longer time. I could not understand what this error means and ...
INDRANIL MAITI's user avatar
0 votes
1 answer
93 views

What is the most concise way to parallelize over all Table components at the same time?

Question statement: Consider a Table with any number of indices {i,1,imax},{j,1,jmax},{k,1,kmax},.... Now I want to apply the same independent operation to each one ...
Void's user avatar
  • 415
1 vote
2 answers
376 views

Parallelize a "For" cycle

I'm trying to parallelize a simple routine inside a "for" loop. Essentially, I need to compute the roots of a function $f(x)$ that depends on the discrete parameters $d$ and $R_0$. However, ...
Albus Black's user avatar
0 votes
0 answers
98 views

How to prevent Mathematica from maximum CPU usage?

I have a high-demanding Mathematica task that uses Compile and turns on parallelization. While evaluating, it always consumes around 100% of CPU. Could you please tell me how to reduce the maximal ...
John Taylor's user avatar
  • 5,827
1 vote
0 answers
51 views

Comparing performance of `ParallelMap` with pure function

Test data are here: q = CloudGet[ "https://www.wolframcloud.com/obj/874e3b18-808a-404a-aaa0-4e3ad1ac4668"]; I construct interpolation and an equi-...
atapaka's user avatar
  • 3,954
3 votes
2 answers
126 views

Efficient method (maybe parallel method) to calculate a 256$\times$256 matrix?

I want to calculate a matrix of shape 256$\times$256 as follows ...
narip's user avatar
  • 381
1 vote
0 answers
22 views

Incorrect result for parallel run to calculate a Do loop? [closed]

I want to calculate the following Do loop Clear["Global`*"]; pmat = ConstantArray[0, {4, 4}]; ParallelDo[pmat[[i, j]] = i*j, {i, 1, 4}, {j, 1, 4}]; pmat ...
narip's user avatar
  • 381
0 votes
1 answer
99 views

How to start another notebook calculation when one notebook is running?

If your first notebook is running and needs a long time to finish, but you still need Mathematica to do other calculation in another notebook. The second notebook will not start until the first ...
fhrl's user avatar
  • 129
2 votes
0 answers
70 views

Argument value loss using Listable C-Compiled Function

In my recent studies, I have come across a very strange anomaly with C compiled functions. When I call a function that has the 'Listable' attribute while global variables are accessed through ...
Michael Haring's user avatar
5 votes
0 answers
170 views

Target Device->"GPU" Not Working For Machine Learning: LibraryFunction error

I'm running Wolfram Desktop version 13.2.1, and after downloading Visual Studio, Nvidia Toolkit version 12.1 and 11.2, and verifying that ...
Daniel Berkowitz's user avatar
9 votes
2 answers
372 views

Efficient way to store the terms of a summation in a list?

I have two matrices, A and B of the same dimension $Nr\times Nc$, with $Nr\gg Nc$. Essentially, I am trying to put all the terms ...
Saúl Herrera's user avatar
3 votes
1 answer
67 views

What is the optimal way to get selected elements from a matrix?

I have a 2x2 matrix "M", and a list "ind" containing pairs of indices. M = {{a, b, c}, {d, f, g}, {h, i, j}}; ind = {{1, 2}, {1, 1}, {3, 1}}; I ...
Saúl Herrera's user avatar
3 votes
1 answer
41 views

Parallel Kernel inheritance problem for Protect

for the following program: Unprotect[Power]; Power[0, 0] = 1; Protect[Power]; ParallelTable[0^0, {4}] I have the following result: (kernel 1) Power::indet : ...
Franck's user avatar
  • 391

1
2 3 4 5
19