Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
5
votes
1answer
594 views

Why is ParallelDo slower than Do?

I have problems to write parallel code in mathematica. Why is ...
1
vote
1answer
199 views

How to run multiple functions simultaneously by multi-core CPU in Windows?

There exist multiple functions, take them for instance, 3 functions as follows: ...
3
votes
1answer
51 views

PatternTest vs Parallelization

Bug introduced in 10.0 or earlier and fixed in 11.2 Consider the following function ...
0
votes
1answer
120 views

Parallelise numerical integral for contour plot

I have the following integral that I would like to evaluate: ...
5
votes
0answers
127 views

Optimize Use of PeakDetect in Mathematica

I am quite new to Mathematica and I am looking for some advice in order to improve and optimize my code. Here is what I am trying to do: Open a stream Read the stream line by line and store it in "...
1
vote
0answers
73 views

Conversion of STL files to 3D Images

I am trying to convert some stl files to 3d images in MMA 11.3. I came across this post that contained some code making use of parallelization to speed up the process, as follows: ...
1
vote
0answers
47 views

How badly does switching kernel slow down or completely stop Mathematica running jobs?

I have a question on how to run two or more Mathematica jobs on one laptop. For example, I use a local kernel to run a job. Then I open another job and choose Kernel configuration option and choose ...
6
votes
1answer
83 views

How to properly Abort from within a ParallelMap?

If a condition is met within a sub-kernel in the function being mapped, how does one cancel the whole ParallelMap operation? ...
3
votes
0answers
141 views

Privilege violation for file or directory

hopefully somebody can help me out with the following; I have a mathematica .wl script which uses ParallelTable; When I run this locally (laptop) it works perfectly....
0
votes
1answer
104 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" ...
3
votes
1answer
118 views

Why does choosing the method break the parallel computation? [closed]

I have a workable function with using NDSolve with predefined method for solving. But for some reasons I should use the parallel computation. The main problem is that the NDSolve can't build the ...
2
votes
1answer
75 views

ParallelMap vs building pure function on the fly

I have a case where one function builds a pure function whenever it is evaluated. A (admittedly contrived) example would be ...
0
votes
0answers
41 views

ParallelTable fails to finish evaluating after completing computation

I am executing a ParallelTable but the code fails to finish. This is the setup. f is a function. ...
1
vote
0answers
50 views

Clustering different kernel versions

After a good bit of trial and error I have managed to cluster together two OS X machines. The master is running Mathematica 9.0 and the secondary 11.0. All was well and good, the remote command being ...
3
votes
1answer
351 views

Parallele Computing - 2 vs. 4 processor speed [closed]

I am evaluating a code which ends with Table having ParallelEvaluate of a function XXXX[phi, theta, si]. For a grid of 225 ...
1
vote
0answers
121 views

WSTP with an MPI application

I'm looking to use WSTP to make functions defined in a C MPI application available to a remote Mathematica kernel. I've got this working for a non-MPI version of the application, but now wish to have ...
3
votes
1answer
93 views

How to trigger WhenEvent for NDSolve in parallel?

Say I have a system of differential equations that I need to solve for different initial conditions and say the process is sufficiently expensive and I have sufficiently many that I am calculating in ...
15
votes
2answers
263 views

DistributeDefinitions is evaluating the definitions, and this only for a large number of definitions

I am using Mathematica 11.3 and this seems to me to be a bug. I would like, if possible, some idea on a workaround. Here is an example of a trivial code that works as expected: ...
4
votes
1answer
247 views

