Questions tagged [parallelization]

Questions on parallel computing in Mathematica.

Filter by
Sorted by
Tagged with
3
votes
1answer
119 views

LaunchKernels generates a mysterious error message

In Mathematica v. 11.1.0, on OS X 10.11.6, I get the following error message when I LaunchKernels: ...
5
votes
1answer
257 views

ParallelTable much slower than Table on RandomReal with arbitrary precision

So I was trying a very simple example (Mathematica 11.0.1) ...
2
votes
1answer
575 views

Parallel Table and CUDA

I have a large matrix computation and I use Parallel table, which launches 4 Kernels. I do not have a GPU. Will having a GPU help me in Launching more Kernels and solve the problem faster? All my ...
1
vote
0answers
123 views

How to successfully put a ParallelDo loop inside a Do loop?

I'm trying to set up a ParallelDo loop inside of a Do loop, however I'm running into issues. Here is a very simplified toy model ...
1
vote
0answers
45 views

Parallel number systems don't scale well

I'm working on Residue Number System. This is basically a set of relatively coprime integers, let's say $\{3,4,5\}$ and we define its range to be the product of the moduli, i.e. $M=3\cdot4\cdot5=60$. ...
0
votes
0answers
91 views

Speed up performance of nested function computations

I'm trying to create a model for intensive computations for a homomorphic encryption scheme. The core of my problems is a series of function calls ...
4
votes
0answers
89 views

How to do parallel computation when using LinearProgramming function?

I have a LP problem which contains 2n+3 variables with 4n+6 inequality constraints. I was trying to use Mathematica's LinearProgramming function. When n is small, like less than 30, it gives outcome ...
8
votes
2answers
1k views

How many cores can I use with my license?

From what I have been told, Mathematica licenses come with a limited number of cores it can run on in parallel. I have 24 cores on my machine and when I do ...
5
votes
1answer
118 views

How can multiple kernels update a shared Association object?

In the examples below, the variable status is an Association object that is supposed to be shared by three concurrent kernels. ...
1
vote
1answer
148 views

ParallelMap performs badly inside function

I'm trying to parallelize a very simple code that performs a stochastic gradient descent optimization (on a dual core cpu w. hyperthreading, so 4 parallel kernels). I use ParallelMap to compute the ...
3
votes
0answers
62 views

“ParallelDo” does not calculate the function well

Now, I'm solving utility maximization problem. ...
11
votes
1answer
267 views

Difficulty in parallelizing function using package (MCMC)

Difficulty in parallelizing Packages using DistributeDefinitions Context I am trying to parallelize some parameter estimation using MCMC. As a test run I expect ...
3
votes
1answer
92 views

How to catch Print and Monitor message dialog?

Context I am trying to parallelize a function which is verbose, and which as a consequence Mathematica does not seem to treat in parallel when doing something like ...
5
votes
2answers
334 views

Do SetSharedVariable/SetSharedFunction ruin the benefits of ParallelTable?

Edit: I changed the sample code to get at my question better. Slowdown due to accessing a shared variable is a much more relevant issue (to me at least) than slowdown due to writing to a shared ...
1
vote
1answer
118 views

Does Abort not work for ParallelTable with SetSharedVariable?

I find that often Abort (command-. on Mac) sometimes does not work if ParallelTable is running. Here's a simple example: ...
1
vote
0answers
88 views

Mathematica using all available cores, but not speeding up calculation as much as expected

This is a follow-up question to my previously posted question on how to get Mathematica to use all available cores to do a parallel calculation. I resolved this by rewriting the code in terms of a <...
4
votes
1answer
178 views

Mathematica not using all cores available

I am trying to run a ParallelDo loop in Mathematica, that uses NSolve to solve an equation for a number of different input ...
4
votes
0answers
103 views

How to speed up code in ParallelDo loops?

I have a piece of code that I'm trying to run in a ParallelDo over 32 kernels. Using a normal Do loop in a kernel Mathematica ...
37
votes
1answer
681 views

Parallelize Map and ParallelMap

Bug introduced in 8.0 and fixed in 11.2 It is stated in the documentation that Parallelize[Map[f, expr]] is equivalent to ...
2
votes
0answers
103 views

Forwarding Monitor Parallel computation

I'm experimenting with training neural networks. Map[NetTrain[NetInitialize@#, trdata] &, {net1, net2}] shows the Training Progress monitor on each ...
4
votes
1answer
168 views

When using Java objects through JLink, how can I multitask the objects?

I use Mathematica 11.0.1 on Windows 10 and have a Java class which acts as a 'facade' for a headless browser (PhantomJS). In Mathematica I instantiate the class through JLink as follows: ...
0
votes
1answer
122 views

How to start a new thread on mathematica

I need to start a new thread inside a mathematica function. My example is about image aquisition and processing. ...
3
votes
0answers
654 views

