Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
5
votes
3answers
207 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
139 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
59 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
32 views

ParallelTable of NIntegrate of an Interpolating Function

I construct a 2D interpolating function using the following data (MWE): ...
1
vote
1answer
42 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
30 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: ...
0
votes
0answers
51 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 ...
0
votes
0answers
72 views

An issue with ParallelTable

Consider a function function[x_,y_,method_,distr_]:=NIntegrate[distr[x,y,z,t],{z,zmin[x,y],zmax[x,y]},{t,tmin[z,x,y],tmax[z,x,y]},Method->method] Here, ...
6
votes
1answer
97 views

Efficient construction of a SparseArray from LIL (list of lists of column entries)

In Python scipy.sparse, there are methods to convert between CSR, CSC, LIL, DOK, etc. implementations of a sparse matrix. What is the most efficient way in Mathematica to construct a ...
0
votes
1answer
283 views

Parallelizing NDSolve

I have a system of 300 coupled linear ODE's, which takes days to solve with NDSolve (i.e. but it's basically not possible to solve it since it requires >100 gigabytes of RAM). In other posts, I read ...
1
vote
1answer
34 views

Manipulating ScalingFunctions for several Plots inside Table is working, but not working inside ParallelTable

I've encountered a problem I can't make sense of: I'm combining the ListPlot of a HPLC chromatogram (called bgcorrected in this case) with a ...
0
votes
0answers
33 views

Why does Mathematica 12.1 fail to launch available parallel kernels

I am running Mathematica 12.1 on Windows 10 Enterprise from a local PC with 24 cores using a remote site licence from my University. Under Parallel Configuration I have requested 24 local kernels (...
2
votes
2answers
106 views

What is the cheapest method to get cloud computing, remote kernels, HPC access, connection to clusters or GPUs?

I want to be able to run parallelisable tasks quicker and on better hardware. Are there any services that can easily do this with my personal copy of Mathematica?
0
votes
1answer
50 views

Parallel evaluation produces wrong result

Consider the following code: ...
0
votes
0answers
24 views

parallel computation fails

I have a code that evaluates matrix elements. It works correctly in sequential mode (one Kernel). It involves a custom function BariVi which is declared earlier and ...
0
votes
0answers
45 views

Finding if a number is perfect square [duplicate]

I used the following code to found if a specific number is a perfect square: ...
11
votes
4answers
2k views

Why is ParallelTable slower than Table?

Update Following a comment of Szabolcs have changed Timing to AbsoluteTiming. The results are virtually the same. Original post I have accidentally observed the following surprising result. So, why ...
5
votes
1answer
179 views

Parallelizing NDSolve and Parareal method

I found this video on Youtube outlining a method for Parallelizing NDSolve https://www.youtube.com/watch?v=6TiO3nRWZ_U. Does anyone know what the current update is on this? I tried to implement in ...
0
votes
0answers
38 views

Run Batch Job on more than One node of HPC

In continuation of the previous Ques; I am able to run successfully my batch job on one node of HPC through- pqsub -n 40 -t 1 -q atulya run.sh #atulya is HPC and at ...
1
vote
2answers
159 views

Fast way to check if $f(x)>x$ for what value of $x$

In order to find the value $x$ for which $f(x)>x$, I tried it using the following code: ParallelTable[If[TrueQ[f[x]>x],x,Nothing],{x,0,10^9}] For some ...
3
votes
2answers
1k views

How to parallel this nested table efficiently?

I have an 8 core CPU and want to parallel evaluate the following nested Table Table[Table[expr[i,j], {i,1,10}], {j,1,4}] But ...
1
vote
0answers
27 views

Easiest Way To Parallelize Derivatives

What I would like to do I have a Lagrangian (a scalar). Of this function I take the derivative w.r.t. to metric-components. Of the result, I take again a derivative. The formula looks like $\partial_a\...
0
votes
1answer
40 views

EvaluationObject not appearing

By using ParallelSubmit[1 + 2] the output is simply EvaluationObject[16,1+2,<>] I was expecting to see . Even in the ...
0
votes
1answer
134 views

Update initial conditions recursively/sequentially within ParallelTable using NDSolve

I am modelling 3D motion of particles inside a force-field using second-order coupled PDEs, which I solve from time t=t0 to t=t1 with initial conditions x0,y0,z0. I have a total number of "particles" ...
1
vote
0answers
72 views

Launching All Unoccupied Threads as Kernels [CPU Usage Assessment with Mathematica]

I'm working on a PC with 10 processor cores (20 threads), so it can support 20 concurrent computations. I often run simulations in the background on my PC such that some fraction of these, say 12, ...
2
votes
0answers
44 views

ParallelTable never ends on simple ContourPlot loop

Context I am interested in solving Transient Gray Scott equations. Following the documentation: I define the equations ...
0
votes
1answer
136 views

Running Mathematica package on supercomputers by parallelizing it

a) I am thinking of installing Mathematica on supercomputers of my center. and running programs by parallelizing it for faster computations. But I was told that running Mathematica on supercomputers ...
2
votes
1answer
82 views

Parameter space search routine is too fast?

