21,935 questions
Best practices
2
votes
7
replies
149
views
How to add many fractions together as fast as possible?
This is related to this question.
Basically, I need to add many fractions together. Seems simple enough? Except it isn't simple.
I can't use fractions.Fraction class, that thing stupidly does fraction ...
Advice
0
votes
2
replies
32
views
Parallelized Access to TypedTuplestore data structure in PostgreSQL
I am working on a C-UDF for Postgres, where i would like to somehow read from a passed Typed-Tuplestore in parallel. Either pthreads or worker-processes is fine, as long as the access isn't combined ...
Advice
2
votes
6
replies
84
views
C++ containers and omp parallel
So I have an algorithm that gets a set of objects and computes a next set of objects. The code below is a toy version of the real code for brevity. The next snip illustrates the theme of the program ...
1
vote
2
answers
84
views
Removing unsafe pointer and make vector element comparison parallel
I have a little parallelizing question.
I want to implement a trait function for A, below, which iterates over its Vec<B> field, and for each elements looks for all the following elements, and ...
Best practices
0
votes
1
replies
17
views
scatter(x, broadcast=True) vs replicate(x)
I am trying to understand the difference in Dask between
scatter(x, broadcast=True) and replicate(x).
Both seem to provide a way to ensure copies of data is available in all nodes.
Are they actually ...
3
votes
1
answer
55
views
Why is Promise.all not supported inside MongoDB (Mongoose) transactions?
I’m using MongoDB transactions with Mongoose, and I noticed a warning in the official docs that confused me regarding concurrency.
According to docs for ClientSession.startTransaction():
IMPORTANT: ...
Tooling
0
votes
1
replies
69
views
Is this C syntactic parallel code run also for machines without parallel computing facilities?
Can this syntactic augmented parallel code be compiled and run also for machines without parallel computing facilities without any modification, except that, obviously, the equivalent sequential code ...
3
votes
3
answers
136
views
Launch suprocesses in Python by chunks and wait until end for start the next chunk
I need to launch a Python script lots of times from a Python script. Suppose I have a machine with 10 cores and I need to run my script 100 times, so I could divide the total in 10 chunks of 10 ...
3
votes
1
answer
83
views
Dask client connects successfully but no workers are available [closed]
I am using Dask for some processing. The client starts successfully, but I am seeing zero workers.
This is how I am creating the client:
client = Client("tls://localhost:xxxx")
This is the ...
1
vote
1
answer
169
views
Why when I place I/O task before CPU-bound task, runs faster than place I/O task after CPU-bound task?
using System.Diagnostics;
const int TASKS = 100;
var mainSw = Stopwatch.StartNew();
var tasks = Enumerable.Range(0, TASKS).Select(i =>
Task.Run(async () =>
{
await Task.Delay(...
Best practices
0
votes
5
replies
122
views
Parallel.ForEach Returning Values
I need to process a list of objects (not the same shown on the sample), which I thought could be greatly improved by running it in parallel.foreach loop. However, the result is not what I expected. ...
Advice
1
vote
0
replies
56
views
What is the best pattern for triggering N sub-workflows in parallel and resuming main workflow when all complete?
I need to trigger a dynamic number of sub-workflows in parallel (around 100)
and wait for ALL of them to complete before continuing the main workflow.
I’ve implemented a solution but I’m wondering if ...
Advice
2
votes
2
replies
74
views
Efficient MPI Parallelization Strategies for Localized PDE Subproblems within a Globally Decomposed Domain
I am working on a global PDE problem that is solved using a standard domain-decomposition strategy (e.g., Scotch, METIS). This part of the computation is well balanced across all MPI processes.
...
Tooling
1
vote
3
replies
83
views
using persistent-memory gawk how variables can created to be local and issolated from other execution instances?
The idea of Persistent-Memory gawk is fabulous because it improves the performance, size, and clarity of many scripts on static and reference data.
However, I have a significant problem in adopting ...
1
vote
0
answers
92
views
How to share a large CustomObject to workers in Python multiprocessing on Windows (spawn)?
I'm trying to run calculations using multiple cores in Python on multiple platforms (Linux, macOS, Windows). I need to pass a large CustomClass Object and a dict (both readonly) to all workers. So far ...