NDSolve`Iterate with shared variables

I'm trying to parallelize a set of NDSolves that share a few variables. Here is a short working example: ...
1
vote
1answer
54 views

Using ExternalEvaluate within ParallelDo

I have had great success using Python in Mathematica (for some computations for which there are very well optimised Python packages but not for Mathematica). I have some Mathematica functions that are ...
1
vote
1answer
90 views

Is there any way to save time using of “Cross” or “Table”?

I need to solve a equation by NDSlove, so I write the equation first, but it takes me a lot of time. The follow is my code ...
0
votes
0answers
97 views

CUDAQ::internal: CUDALink experienced an internal error

I have Mathematica 11.0.0 installed on Windows 10, with an NVIDIA GT 630M GPU on my Dell Inspiron. I am trying to run the CUDA examples in the Help files. All of the setup functions for CUDALink work ...
0
votes
0answers
38 views

Fail to modify the elements of a global vector in ParallelTable

I want to modify a vector in a Table function, such as vec = {0, 0, 0, 0}; Table[vec[[i]] = i, {i, 1, 4}]; vec // output {1,2,3,4} however, when I use ...
0
votes
0answers
42 views

Shared variable in Compiled ParallelDo

Here is a compiled, non-parallel function that works. ...
3
votes
1answer
80 views

ParallelDo gives different solution to Eigensystem

I am trying to calculate the eigensystem of a large matrix (e.g. 256x256). I have found that when I do this within a ParallelDo (because I am actually calculating many of these eigensystems), the ...
0
votes
0answers
91 views

Speed up execution of this function

I would like to speed up this following function: ...
0
votes
0answers
86 views

Properly parallelising FindRoot for multiple starting values

I have a problem I want to find numerical solutions for with different starting variables. Let F be a vector supposed to vanish, which in its definition includes ...
5
votes
0answers
89 views

Random number generation within Compile and Parallelization->True

According to this thread RandomChoice is a compilable function. I use it to generate random numbers in a compiled function with parallelization enabled. I wrote ...
4
votes
2answers
94 views

Shadowing of symbols with ParallelEvaluate and packages

I'm new to Mathematica's parallel evaluation and can't really figure out how to properly use packages on parallel kernels: I get ::shdw messages complaining about ...
2
votes
0answers
112 views

Whether Parallel computing or Gpu Computing can be performed for mathematica built-in functions? [closed]

I want to know how to run my mathematica code using GPU or parallel computing without any special coding besides using the original Mathematica code.
1
vote
1answer
146 views

Parallel Computation

How can I modify this code in order to run in parallel? (It's some part of my main code) ...
10
votes
1answer
115 views

Parallelize[MapIndexed[…,Association[…]]] returns broken result

Bug introduced in 10.0.2 or earlier and persisting through 12.0 Confirmed: CASE:4041910 Consider the following example: ...
5
votes
1answer
249 views

Parallelize the construction of sparse matrices

I'm trying to parallelize a few constructions of chain complexes (given as a list of sparse matrices). I have a function that for any column (or row) computes the list of nonzero entries in that ...
1
vote
0answers
52 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, ...
0
votes
0answers
64 views

Writing to file with ParallelDo

I have been experiencing difficulties writing to file in MMA_11.3 when using ParallelDo. The structure of the code is quite simple: a main script runs a ParallelDo block in which a function (...
3
votes
0answers
56 views

How can I prevent ParallelTable[] from freezing?

I have spent some time trying to figure this out. I have a function that appears to be the reason my program is freezing. I am using both MemoryConstrained[] and <...
1
vote
0answers
42 views

Can't open setting of Parallel Kernel Configuration on Mac and Windows after configuring remote kernels

In Mathematica 11.3 on Mac and Windows. Once I've set up the connection with gridMathemtaica's remote kernels. Then I close those machines/kernels and restart my Mathematica. When I click the ...
4
votes
1answer
861 views

Parallelization does not use all cores fully

On a new laptop with a 6-core i7-8850H in Mma11.3, I'd like to use its full capabilities. Unicore code ...
2
votes
0answers
76 views

How can I deal with a SystemException?

I have a list of functions that are being evaluated, using ParallelTable[], and continue to get the error message: ...
2
votes
1answer
64 views

Compile command does not succeed with list input with Parallelization->True

J. M. suggested that I pose the following as a question, a matter arising in relation to the function probit: ...
2
votes
0answers
438 views

ParallelTable::nopar: No parallel kernels available; proceeding with sequential evaluation

I am trying to use a the following code: ...
1
vote
0answers
17 views

ClearAttributes in ParallelDo

The following code ClearAttributes[Times, Orderless]; temp = b*a; Do[ Print[temp];, {i, 1} ] will print b*a However, the ...
6
votes
1answer
963 views

Which is the correct way to parallelize this code?

I am reading this blog on how to parallelize Sow and Reap, but it uses SetSharedFunction: <...
1
vote
0answers
55 views

How can I launch GenerateDocument with a template file on multiple kernels in a batch fashion?

I am trying to do automated testing of my MMA package by launching test cases that are generated on-the-fly with GenerateDocument and a template document, and then evaluated with NotebookEvaluate. I ...
5
votes
1answer
154 views

What is the difference between controlling and computational kernels?

I have just dowloaded Mma 11.3 with a trial licence. In the download page you can see: That I can use 2 controlling kernels and 4 computing kernels. What is the difference between controlling and ...
7
votes
2answers
665 views

Can Mathematica Take Advantage Of a AMD Ryzen Threadripper 2990wx 32 Core Processor?

I have a student version of Mathematica. I'm currently running it on my 8 Core Desktop. On my current Desktop I use it for Numerically integrating expressions 1000s of times, the ParallelTable ...
5
votes
2answers
234 views

Effective parallel processing of large items

When trying to parallelize a task which involves items of larger sizes, I cannot achieve efficient parallelization. To demonstrate this, we launch some kernels: ...
2
votes
1answer
129 views

Is it possible to parallelize a code with this structure?

Is it possible to parallelize a code with this structure? n=0; Do[If[condition, n++],{100}] n ParallelDo always returns ...
3
votes
0answers
50 views

Getting a Stack Trace on parallel execution

I find debugging very difficult in Mathematica, perhaps because I am unfamiliar with the appropriate tools. Ideally, I would like a "break on error" like Matlab with step control, however for the ...
1
vote
1answer
258 views

Sparse matrices dot multiplication

I have two huge sparse matrices, and I am interested in dot multiplication them. But I have a memory issue so a notebook is a shutdown. I am using the 11.3 version. Any suggestion on how to avoid ...

1 2
3
4 5
15