Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

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

Speeding up Fourier transform and eigenvector calculation

I have a matrix in Bloch basis (momentum space), whose I have to take Fourier transform to go to real space. Then I have to determine the eigenvectors of the matrix and study dynamics so it is very ...
-1
votes
0answers
64 views

ParallelTable gives wrong result

I define function f[v,x] which is the numerical integration of a function, and try to tabular with respect to x for different values of parameter v. The ...
1
vote
2answers
71 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....
1
vote
0answers
44 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 ...
1
vote
0answers
91 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 ...
4
votes
1answer
113 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. ...
0
votes
1answer
66 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$ ...
2
votes
0answers
49 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 ...
7
votes
0answers
143 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 ...
3
votes
1answer
73 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, ...
4
votes
0answers
50 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 ...
0
votes
1answer
68 views

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

Well, I am trying to run the following code: ...
0
votes
0answers
74 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 ...
0
votes
0answers
34 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 ...
1
vote
0answers
36 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 ...
9
votes
2answers
343 views

How to parallelize and speedup AppendTo? [duplicate]

Say I have a list of original data (for now generating random list as follows): ...
0
votes
0answers
30 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 ...
1
vote
0answers
43 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 ...
1
vote
1answer
53 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 ...
1
vote
0answers
75 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 ...
0
votes
1answer
37 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. ...
4
votes
1answer
64 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 ...
5
votes
0answers
188 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 ...
0
votes
0answers
43 views

MathLink related error on HPC

Most of the times, Mathematica gives the following error for the jobs submitted on multiple nodes in queue: ...
1
vote
0answers
46 views

What do do if Mathematica stops without error messages?

I am trying to run the relatively simple code ...
1
vote
0answers
55 views

Is FindMinimum function multithreaded? Is it worth it to use this function in ParallelDo loop? [duplicate]

I have to call FindMinimum function n times on my data. But when I put it in ParallelDo loop it works slower than in casual Do loop. I wonder what might be the case (in the loop there are no other ...
1
vote
0answers
110 views

How to limit the cpu usage of Mathematica?

I am runing mathematica with ParallelMap[], on a win10 computer with 8 physical cores. The cpu usage always rocks up to 100%, though ...
0
votes
1answer
30 views

How to create ParallelDo loop with n dimensions of evaluation?

For example if I have n=2 i get ParallelDo[something, {v[1], c[1]}, {v[2], c[2]}] and if I have n=3 I get ...
3
votes
1answer
301 views

Why ParallelTable is even slower than Table for large tensor construction?

I would like to create a large rank-4 tensor by using both Table and ParallelTable. What is actually constructed is given below: ...
2
votes
0answers
116 views

Want to revert back from version 12.3 to 12.1 but kernels no longer run in 12.1 [closed]

I upgraded from 12.1 to 12.3 and then Mathematica began randomly crashing intermittently. It's not reproducible: it crashed when I was rotating a 3D plot twice, crashed once when I tried to save a ...
4
votes
1answer
103 views

How can I reduce the memory cost of this parallel table?

The main question I was trying to obtain the piecewise cubic-spline interpolating polynomials of a series of very long lists of (x, f(x)) pairs (O(100) of them with length ~350,000), i.e. to get ...
1
vote
0answers
32 views

Running ParallelTable[] with ssh

I have a ParallelTable[] code, that runs perfectly fine on my local machine, but to speed things up a notch, I want to run it on a remote server. I configured everything in Evaluation>> Parallel ...
2
votes
1answer
75 views

Considerations for Compiling and Parallelizing Code Outside or Inside Map[]

Assume f as well as Map[f,list] are parallelizable and compilable, such that parallelization and compilation give significant ...
0
votes
0answers
50 views

parallelization works only with one kernel

I am using MMA 12.3.1 on Ubuntu 18.04, and my license support parallelization. The default kernel is Local and I create another one named newKernel. when I launch MMA and choose Local to perform some ...
1
vote
0answers
33 views

Should I use `ParallelNeeds` or `DistributedContexts`?

According to Mathematica documentation, ParallelNeeds can load packages for all kernels, while parallelized functions like ...
3
votes
0answers
50 views

Why is Quiet sometimes ineffective in parallel kernels?

I was trying to suppress some warnings while evaluating code in parallel and noticed that Quiet appears to be completely ineffective for some messages only. Using <...
4
votes
1answer
157 views

Mathematica 12.2 using only one socket

I am running some codes in parallel in a new computer and I notice that mathematica is using only one socket. The computer has two sockets with 28 cores each one as in the picture but $ProcessorCount&...
2
votes
1answer
103 views

Parallelization of two procedures inside Module

I am new in parallel programming and I am trying to speed up an old code using parallelization when possible. So I am (re)writing a function that computes two lists with the same dimensions (called <...
1
vote
0answers
41 views

Preprocessing data\[Ellipsis]. or Preprocessing data..... error in ParallelTable in Mathematica

I am working on Machine Learning. My purpose in the code is to repeat calculation a few times and average the results. While using Table command, following message pops up for ClassifiersMeasurements ...
4
votes
1answer
161 views

How can I speed up this Monte Carlo integration for the Stieltjes constant $\gamma_n$?

Pre-requisite Definition Stieltjes constants ($\gamma_n$) are the constants that occur in the Laurent series expansion of the Riemann zeta function. $${\displaystyle \zeta (s)={\frac {1}{s-1}}+\sum _{...
1
vote
1answer
55 views

Quit Mathematica script (no matter what)

I have a complicated script (not just written by me) that gets called using MathKernel -script script.m. Among others script.m ...
4
votes
0answers
64 views

Should I worry about concurrent access to LibraryLinked code?

According to these answers, when several heterogeneous results (say {MTensor, mint, double}) are needed to be returned from a LibraryLink ...
0
votes
1answer
70 views
0
votes
0answers
39 views

Clear a variable on parallel kernels

I am running the following code: SetSharedVariable[a]; a= {}; x = 1; ParallelDo[ x += i; AppendTo[a, x] , {i, 1, 3}] I want to define variable x outside the ...
0
votes
0answers
69 views

Memory leak during parallel computing

I have a memory leak during parallel computing. The problem seems to be in how a large variable is passed to kernels but I can't think of anything to fix that. Consider this simplified example: ...
0
votes
0answers
50 views

Using Mathematica to run an external bash script

This seems like a straightforward problem, but I am having trouble. I have a bash script that runs a parallel process (OpenFoam). I would like to call this script from a Mathematica Module. Processes ...
1
vote
1answer
99 views

How to speed up (or parallelize) NDSolve?

Is there a way to speed up the following code: ...
1
vote
0answers
80 views

Speeding up value reassignments in ParallelTable

I am solving a differential equation of two closed functions using ParallelTable. For the attached code, I thought the computation time should be approximately proportional to ...
1
vote
2answers
86 views

How can I test if the sum of two divisors of a number add up to a perfect square? [closed]

Let's say I have a number $n$ and I want to find the divisors of $n$, I can do that using Divisors[n]. That will generate a list ...
1
vote
0answers
55 views

Parallelizing construction of sparsearray

I'm constructing sparse arrays where blocks of each array are results of the integral defined in integralList ...

1
2 3 4 5
17