Questions tagged [spmd]

SPMD (single program, multiple data) is a technique employed to achieve parallelism; it is a subcategory of MIMD

In computing, (single program, multiple data) is a technique employed to achieve parallelism; it is a subcategory of .
Tasks are split up and run simultaneously on multiple processors with different input in order to obtain results faster.
SPMD is the most common style of parallel programming. It is also a prerequisite for research concepts such as active messages and distributed shared memory.
In SPMD, multiple autonomous processors simultaneously execute the same program at independent points, rather than in the lockstep that SIMD imposes on different data. With SPMD, tasks can be executed on general purpose CPUs; SIMD requires vector processors to manipulate data streams. Note that the two are not mutually exclusive.

Wikipedia page: http://en.wikipedia.org/wiki/SPMD

40 questions
8
votes
1 answer

How to make the most of SIMD in OpenCL?

In the optimization guide of Beignet, an open source implementation of OpenCL targeting Intel GPUs Work group Size should be larger than 16 and be multiple of 16. As two possible SIMD lanes on Gen are 8 or 16. To not waste SIMD lanes, we need to…
user3528438
  • 2,737
  • 2
  • 23
  • 42
8
votes
3 answers

Sending data to workers

I am trying to create a piece of parallel code to speed up the processing of a very large (couple of hundred million rows) array. In order to parallelise this, I chopped my data into 8 (my number of cores) pieces and tried sending each worker 1…
Adriaan
  • 17,741
  • 7
  • 42
  • 75
4
votes
2 answers

Skipping lines of code depending on available function(s)/toolboxes

Context At work I built a GUI to perform image registration on several microscopy images. On the computer I'm using (i.e. at work) the Parallel Processing Toolbox is installed, so I can take advantage of spmd blocks to distribute the work on the…
Benoit_11
  • 13,905
  • 2
  • 24
  • 35
4
votes
1 answer

How do I index codistributed arrays in a spmd block

I am doing a very large calculation (atmospheric absorption) that has a lot of individual narrow peaks that all get added up at the end. For each peak, I have pre-calculated the range over which the value of the peak shape function is above my…
craigim
  • 3,884
  • 1
  • 22
  • 42
2
votes
1 answer

JAX vmap vs pmap vs Python multiprocessing

I am rewriting some code from pure Python to JAX. I have gotten to the point where in my old code, I was using Python's multiprocessing module to parallelize the evaluation of a function over all of the CPU cores in a single node as follows: # start…
2
votes
0 answers

How do I make matlab display messages from each worker in the order in which they were generated

My application starts 2 workers which print things the screen with disp parpool('local', 2); spmd idx=labindex; if idx==1 %print messages to the screen every 10 seconds. end if idx==2 %print messages to the screen…
avgn
  • 982
  • 6
  • 19
2
votes
1 answer

MATLAB array structure vectorization using parallel processing

I am trying to vectorize the following data structure in Matlab but I cannot find/code an efficient way. A = 1x2 struct array with fields: [a , b , c] A(1) = a: 1 , b: 2 , c: [1x1 struct] A(1).c = key: 5 A(2) = a: 1 , b: [] , …
Maroon66
  • 41
  • 3
2
votes
0 answers

matlab parfor and spmd doesn't work

The script is as follows: Lambdass = [0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000]; numcores = feature('numcores'); % get the number of cpu cores num_slices = floor(length(Lambdass)/numcores); % get the number of slices for parallel…
mining
  • 3,557
  • 5
  • 39
  • 66
1
vote
1 answer

Task is to parallelize matrix multiplication with p-threads and vectorized with Intel ISPC compiler

In .ispc file using pthread generates errors as follows: (1) t.ispc:2:13: Error: Illegal to return a "varying" or vector type from exported function "matrix_mult_pl" export void * matrix_mult_pl( void *arg ) (2) t.ispc:2:36: Error: Varying pointer…
Hassam Khan
  • 21
  • 1
  • 5
1
vote
1 answer

Matlab: Shut down parallel pool - only working for parfeval() but not spmd

I would like to shut down my parallel pool by a button press in a Matlab GUI to stop the execution of functions running on these pool workers. Unfortunately this only works when starting the functions with "parfeval()". In this case, as soon as I…
timosmd
  • 159
  • 11
1
vote
0 answers

MATLAB spmd dynamic fieldname call

How do I access data field in spmd block? I have the following code -- function output = spmd_fieldname_test(input) spmd input = distributed(input); allFieldnames = fieldnames(input); for ithField = 1:numel(allFieldnames) output =…
1
vote
1 answer

Read two visa instruments in parallel with Matlab

I try to read data from two Keysight oscilloscopes in parallel with Matlab (2015a). To do that I use the parallel computing toolbox with the spmd command. I have a function to read the data which accepts a visa object as parameter and returns the…
Nils
  • 13
  • 3
1
vote
1 answer

Debugging in MATLAB pmode

Is it possible to use debugging commands like dbstep and dbquit etc in the MATLAB pmode ?
Swami
  • 71
  • 1
  • 10
1
vote
1 answer

To get debug outputs on client - spmd

I am running a parallelized code courtesy the MATLAB Parallel Computing Toolbox using the spmd command. Specifically, the code is like this: spmd out = function(data,labindex); end Now the function involves a library (libsvm) which gives me a…
Swami
  • 71
  • 1
  • 10
1
vote
1 answer

Using spmd or parfor in Matlab

I am currently trying to run experiments in parallel using MATLAB 2011b that are very time-consuming. I am wondering if someone could help me 'translate' the following block of generic (non-working) parfor code into something that will work in the…
1
2 3