Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

0
votes
0answers
11 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
33 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
307 views

Parallele Computing - 2 vs. 4 processor speed

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
26 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
44 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 ...
14
votes
2answers
199 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
154 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
26 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
74 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
37 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
34 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
27 views

Shared variable in Compiled ParallelDo

Here is a compiled, non-parallel function that works. ...
2
votes
1answer
52 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
76 views

Speed up execution of this function

I would like to speed up this following function: ...
0
votes
0answers
22 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
70 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
62 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
48 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
72 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
75 views

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

Bug introduced in 10.0.2 or earlier and persisting through 11.3 Confirmed: CASE:4041910 Consider the following example: ...
2
votes
1answer
125 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
31 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
29 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
39 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 <...
0
votes
0answers
21 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
185 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
32 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
46 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: ...
0
votes
0answers
52 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 ...
5
votes
1answer
684 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
22 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
96 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
268 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 ...
2
votes
2answers
82 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
122 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
27 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
82 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 ...
5
votes
0answers
34 views

Efficient Parallelization of PermutationReplace

I am generating the orbit of a partition of a set of size $n$ under the action of the symmetric group $S_n$. PermutationReplace won't allow itself to be parallelized. Why is this ? Is it because the ...
2
votes
1answer
30 views

How to set shared variable from “Get”

I load some file by Get, as: Get[file.m]; I want that functions from this file will be defied for all Kernels, what I have to do? Thank you!
6
votes
1answer
126 views

2D interpolation of function with dependent interpolation border

My problem is to compute $$\int\limits_{x_{min}}^{x_{max}}\int\limits_{y_{min}}^{\sqrt{x^{2}-a^{2}}}W(x,y)g(x)\ dx\ dy$$ Because $W$ have highly oscillatory 2d complex numeric integral inside, dumb ...
0
votes
0answers
22 views

Can Share [] command and ParallelTable be used together?

Can Share [] command and ParallelTable be used together? I mean, does this result in the data exchanging between different cores? A simple example: ...
5
votes
1answer
70 views

Why does my Package not work when I use ParallelEvaluate?

I am developing a package in Mathematica for finding the conductivity of magnetic materials. The most important and time consuming processes are EigenSystem[] calls. I want to make the code modular so ...
1
vote
0answers
54 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 ...
2
votes
0answers
38 views

Problem with exporting PlotLabel using MaTeX in Parallel computation

Requires MaTeX, which can be found here. ...
0
votes
0answers
61 views

Language`ExpressionStore and ParallelMap

Is there a way to access NewExpressionStore from within a parallelized calculation? I have tried variations of ...
0
votes
0answers
43 views

Parallelize Slow on Interpolated Functions

So I have an FEA solution from COMSOL and I import the mesh and values at the vertices to create an interpolation function. ...
2
votes
0answers
92 views

How can I avoid massive (waste) CPU usage by Mathematica?

I am using Mathematica on a Linux machine with 52 CPUs. I am sending my jobs in a batch mode and I am not using any parallel evaluation like ParallelTable[] or so. ...
2
votes
0answers
39 views

Compile with “Listable” only on one argument

I would like to write a Compiled function which is listable only in the first argument, because this allow fast and easy parallelization. How is it possible to do it? In the following way it does not ...
7
votes
2answers
1k views

Can this code be changed to run faster?

I've worked for several days trying to get this code to run faster. The imported data is 15MB. ...