I wrote a small script to comb through the parameter space of a function looking for where the function satisfies a certain relation everywhere on its (co-ordinate space) domain. However, since I am ...
0
votes
1answer
99 views

Parallelizing FindMinimum

I have complicated 6-dimensional function to optimise. Using FindMinimum works all right, but takes a few minutes. Considering that I want to check multiple starting points, I'm looking at run times ...
1
vote
0answers
53 views

Optimizing a parameter space search

This is related to my previous question: Solve for parameters so that a relation is always satisfied The Problem I am searching the parameter space of a large (many terms) function to find where the ...
1
vote
1answer
25 views

How to share multiple “tagged” functions (symbols) like f[a][b] in parallel kernels?

I would like to give some context: I need to analyse many data sets stored in files using different kind of analyses. To keep track I like to tag each results of my analysis for example like ...
5
votes
1answer
290 views

Right syntax to launch multiple kernels on SLURM cluster

Important: sometimes you may need to modify the kernel location. In my case I had to find the kernel location explicitly by executing which wolfram command in the ...
1
vote
1answer
41 views

How to collect results from compiled function in ParallelEvaluate?

I am using Mathematica 12.x and have a compiled function, returning many things. I would like to run several instances of this compiled function, one for each core of my CPU, and then collect all of ...
0
votes
1answer
72 views

Use of ParallelDo with an iterative or recursive calculation

Is it possible to use ParallelDo (or any similar parallelization method) to speed up the calculation of an iterative calculation, which takes a previous calculation ...
6
votes
1answer
139 views

Is there a clean way to parallelize multi-index tables?

The documentation of ParallelTable indicates that if you want to parallelize the evaluation of a table of more than one dimension, such as ...
0
votes
0answers
22 views

If statement in dynamic cluster query

I use a High-Performance Cluster for some of my work. I can dynamically see the state of the work but I couldn't use the If statement in the cluster query. I want to hear a sound when my work finishes....
3
votes
2answers
93 views

Why is DistributeDefinitions taking so long with 100-300 Mb constants?

Why does DistributeDefinitions take so long to distribute variables that are 100-300 Mb in size? I am setting up ParallelTable ...
1
vote
1answer
92 views

Monitoring Parallel Processes

I have a problem where my For loop will not get rid of my PrintTemporary monitor, and it means I end up with loads and loads of ...
1
vote
0answers
57 views

How can I try to debug this discrepancy between Map and ParallelMap?

It is hard for me to present the actual set of functions that is prompting this question, because it is part of a very large code base. But to summarise, I have a setup like the following: ...
2
votes
2answers
96 views

Solving a diophantine equation in 'large' values

Let's first discuss what I am trying to solve: I want to solve the diophantine equation stated below for relatively 'large' values of $r$. $$\frac{a(a + 3)(a(r - 9) + (7 - r))}{12}=\frac{b (3 + b (-5 +...
3
votes
2answers
70 views

Map of an expression in a 3D grid is very slow

I have a quite large expression as function of $R$, $\phi$ and $Z$ as you can see: ...
3
votes
4answers
358 views

Solving an equation in natural numbers

I am trying to solve the following equation in the Natural Numbers, with the condition $a\ge1$, $b\ge1$, and $r\ge3$: $$\frac{a(a + 3)(a(r - 5) + (12 - r))}{9}=\frac{b (9 + b (-14 + r) - r)}{3}\tag1$$ ...
0
votes
0answers
30 views

ParallelTable - performance problem

I noticed some issue while making parallel computations with Table loop. I noticed that when one of kernels finishes its part of job, it stops working and only rest of kernels work. But when ...
4
votes
2answers
149 views
0
votes
1answer
111 views

Writing a program that finds for what $(x,y)$ a function gives a perfect square number

The overal question I am trying to answer is: For what $(x,y)$, which are positive integers, is the following number a perfect square number? $$9 \left(x^3 (y-2)^2+3 x^2 (y-2)-2 x (y-45) (y-2)+7 (y-1)^...
1
vote
0answers
63 views

Running NonlinearModelFit in more one kernel simultaneously [closed]

I want to perform a nonlinear least square fit of data points upto 3000. Because the model I provide is huge polynomials with 300 to 400 fitting parameters to be estimated, my mac i7 computer proceeds ...
1
vote
0answers
43 views

What does it mean when $MaxLicenseProcesses returns Infinity?

I am learning how to use Mathematica on a cluster, and a lot of this stuff is still way over my head. Please let me know if I am missing any crucial details. The cluster uses Linux and uses Lmod to ...
0
votes
0answers
29 views

Parallel computation in a computer with 2 CPUs

My computer has 2 CPUs, each with 8 cores. However, when using parallel operation, only 8 cores of one CPU can be called. How can I set it so that 8 cores of the other CPU can also participate in the ...
2
votes
1answer
71 views

Implementation of Dirichlet-Neumann method

I am new in Mathematica and I was trying to find documentation on the Dirichlet-Neumann and Neumann-Neumann methods (which are part of Domain Decomposition Method), but I couldn't find any. Can ...
2
votes
0answers
35 views

Mathematica parallelization error

I am trying to parallelize some code in Mathematica 11.3 under Ubuntu 20.04, but I get the following errors: the code is a s follows: ...

1
2 3 4 5
16