Questions tagged [parallelization]
Questions on parallel computing in Mathematica.
894
questions
0
votes
0
answers
16
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 ...
0
votes
1
answer
78
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 ...
2
votes
0
answers
53
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 ...
5
votes
0
answers
109
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
...
0
votes
0
answers
22
views
Running two different functions in parallel in the same kernel session
I have a written a program with several helper functions, but in which two functions, fun1 and fun2, do the real work: they run ...
8
votes
2
answers
345
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 ...
3
votes
1
answer
63
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 ...
3
votes
1
answer
30
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 : ...
1
vote
1
answer
46
views
Variable replacement not working in ParallelTable
The following code produces different results using Table and ParallelTable. K and ...
0
votes
0
answers
37
views
How to plot a function efficiently without having to recalculate
I have to make a lot of graphs for two different functions Nzzp (which can be computed quickly without problem) and NzzG which requires three numerical integrations in a row so I'm using paralleltable ...
2
votes
1
answer
47
views
Why it is not possible to Append list in ParallelDo?
I'm trying to run long calculations, so I need to run it in parallel. I'm running two nested Do, and it works fine until I put ...
0
votes
1
answer
36
views
function with parallel iterations
coprimesParallelIter[n_] := DistributeDefinitions[GCD];
ClearAll;
ParallelTable[If[GCD[i, n] == 1, i, Nothing], {i, 1, n - 1}] //
Flatten // DeleteCases[Nothing]
...
1
vote
0
answers
71
views
Mathematica does not recognize all CPU kernels/cores [closed]
I am using Ubuntu 22 and Mathematica 13. According to the description of my laptop I should have four CPU cores, as seen in the following screenshot:
However, Mathematica only seems to recognize two ...
3
votes
1
answer
80
views
Parallel computing doesn't use my own settings
To differentiate the conjugate of a function,
I used such settings.
...
0
votes
0
answers
21
views
Monitoring progress & feeding new job to subkernels which finished their computations via ParallelEvaluate
Although the question is abstract, please suppose that we have a task that needs a large data and corresponding memory consumption, but we would like to parallelize it.
The large data is assumed now ...
1
vote
0
answers
33
views
How to configure and acess Remote Kernel step-by-step?
I want to access a kernel from another computer. However, I have no idea how to set up the remote kernel and how to access it. I have gone through a lot of articles on this website and others, but ...
3
votes
0
answers
74
views
What is the correct way to create an animation in parallel using the result of NDSolve?
For example, in the following code ParallelTable takes 23 minutes:
...
0
votes
1
answer
64
views
Why, if you write the expression in the form of two functions, does the code stop working?
I would like to find the minimum of the function EER[a, v] using parallel computing.
If I write the code like this, it works:
...
2
votes
0
answers
72
views
Restart kernel after each evaluation in Table
I am trying to integrate a two-dimensional function purely numerically. For one coordinate the integrand can oscillate rapidly while for the other coordinate the integrand is not behaving in a special ...
0
votes
1
answer
39
views
How to fix 'NIntegrate: Overflow/Indeterminate/infinity for all sampling points in the region (...)"
I have a function Nφ0 which depends on another two functions G1 and G2 that are being integrated numerically in a row as:
...
0
votes
0
answers
42
views
Efficiency in a use of ParallelMap[]
Suppose M is a large and relatively dense symbolic matrix. I am interested in applying F[] (...
1
vote
1
answer
86
views
My ParallelDo does not work
I have to do a lot of calculations that take lot of time, and using a Do loop is simply too long. It is the first time I am using ...
0
votes
0
answers
54
views
FrontEndObject::notavail ; ParallelSubmit unable to plot using Monitor
I'm trying to Run two processes simultaneously;
...
1
vote
2
answers
116
views
How to parallelize this while statement?
I have the following calculation
k = 1; While[! (PolynomialMod[x^k - 1, poly , Modulus -> 2] === 0), k++]; k
where poly is a given polynomial. If the polynomial ...
0
votes
0
answers
38
views
How does one turn off the new Parallel evaluation monitor in Mathematica 13.1?
There is a new dynamic console message that keeps popping on and off on Mathematica 13, which does not turn off if I uncheck "Enable parallel monitoring tools" in the Parallel Kernel ...
0
votes
0
answers
52
views
Parallel Create and Save Variables in Separate Files
I want to create a large number of variables, store data in them and then DumpSave each variable in a separate .mx file.
Here is a toy version of the problem:
...
3
votes
2
answers
57
views
EntityStore and Parallelization
I have created an entity store for financial data, as follows:
It generally works well, except that when I try to use parallelization, it fails. For example:
first distribute the definition of the ...
0
votes
1
answer
72
views
Problem with NMinimize and NonlinearModelFit
I have data points of some experiment and system of ODE, that approximate this data.
...
0
votes
0
answers
30
views
Use the progress report to tweak my performance in ParallelComputation
I run a parallel sum over 4 indices with 2x8x152x8=19456 elements.
I get a progress report that looks like this
...
0
votes
1
answer
65
views
How can I use FeynCalc in ParallelTable or ParallelSum?
I want to speed up a FeynCalc calculation. However I found out that it doesn't seem to work in ParallelSum or ParallelTable.
MWE:...
1
vote
0
answers
39
views
In version 13, WSTPServer cannot execute LaunchKernels[]
When I execute LaunchKernels[] or Kernels[], I get the following errors.The output of Kernels[] is {}.
"WSTPServer" is not among the known evaluation environments
{Session, RemoteSession, ...
2
votes
0
answers
86
views
Fast value extraction for refreshing large data
I am trying to fine tune a procedure to reduce its running time. It involves two large arrays "data" and "positions":
...
0
votes
0
answers
39
views
How to "freeze" a parallel program
I wrote a program, parallelized it (using ParallelDo[], SetSharedVariable[] etc.), and enjoyed the wonderful speedup. ...
0
votes
0
answers
35
views
Heuristic rules for CriticalSection[]
I am new to concurrent programming. While parallelizing a Do loop with ParallelDo, I found some rules to obey to program more easily. Could you please check whether these rules are correct in most ...
2
votes
0
answers
60
views
Parallel image comparison function keeps increasing memory
I have written the following code to align two arbitrary images:
...
2
votes
0
answers
46
views
OpenCL How to read and write to VRAM array
I am quite a newbie to OpenCLLink. My program needs to perform some heavy computations on GPU including solving the eigenvector problems. Since I didn't find a straightforward implementation of this ...
13
votes
1
answer
267
views
How can CompiledCodeFunctions be optimized and parallelized?
Fast generation of random variates as test case
The earlier question (195435) about performance tuning with regard to fast generation of random variates for a gamma distribution has stirred my ...
1
vote
0
answers
61
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 ...
3
votes
0
answers
147
views
Speeding 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 ...
0
votes
0
answers
64
views
Parallel Computation to Solve a Set of Equation and Simplify the Solution's Expression
1)I have a set of equation below :
...
9
votes
4
answers
280
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 ...
3
votes
2
answers
337
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 ...
6
votes
1
answer
199
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, ...
0
votes
0
answers
37
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 ...
1
vote
1
answer
50
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, ...
1
vote
0
answers
80
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 ...
0
votes
0
answers
50
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
...
2
votes
1
answer
92
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:
<...
0
votes
1
answer
103
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 ...
0
votes
0
answers
63
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 ...