I have a script execution engine in which the end users write scripts to run their test. Now we want to run about 40 tests in parallel. I was wondering if I should convert all the scripts(in Perl or VBA) to C# code and then parallelism it or try to control the scripting engine from C# to run all those scripts in parallel? Any suggestion ...
I have a grid which is defined as: List<List<Cell>>, where "Cell" is a custom class of mine.
My program has several threads which access various coordinates on the grid, and change data in the "Cell" class. But I only want one thread writing data to a "Cell" object at a time.
I thought using concurrent collections such as ConcurrentBag w...
Hello!
What are the analogues of QtConcurrent for Scala (or Java)? Ie simplified implementation of MapReduce, the parallel map and foldl.
Thank you
...
I'm going to be using a subset of C++ (working within some of the ideas in Elements of Programming), but I haven't used C++ in years. I'm going to be writing a highly parallel algorithm on a 100+ nodes system with shared memory. The nodes are Mac OS X, but I have access to *nix and windows machines, too.
Do people have suggestions for e...
This question came at the right time, as I'm struggling with optimization as well. I am aware of the different "normal" optimization routines in R, and I am aware of parallel packages like snow, snowfall, Rmpi and the likes. Yet, I didn't manage to get an optimization running in parallel on my computer.
Some toy code to illustrate :
f...
Hi,
I am trying to self-study both object oriented design and parallel programming using the following books:
"agile software development" by Robert C. Martin
Bruce Eckel's "Thinking in Patterns with Java"
"The Art of Multiprocessor Programming" Maurice Herlihy
"Programming Massively Parallel Processors" by David B. Kirk
But to prac...
These are some general questions I am facing while designing the error handling for an algorithm that is supposed to run in parallel using MPI (in C++):
Do Exceptions work inside code that is executed in parallel? Is the behaviour defined?
How do they work? Does that differ for different implementations?
Is it good practice - or should...
I am porting some code to Parallel.ForEach
and got an error with a continue I have in the code. Is there something equivalent I can use in a Parallel.ForEach functionally equivalent to 'continue' in a foreach loop?
Parallel.ForEach(items, parallelOptions, item =>
{
if (!isTrue)
continue;
});
...
I'm currently working in a dispatcher service that processes thousands of messages delivered in different channels (email, private message, application message) using EF4 and WCF.
To try to speed up message dispatching i'm trying to use Parallels:
Parallel.ForEach(currentMessageList, m =>
{
Processors.DispatcherWrapper.Dispatch(m, m.un...
Using the pthread library in C, is it possible to send a SIGSTOP signal to an individual thread?
I want to ensure that even though I create N threads in a loop, all should start executing only when all of them have been created.
I ask because the man page for pthread_kill() mentions:
Signal dispositions are
process-wide: if ...
Hi there,
I've a two while loops, which I will have run parallel with the TPL.
My code :
public void Initialize()
{
cts = new CancellationTokenSource();
ParallelOptions options = new ParallelOptions();
options.CancellationToken = cts.Token;
options.MaxDegreeOfParallelism = Environment.ProcessorCount;
task = Task.Fac...
I parallelized a simulation engine in 12 threads to run it on a cluster of 12 nodes(each node running one thread). Since chances of availability of 12 systems is generally less, I also tweaked it for 6 threads(to run on 6 nodes), 4 threads(to run on 4 nodes), 3 threads(to run on 3 nodes), and 2 threads(to run on 2 nodes). I have noticed ...
Whats a simple code that does parallel processing in python 2.7? All the examples Ive found online are convoluted and include unnecessary codes.
how would i do a simple brute force integer factoring program where I can factor 1 integer on each core (4)? my real program probably only needs 2 cores, and need to share information.
I know ...
By message-oriented middleware I am referring to technologies such as Advanced Message Queuing Protocol.
Obviously AMQP is a different beast than MPI, but I would think distributed-memory computations that operate in a master-slave manner could be trivially implemented using AMQP, letting AMQP handle equitable work distribution to sla...
I just started off with OpenMP using C++. My serial code in C++ looks something like this:
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <fstream>
#include <stdlib.h>
int main(int argc, char* argv[]) {
string line;
std::ifstream inputfile(argv[1]);
if(inputfile.is_open()) {
whi...
I am refactoring my program to use Parallel.ForEach. Before, when I was using a regular for loop, I was updating a WPF progress bar using Dispatcher, displaying the % completed by dividing the current array index by the array size. With a parallel foreach loop this does not display properly i.e. % jumps eratically, which is expected.
Ho...
Hello,
I'm working on a robotic problem. The situation is something like this:
There are N number of robots (generally N>100) initially all at rest.
Each robot attracts all other robots which are with in its radius r.
I've set of equations with which I can compute acceleration, velocity & hence the position of the robot after time del...
I am using mpiexec to run a couple of hello world executables. They each run, but the number of processes is always 1 where it looks like there should be 4 processes. Does someone understand why? Also I'm not sure why stty is giving me an invalid argument. Thanks!
Here is the output:
/bin/stty: standard input: invalid argument...
I want to convert a for loop which increments the iterator by 2 every pass into a Parallel For loop using the TPL. The data is not order dependent or constrained in any way, but I only want to process the data in every other element of my source array (which is _Datalist in the code below), hence the need to increment by 2.
My For Loop:...
I am trying to execute the following code and I keep getting an Index out of range exception when trying to assign array values to the list:-
int[] array = new int[1000000];
for (int i = 0; i < array.Length; i++)
{
array[i] = i;
}
List<int> list = new List<int>();
Parallel.For...