parallel-processing

Parallel loops and Random produce odd results

I just started playing with the Task Parallel Library, and ran into interesting issues; I have a general idea of what is going on, but would like to hear comments from people more competent than me to help understand what is happening. My apologies for the somewhat lengthy code. I started with a non-parallel simulation of a random wal...

How can one manage to fully use the newly enhanced Parallelism features in .NET 4.0?

I am pretty much interested into using the newly enhanced Parallelism features in .NET 4.0. I have also seen some possibilities of using it in F#, as much as in C#. Despite, I can only see what PLINQ has to offer with, for example, the following: var query = from c in Customers.AsParallel() where (c.Name.Contains("customer...

Can memcached make full use of multi-core?

Is memcached capable of making full use of multi-core? Or is there any way tuning this? ...

Parallel computation of the median of a large array

I got asked this question once and still haven't been able to figure it out: You have an array of N integers, where N is large, say, a billion. You want to calculate the median value of this array. Assume you have m+1 machines (m workers, one master) to distribute the job to. How would you go about doing this? Since the median is a no...

Erlang message loops

How does message loops in erlang work, are they sync when it comes to processing messages? As far as I understand, the loop will start by "receive"ing a message and then perform something and hit another iteration of the loop. So that has to be sync? right? If multiple clients send messages to the same message loop, then all those mes...

Setting the cores to use in Parallelism

Hi, I have a feeling the answer to this is no, but using .Net 4.0's Parallelism, can you set the amount of cores on which to run i.e. if your running a Quad Core, can you set your Application to only use 2 of them? Thanks ...

Make 2 functions run at the same time.

Hi, I am trying to make 2 functions run at the same time. def func1(): print 'Working' def func2(): print 'Working' func1() func2() Does anyone know how to do this? ...

.net 4.0 Task Parallel Library vs. MPI.NET

Does .net 4.0 Task Parallel Library replace MPI.NET for High-performace computings? MPI.NET found here http://www.osl.iu.edu/research/mpi.net/svn/ is a high-performance, easy-to-use implementation of the Message Passing Interface (MPI) for Microsoft's .NET environment. MPI is the de facto standard for writing parallel programs running o...

Parallelism in .Net

I have been asked to show the benefits and limitations of Parallelism and evaluate it for use within our company. We are predominantly a data orientated business, and essentially load objects from the database, then put them through some business logic, display to the user, then save back to the DB. In my mind, there isn't too much in th...

What is massively parallel processing (MPP) ?

Ever since Microsoft introduced sql-server version code-named "Madison" the massively parallel processing (MPP) has got into picture. What exactly is it and how does sql-server is going to benefit from it ? Further is massively parallel processing (MPP) related to parallel computing ? I read about Madison here and about parallel compu...

Parallelism in Python

What are the options for achieving parallelism in Python? I want to perform a bunch of CPU bound calculations over some very large rasters, and would like to parallelise them. Coming from a C background, I am familiar with three approaches to parallelism: Message passing processes, possibly distributed across a cluster, e.g. MPI. Exp...

Executing functions parallelly in PHP

Hi! Can PHP call a function and don't wait for it to return? So something like this: function callback($pause, $arg) { sleep($pause); echo $arg, "\n"; } header('Content-Type: text/plain'); fast_call_user_func_array('callback', array(3, 'three')); fast_call_user_func_array('callback', array(2, 'two')); fast_call_user_func_arra...

How to decide between using PLINQ and LINQ at runtime?

Or decide between a parallel and a sequential operation in general. It is hard to know without testing whether parallel or sequential implementation is best due to overhead. Obviously it will take some time to train "the decider" which method to use. I would say that this method cannot be perfect, so it is probabilistic in nature. The x,...

Physical Cores vs Virtual Cores in Parallelism

When it comes to virtualization, I have been deliberating on the relationship between the physical cores and the virtual cores, especially in how it effects applications employing parallelism. For example, in a VM scenario, if there are less physical cores than there are virtual cores, if that's possible, what's the effect or limits pla...

How to approach parallel processing of messages?

I am redesigning the messaging system for my app to use intel threading building blocks and am stumped trying to decide between two possible approaches. Basically, I have a sequence of message objects and for each message type, a sequence of handlers. For each message object, I apply each handler registered for that message objects type...

Windows Azure: Parallelization of the code

I have some matrix multiplication operation. I want to parallelize the execution of those operations through multiple processors.. This can be done on high performance computing cluster using MPI (Message Passing Interface). Like wise, can I do some parallelization in the cloud using multiple worker roles. Is there any means for doing t...

perl multiple tasks problem

I have finished my earlier multithreaded program that uses perl threads and it works on my system. The problem is that on some systems that it needs to run on, thread support is not compiled into perl and I cannot install additional packages. I therefore need to use something other than threads, and I am moving my code to using fork(). T...

What's the best solution for an embarrassingly parallel problem?

Sorry for the vague topic question, but I'm working on some academic video processing routines. The algorithms are written in MATLAB, and while it's fine for development purposes, it processed a video at about 60spf, or around .0166fps. Needless to say, this wont be sufficient for demos and such, so my summer job is to convert the routin...

Perl Parallel::Forkmanager doesn't allow to collect variable values

Hi folks, Maybe because the child processes are not aware of my hash (see the below code), the hash %output is not collecting anything .. is there any other way to collect the value apart from writing a tmp file ? foreach $Item (@AllItems) { $pid = $pm->start($Item) and next; $Temp = qx($Item); $output{$Item}= $Temp; // This doesn't co...

On Azure Development Storage I get "the specified blob already exists" when uploading block blob in parallel

Hi, Wondering if you clever people can help me with a right doozy of a bug. I'm uploading blob blocks in parallel and this works perfectly fine when running against live storage however against dev storage I get the error "The specified blob already exists" for the occasional block. The weird/ironic thing is that if the blob does alrea...