parallel-programming

How exactly do MbUnit's [Parallelizable] and DegreeOfParallelism work?

I thought I understood how MbUnit's parallel test execution worked, but the behaviour I'm seeing differs sufficiently much from my expectation that I suspect I'm missing something! I have a set of UI tests that I wish to run concurrently. All of the tests are in the same assembly, split across three different namespaces. All of the test...

Parallelizing the element wise multiplication of two matrices in F#

I'm trying to parallelize the element by element multiplication of two matrices in F#. I can't quite figure it out thought. I keep trying to create tasks but it never wants to compile. My non-working messy code is the following: let myBigElemMultiply (m:matrix) (n:matrix) = let AddTwoRows (row:int) (destination:matrix) (source1:matri...

I don't understand how work call_once

Please help me to understand how call_once works. Here is the thread-safe code. I don't understand why this needs Thread Local Storage and global_epoch variables. The variable _fast_pthread_once_per_thread_epoch can be set to one of { FAST_PTHREAD_ONCE_INIT, BEING_INITIALIZED, FINISH_INITIALIZED }. Why are count calls needed in global_e...

What features make the functional language better for parallel programming?

The functional programming provides stateless way of programming that enables the user free of side effect. declarative way of programming that enables the user describe the problem sets that the computer should solve, not the way of the problems are solved. Combining those features, users can program in higher level that can be swa...

What about parallelism across network using multiple PCs?

Parallel computing is used more and more, and new framework features and shortcuts make it easier to use (for example Parallel extensions which are directly available in .NET 4). Now what about the parallelism across network? I mean, an abstraction of everything related to communications, creation of processes on remote machines, etc. S...

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

.Net 4.0 parallel - how to know when task is finished

Hi, I have a Tasks table. Tasks are added to this table all the time. After task is finished, I should delete it from the table and perform some other operations. The tasks should be executed concurrently. If I use Task class (Task.Factory.StartNew...), how can I know when Task is finished, in order to perform some operations regarding ...

when is parallelizing disk i/o worth the effort?

Based on your experience, have you gained performance boost from parallelizing disk I/O? I/O reads in particular In my case, I though having RAID 0 drives would allow to run at least two reads concurrently, but it still is slower than the serial approach. Would you ever go for concurrent I/O reads? Why? ...

Perl Parallel::ForkManager with DBI database handlers

Hi all, im interested in performing multiple database actions in parallel. I have played with Perl Parallel::ForkManager but not used it with any databases yet. I have read that database connectivity is not supported very well with this. Does anyone have experience with this? As an example i would probably be spawning a system call(whic...

How can make my file reading class return an IEnumerable<byte[]> object ...

... that I can read into a BlockingCollection<byte[]> in the same way that System.IO.File.ReadLines() can be read into a BlockingCollection<string> in .net4.0? ...

add rows to a datatable with parallel.for

I have this sub : Private Sub error_out(ByVal line As Integer, ByVal err_col As Integer, ByVal err_msg As String) Dim ln = t_erori.Rows.Add ln.Item(0) = line ln.Item(err_col) = err_msg ln.Item(3) = err_col End Sub This is being called by several functions running in a parallel.for l...

Using nested Parallel.For

Consider this example: var x = 0; for (var i = 0; i < 100; i++ ) { for (var a = i+1; a < 100; a++) x += 1; } When printing x we always get 4950. What about if I want to parallelise this? This is what I come up with Parallel.For(0, 100, i => Parallel.For(i + 1, 100, a => { x += 1; })); However this does Not print 4950 ...

How can one learn multi-threaded parallel programming?

No matter how proficient you are at programming C or Java, you should consider adding multi-threaded programming to your set of skills. This is NOT something you should try to learn on your own. It is MUCH harder to learn than sequential programming. If you are a Technical Manager, you SHOULD invest in retraining your key staff i...

How to do parallel programming in Java?

Hi I am developing an algorithm to find out a fraud-detecting system using a math formula. I need to work the program in different computer. How can I do that in Java? How can I do parallel programing in java? using RMI? or any other method? can u guys give me a code sample? ...

Python: Something like `map` that works on threads

I was sure there was something like this in the standard library, but it seems I was wrong. I have a bunch of urls that I want to urlopen in parallel. I want something like the builtin map function, except the work is done in parallel by a bunch of threads. Is there a good module that does this? ...

Is Intel Software Development Suite worth the cost ?

(this is a partial duplicate of Are the Intel compilers worth it?) The Intel Software Development Suite includes the C++ compiler, IPP, VTune, Thread Checker. The Intel Parallel Studio includes the composer, the inspector and the amplifier. Those two packages cost almost $4000, but I'll still be a student for 1 month and as such pas on...

mapreduce distance calculation in hadoop

Hi, Is there a distance calculation implementation using hadoop map/reduce. I am trying to calculate a distance between a given set of points. Looking for any resources .. //edited ............ This is a very intelligent solution. I have tried some how like the first algorithm, and i get almost what i was looking for. I am not concer...

parallel computing of a function with doSMP on Windows

I'm trying to multicore a function (in Windows), which, at one point, calls another workhorse function (function within function). Here is a minimal working example. You will need doSMP and revoIPC packages (to get them, see Tal's post here). func1 <- function(x) {sqrt(x)} func2 <- function(y) { func1(y) } library(doSMP) wrk <- sta...

Demonstrating instruction level parallelism at work

I'm trying to show instruction level parallelism at work. What I was originally doing was using python (willing to change) and doing the following: def test(): for i in range(5000): j = 0 k = 0 l = 0 def test2(): for i in range(5000): j = i * i k = j * 2 l = k * i if __name__=='_...

Connecting to a Grid Cluster With GridGain

I know that out of the box that GridGain connects to the other clients through multicast, but is there a way to configure GridGain to accept connections outside of the local network? Also is there a way to enable encryption for the communication as well? ...