Get::noopen: Cannot open CloudObjectLoader` error when running Mathematica on remote cluster

I have been running Mathematica on a remote cluster for quite sometime. Recently, any jobs that call LaunchKernels[] for parallelization return the error Get::...
5
votes
1answer
455 views

Parallelization inside a module: Proper use of local variables

I have the following Module which includes a ParallelDo call. Unfortunately, ParallelDo is ...
3
votes
1answer
99 views

SetOptions in parallel computation

I have NIntegrate[] inside a ParallelDo[] loop. Outside the loop I set some options for the integration using ...
-1
votes
1answer
164 views

Using different master kernel in the same notebook

In my notebook, I have to call another file, let's say 'program.m' that defines functions, let's say F[] of whom result c I need ...
3
votes
1answer
542 views

Parallel calculation is 5 times slower than the non-parallel one

I have used code from Tell ParallelMap[] to use just specific kernels : ...
0
votes
0answers
228 views

Print output of parallel kernels to console

Is it possible to print all the output (inside a Print[] command) of a parallelized computation to the console? I can't find a control for this. I find that my computer can handle printing to the ...
3
votes
1answer
173 views

Run multiple NDSolve Simultaneously

In a previous question I asked how to speed up the performance for NDSolve for a single evaluation. With the help provided, the solution is much faster. Now, I'd like to run the same code in different ...
3
votes
1answer
98 views

What is the most effective way to reassign values in an array based on their positions

I have to reassign values in a big array many times and it turned out to be the most time consuming in my program. The best way I could figure out is this ...
2
votes
1answer
67 views

ParallelTable: How to see which cells finished calculating?

I have a code to generate a table with a computationally very expensive function f[x,y]. I run the code on a cloud server, that is, from the command line without ...
0
votes
0answers
170 views

ParallelTable and Table give different results

I am trying to parallelize a table operation, but I find that the table is not the same with and without the parallel function. I have looked at this question, but I cannot transfer it to my own ...
1
vote
1answer
283 views

Can I run more than two kernels simultaneously on my MacBookAir laptop?

I'm running Version Number 10.0.1.0 with Platform Mac OS X x86 (32-bit, 64-bit kernel). I have two Mathematica programs running using "Local" and "Alternative Local Kernel". Is this the most I can ...
3
votes
1answer
59 views

Parallelization and assumptions

I'm having a simple problem. Here is the code Table[Simplify[DifficultFunction[i],assumptions], {i,DifficultSet[1, 2]}] the correct and simplified answer is ...
1
vote
0answers
67 views

Wolfram cdf player does not support parallel computing?

I tested the following. ...
4
votes
1answer
90 views

Programmatically access the data from the Parallel Kernel Status window

I want to show the parallel kernel status within a notebook, and not in the separate Parallel Kernel Status window. How can I programmatically access the Performance Measurements data shown in the ...
0
votes
1answer
635 views

Parallelize simple for loop

I am trying the following code: ...
2
votes
0answers
55 views

Parallelize evaluation of initialization cells

I have a notebook with about 20 initialization cells. Evaluating all of them takes a few minutes. Mathematica uses only one core for this. In my case, the cells are all independent so it should be ...
0
votes
0answers
141 views

How can I cleanly distribute definitions of system functions?

I have a package that redefines a system symbol, and I am struggling to find a clean solution that will ensure that those redefinitions will still work inside a parallelized environment. The core ...
5
votes
1answer
338 views

gridMathematica on cluster with PBS Pro

I'm running my script (say "cluster.m") on the University cluster with PBS Pro installed. The script uses simple Parallelize like this: ...
1
vote
1answer
104 views

ParallelTable Automatically kill MathKernel

At the moment I continously encounter the problem that while using ParallelTable the process kswap needs all the memory, while the four running MathKernels receive almost zero %Memory, which slows ...
7
votes
0answers
128 views

ParallelSubmit executes only on one kernel

I'm trying to use Parallesubmit to run some calculations in parallel, but it looks like all the calculations are evaluated at one kernel. Consider this example: <...
2
votes
1answer
165 views

Does ParallelTable work with Co-Processors?

I have programs which can not use CUDA (graphic cards), but can run perfectly in parallel using ParallelTable (mainly symbolic transformations). Now I wonder, ...
7
votes
1answer
270 views

Register “initialization code” to run on any newly started parallel kernel

Is it possible to register a some "initialization code" to be run on any newly started parallel kernel? This would be similar to how ParallelNeeds registers a ...
22
votes
2answers
731 views

Restarting Mathematica automatically

I run a large computation in a loop. At each cycle of the loop I produce large arrays that I save on a disk. At each cycle I would like to Quit Mathematica and ...
0
votes
0answers
48 views

How can I speed up the evaluation of my equations?

Calculation of eigenvalues and eigenvectors in dependence of the parameters ...
3
votes
1answer
74 views

Variable not available in kernel despite `DistributeDefinitions`

I am following this answer to evaluate certain cells in a separate kernel. I have created a separate kernel called K2 and have the following MWE: ...
5
votes
1answer
282 views

clear variables on parallel kernel

Short question: what is the proper way to clear a variable on a given kernel ? AND how can I ensure that the memory will indeed be freed subsequently ? Full question. Let me elaborate this question ...
1
vote
1answer
60 views

How to submit assumptions defined in master kernel to subkernels

Consider an example: ...
0
votes
0answers
25 views

FindMinimumCost Flow and its parallelization

I would like to parallelize a specific implementation of FindMinimumCostFlow but doubt this can be easily done. Nevertheless, I have tried but failed to find attempts to do so. If you know of an ...