parallel-programming

Java: Parallelizing quick sort via multi-threading

I am experimenting with parallelizing algorithms in Java. I began with merge sort, and posted my attempt in this question. My revised attempt is in the code below, where I now try to parallelize quick sort. Are there any rookie mistakes in my multi-threaded implementation or approach to this problem? If not, shouldn't I expect more tha...

simple parallel processing in perl

I have a few blocks of code, inside a function of some object, that can run in parallel and speed things up for me. I tried using subs::parallel in the following way (all of this is in a body of a function): my $is_a_done = parallelize { # block a, do some work return 1; ...

manupulating iterator in mapreduce

I was trying to find the sum of any given points using hadoop, but my problem is on getting all values from a given key in a single reducer. It is some thing like this. I have this reducer public static class Reduce extends MapReduceBase implements Reducer { public void reduce(Text key, Iterator<IntWritable> values, ...

How to join multiple machins connected via enthernet cabels (in one NAT) into one counting resource using new .net 4 Parallel Programming APIs?

How to join multiple machins connected via enthernet cabels (in one NAT) into one counting resource using new .net 4 Parallel Programming APIs? Is it possible? ...

OpenCL: basic questions about SIMT execution model

Some of the concepts and designs of the "SIMT" architecture are still unclear to me. From what I've seen and read, diverging code paths and if() altogether are a rather bad idea, because many threads might execute in lockstep. Now what does that exactly mean? What about something like: kernel void foo(..., int flag) { if (flag) ...

OpenMP for nested for loops?

Hi, I am attempting to use OpenMP in my project that contains N agents in a simulation. Every agent has a position vector. Inside my program, I do something like the following: for(int i=0;i<agents.size();i++){ for(int j=0;j<agents.size();j++){ if(i==j) continue; if(distance_between(i,j)<10){ //do a lot of calculations for ...

Why debug is different from running without debugging (Cancelling a Task)?

I made a program to test Parallel programming in C# 4.0. However, there is a problem and I can't figure out why. I write a method private void compute(int startValue, int endValue, ConcurrentBag<Pair> theList) { try { Task computation = Task.Factory.StartNew(() => { findFriendlyNumbers(startValue, en...

How to measure the execution time of every block when using CUDA?

clock() is not accurate enough. ...

Good Learning Material on Parallel Extension of .Net 4

Can anybody please suggest me some good learning materials on the new Parallel Extensions and its use in .Net 4 except the MSDN one, so that I can learn - parallel programming on .Net 4 the basic differences between non-parallel and parallel programming paradigms how to create data-structures that supports parallel computation? Any f...

Does Windows 7 Automatically Use Multiple Processors for Python 3 Code?

I have windows 7 and I wrote a python program that loops ("for loops", i.e., "for key in dict") over multiple databases, checks for various conditions (e.g., if x in dict, y += 1) and then tallies the results. I didn't do anything to parralelize the proceesing. I have 8 CPU cores on my computer. When I start Windows task manager while...

C# Parallel Vs. Threaded code performance

I've been testing the performance of System.Threading.Parallel vs a Threading and I'm surprised to see Parallel taking longer to finish tasks than threading. I'm sure it's due to my limited knowledge of Parallel, which I just started reading up on. I thought i'll share few snippets and if anyone can point out to me paralle code is runni...

Add recevied data to existing recieve buffer in MPI_SendRecv

Hi I am trying to send a data(forces) across 2 Process, using MPI_SendRecv. Usually the data will be over written in the received buffer, i do not want to overwrite the data in the received buffer instead i want to add the data it received. i can do following. Store the data in previous time step to a different array and then add it aft...

If MPI is Message Passing Interface, then what is MPICH ?

Can anyone defines clearly what is MPICH ? For what it is used ? Its relation with MPI. Why do we need MPICH ? ...

Is there any programmable parallel programming environment\framework for C# developers?

So what I want is simple - control over processes that are ran on different connected (at least via ethernet) group\grid\cluster of PCs... something like "Parallel C#" but in form of array of .net libs and programs. Is there any programmable parallel programming environment\framework for C# developers? ...

Looking open source project to parallelise

Hi all. For an assignment I need to parallelise a project, and document on my work and outcomes. So, Im looking for an ideal open-source C# or Java project that would require about 60hrs of work, (so reasonably small - sorry for the generalisation, not sure how to put it into perspective, considering Im still studying) and fairly cpu i...

Parallel Programming does this code look like what its asking? race condition and forall statement help

Heres the problem..ill put what ive come up with at the bottom..but im a bit confused...im told to use forall statement..but we havent even learned that yet. So im trying to teach myself some..it seems like its a hard topic to find much on. The coding language is either called pidgin or Peril-L it says that they will define a pidgin pro...

IBM Cell programming in 2010 - feasible and worth it?

Hello, I would need your help. I've come across an interesting book - Programming the Cell Processor: For Games, Graphics, and Computation - it contains mostly C and some Assembly for Cell. The technology is interesting indeed, but there are some doubts on my side. The book is from 2008 and some things has changed: There is no Linux s...

C# Open Source software that would benefit from parallelization?

I'm not sure if this kind of question is appropriate, but its been suggested I ask here, so here goes. For a subject at university this semester our assignment is to take some existing code and parallelize it. We've got a bit of an open end on it, but open source is really the only way we are going to get existing code. I could write s...

Group Java Development

Maybe it's a strange question but... A friend of mine and I used to code together on small projects. Everyone has their own expertise in coding things. This works quite well when coding in C on a remote location (over ssh on the same server). My Question: Is there a possibility of developing java with eclipse with 2 or more people. Sa...

.NET Parallel.ForEach, StreamWriter output + thread safe

Hi, In the past I have used ThreadPool.QueueUserWorkItem to spawn multiple threads from a manager class. This manager class subscribes to an event in these spawned threads which is raised when the thread work completes. The manager class can then handle writing output to a text file by using a lock to prevent any race conditions. Now I...