parallel-programming

Parallel programming patterns for C#?

With Intel's launch of a Hexa-Core(6) processor for the desktop, it looks like we can no longer wait for Microsoft to make many-core programming "easy". I just order a copy of Joe Duffy's book Concurrent Programming on Windows. This looks like a great place to start, though, I am hoping some of you who have been targeting multi/many co...

Segmentation fault on MPI, runs properly on OpenMP

Hi, I am trying to run a program on a computer cluster. The structure of the program is the following: PROGRAM something ... CALL subroutine1(...) ... END PROGRAM SUBROUTINE subroutine1(...) ... DO i=1,n CALL subroutine2(...) ENDDO ... END SUBROUTINE SUBROUTINE subroutine2(...) ... CALL subroutine3(...) CALL subroutine4(...) ... END ...

Should I use two threads which can kill each other?

I would like to have a window with a simple form (radio buttons and so on). Users can make there selections and press a "Submit" button. Additionally to that I would like to set some time limits. In more details, user should see how many seconds he/she still have (so, there should be a timer). If the time limit is exceeded, program close...

JVM (embarrasingly) parallel processing libraries/tools

I am looking for something that will make it easy to run (correctly coded) embarrassingly parallel JVM code on a cluster (so that I can use Clojure + Incanter). I have used Parallel Python in the past to do this. We have a new PBS cluster and our admin will soon set up IPython nodes that use PBS as the backend. Both of these systems mak...

Multithreading or task parallel library

I have an application which performs 30 independent tasks simultaneously using multithreading, each task retrieves data over http, performs a calculation and returns a result to the ui thread. Can I use TPL to perform the same tasks? Does TPL create 30 new threads and spread them over all the available cores, or does it just split the ...

STL algorithms and concurrent programming

Hello everyone, Can any of STL algorithms/container operations like std::fill, std::transform be executed in parallel if I enable OpenMP for my compiler? I am working with MSVC 2008 at the moment. Or maybe there are other ways to make it concurrent? Thanks. ...

Parallel computing for integrals

I want to reduce the calculation time for a time-consuming integral by splitting the integration range. I'm using C++, Windows, and a quad-core Intel i7 CPU. How can I split it into 4 parallel computations? ...

deciding between subprocess, multiprocessing and thread in Python?

I'd like to parallelize my Python program so that it can make use of multiple processors on the machine that it runs on. My parallelization is very simple, in that all the parallel "threads" of the program are independent and write their output to separate files. I don't need the threads to exchange information but it is imperative tha...

Ideas for student parallel programming project

I'm looking to do a parallel programming project in C (probably using pthreads or maybe OpenMP) for a class. It will done by a group of about four students, and should take about 4 weeks. I was thinking it would be interesting to attack some NP-complete problem with a more complex algorithm like a genetic algo with simulated annealing, b...

How to declare a vector or array of reducer objects in Cilk++?

Hi All, I had a problem when I am using Cilk++, an extension to C++ for parallel computing. I found that I can't declare a vector of reducer objects: typedef cilk::reducer_opadd<int> T_reducer; vector<T_reducer> bitmiss_vec; for (int i = 0; i < 24; ++i) { T_reducer r; bitmiss_vec.push_back(r); } However, when I compile the cod...

How do i write tasks? (parallel code)

I am impressed with intel thread building blocks. I like how i should write task and not thread code and i like how it works under the hood with my limited understanding (task are in a pool, there wont be 100 threads on 4cores, a task is not guaranteed to run because it isnt on its own thread and may be far into the pool. But it may be r...

Parallel computing in .NET

Since the launch of .NET 4.0 a new term that has got into the limelight is parallel computing. Does parallel computing provide us some benefits or is it just another concept or feature? Further is .NET really going to use it in applications? Further is parallel computing different from parallel programming? Kindly throw some light on t...

Parallel programming, are we not learning from history again?

I started programming because I was a hardware guy that got bored, I thought the problems being solved in the software side of things were much more interesting than those in hardware. At that time, most of the electrical buses I dealt with were serial, some moving data as fast as 1.5 megabit!! ;) Over the years these evolved into para...

Parallel processing via multithreading in Java

There are certain algorithms whose running time can decrease significantly when one divides up a task and gets each part done in parallel. One of these algorithms is merge sort, where a list is divided into infinitesimally smaller parts and then recombined in a sorted order. I decided to do an experiment to test whether or not I could I ...

C++: looking for thread based a parallel kd tree library.

Hello, Are there some implementation for KD-Tree on shared memory machines? thanks Arman. ...

Linker library for OpenMP for Snow Leopard?

Currently, I am trying out OpenMP on XCode 3.2.2 on Snow Leopard: #include <omp.h> #include <iostream> #include <stdio.h> int main (int argc, char * const argv[]) { #pragma omp parallel printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); return 0; } I didn't include any linking lib...

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? ...

MPAPI vs MPI.NET vs ?

I'm working on college project. I have to develop distributed computing system. And i decided to do some research to make this task fun :) I've found MPAPI and MPI.NET libraries. Yes, they are .NET libraries(Mono, in my case). Why .NET ? I'm choosing between Ada, C++ and C# so to i've choosed C# because of lower development time. I have...

'foreach' failing when using Parallel Task Library

The following code creates the correct number of files, but every file contains the contents of the first list. Can anyone spot what I've done wrong please? private IList<List<string>> GetLists() { // Code omitted for brevity... } private void DoSomethingInParallel() { var lists = GetLists(); var tasks = new List<Task>(); var...

Best ways to write a method that updates two objects in a multithreaded java environment?

Suppose we have a class called AccountService that manages the state of accounts. AccountService is defined as interface AccountService{ public void debit(account); public void credit(account); public void transfer(Account account, Account account1); } Given this definition, what is the best way to implement transfer() so that y...