Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
1
vote
0answers
30 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 ...
3
votes
0answers
130 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
30 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
42 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
90 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
28 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
289 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
93 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
100 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
28 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
68 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
46 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
27 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
43 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
150 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
87 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
40 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
151 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 _{...
0
votes
1answer
52 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
61 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
59 views
0
votes
0answers
36 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
66 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
49 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
81 views

How to speed up (or parallelize) NDSolve?

Is there a way to speed up the following code: ...
1
vote
0answers
77 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
78 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
53 views

Parallelizing construction of sparsearray

I'm constructing sparse arrays where blocks of each array are results of the integral defined in integralList ...
1
vote
0answers
69 views

Definite integral gets stuck in the calculation

$f=\frac{\sinh ^{-1}\left(e^{-2 k t} \sinh (6 k)\right)}{2 k}-2$ for $k=20$ I have: $\frac{df}{dt}=-\frac{e^{-20 t} \sinh (60)}{\sqrt{e^{-40 t} \sinh ^2(60)+1}}$ ...
0
votes
1answer
72 views

How to use parallel computation in mathematica for numerical Integration

I have a multi dimensional integral and I need to integrate it numerically and than plot it over an extra variable for zeta = 0.5. ...
1
vote
1answer
39 views

ParallelSum issue inside package

I have the following very simple package with only one external function SumSeries[]: ...
0
votes
0answers
33 views

Error using ParallelMap to evaluate NIntegrate of numerical derivative ND

I want to evaluate a numerical integration in which the integrand is constructed out of a function f and its derivative f'. <...
5
votes
1answer
117 views

Parallel/Multi-thread element code generation using AceGen

I am using AceGen to generate source code for finite element simulations in AceFEM. I have elements with a very large number of vertices/degrees of freedom which can take a very long time to compile. ...
0
votes
0answers
45 views

How to resolve these errors that pop up when using 'Compile' for a large function? [duplicate]

The problem I have been wanting to make my code which solves an optimisation problem faster. This led to this question on here and I realised from there that the root of the problem is the very slow <...
0
votes
0answers
34 views

Handling large data generated by a script file (using parallelization in Mathematica)

I want to write a script file Script_file.m which I am going to run on a server and collect all the data in a file named ...
1
vote
1answer
64 views

Why the computation time is shorter in this case?

The task I would like to compute the Lorentz transformation $\mathbf{p}'$ of an arbitrary 3-momentum vector $\mathbf{p}$ given a boost characterized by some other momentum vector $\mathbf{p}_{N}$. The ...
3
votes
3answers
77 views

How to avoid duplicating the same data on the master kernel into each subkernel?

I have found the same question Avoid copying memory for each subkernel However, there was no proper answer. This question was posted in 2015. Now it has been 6 years. So, I wish to find the solution ...
0
votes
0answers
51 views

How to parallelize Total[]?

I have a list of length ~10^4, with each element being a power series (SeriesData expression). The list has been computed by an earlier part of the code, but I'd like to sum up the list. The Total ...
0
votes
0answers
43 views

Can Predict/Classify/NetTrain be parallelized over multiple computers (kernels)?

A similar question was posted more than five years ago here and I was wondering if anything has changed and whether there is a way to parallelize Classify/Predict/NetTrain now. More specifically, ...
2
votes
0answers
42 views

ParallelTry Hangs on previously working code

When I run the below ParallelTry command, it just sits on it and says its being evaluated, but I cant abort it, it doesn't return what I am expecting, and I have to ...
2
votes
0answers
25 views

Save the internal state of each kernel and start the computation again later

I use ParallelEvaluate[], inside that is a lengthy code, many variables are calculated and updated may times, lets say a=..., b=..., c=... Lets say I want to stop calculation once, and start ...
15
votes
1answer
919 views

Metropolis-Hastings Algorithm - Significantly slower than Python

I would like to code a Metropolis Hasting algorithm and thought I would get the general scheme of things going with a toy example. I think I got it running but my Mathematica code runs significantly ...
5
votes
3answers
238 views

Speeding up FactorInteger for product of two primes

I have a large integer $N$ of size about 10^150. I know that $N$ is a product of two primes $p$ and $q$. I also know that both $p$ and $q$ are of roughly equal size, so one of them is not, for example,...
7
votes
1answer
154 views

Fast Evaluation of a series of dot product

Context I have a function that depends on 3 real variables x,y and z and that is defined by a series of matrix products. The evaluation of f for a specific (x,y,z) is fast ~0.02 sec but I want to ...
2
votes
0answers
61 views

Can I parallelize this function?

Can I and should I parallelize this function ? my aim is to have faster calculations below is a toy function in which I kept the structure of the real function I am using. It uses ...
0
votes
0answers
51 views

ParallelTable of NIntegrate of an Interpolating Function

I construct a 2D interpolating function using the following data (MWE): ...
0
votes
0answers
38 views

Memory leak while using ParallelTable

I am populating a table using ParallelTable. The entries of this table are given by a function written as a module, which depends on several modules itself. Here's a rough skeleton of the code: ...
1
vote
1answer
48 views

Unique symbol for parallel kernels

For each kernel, a unique symbol can be generated with Unique[]. However, since it's basically defined by the growing ...
0
votes
0answers
52 views

How to improve the parallelization of the following piece of code?

I'm new to the parallelization of code. I have a code that takes so much time to run and I'm trying to parallelize it. I'm copying below the piece that I need to improve. Can someone help with the ...

1
2 3 4 5
17