Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
8 votes
0 answers
88 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 to use AppendTo. I used to use the Reap and ...
Pedro Croti's user avatar
4 votes
1 answer
145 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
  • 69
1 vote
0 answers
89 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,185
2 votes
0 answers
82 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
75 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
  • 69
5 votes
1 answer
65 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
  • 35.9k
1 vote
1 answer
140 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
45 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
187 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
1 answer
169 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
  • 11
1 vote
1 answer
48 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
174 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
203 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
73 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
55 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
123 views

Using ParallelTable for assignment

...
Mam Mam's user avatar
  • 1,793
2 votes
0 answers
92 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
87 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,644
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
37 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
31 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
  • 767
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
52 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
  • 251
2 votes
2 answers
119 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
63 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.5k
1 vote
1 answer
109 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
109 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
56 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
0 votes
0 answers
32 views

How do subkernels return results to the master kernel?

Assume you have a large Table defined in the master kernel. I want to compute its elements in parallel. I am familiar with ParallelTable but, for my particular case,...
Yogui's user avatar
  • 1
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,612
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,793
0 votes
0 answers
35 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
85 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
  • 405
1 vote
2 answers
374 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, ...
Jorge Castaño's user avatar
0 votes
0 answers
90 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,513
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,874
0 votes
0 answers
21 views

`ParallelMap` on `TimeSeries` not working properly, operations on `TimeSeries` extremely slow

I have this data: CloudObject["https://www.wolframcloud.com/obj/25f4b06e-2c89-4909-841d-83b7888b6ed8"] which you can get by ...
atapaka's user avatar
  • 3,874
0 votes
0 answers
39 views

Parallel constructs and automatic kernel starting

The help gives an example on ParallelMap: ParallelMap[(Pause[1]; f[#]) &, {a, b, c, d}] // AbsoluteTiming I tried it and it ...
atapaka's user avatar
  • 3,874
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
0 answers
31 views

ParallelTable stuck

I have Mathematica 12.1. I generate a data dat in the form x1, x2, x3, x4, func[x1,x2,x3,x4], then interpolate it obtaining a ...
John Taylor's user avatar
  • 5,513
0 votes
1 answer
95 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
167 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
370 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

1
2 3 4 5
19