Category "multiprocessing"

Pool within a Class in Python

I would like to use Pool within a class, but there seems to be a problem. My code is long, I created a small-demo variant to illustrated the problem. It would b

How to apply a function to a 2D numpy array with multiprocessing

Suppose I have the following function: def f(x,y): return x*y How do I apply the funtion to each element in an NxM 2D numpy array using the multiprocessi

How to use multiple CPUs with Python on a HPC?

I'm working on a data analysis project in Python and I'm using a HPC cluster to process my data. I'm having a hard time getting my program to use multiple CPUs

Using multiprocessing pool from celery task raises exception

FOR THOSE READING THIS: I have decided to use RQ instead which doesn't fail when running code that uses the multiprocessing module. I suggest you use that. I a

Multiprocessing : use tqdm to display a progress bar

To make my code more "pythonic" and faster, I use "multiprocessing" and a map function to send it a) the function and b) the range of iterations. The implanted

Does user level threads take advantage of multiprocessing?

Does user level threads take advantage of multiprocessing ? I read one such answer here. But, it's not clear though. What does it mean by "user threads cannot

Multiprocessing a for loop?

I have an array (called data_inputs) containing the names of hundreds of astronomy images files. These images are then manipulated. My code works and takes a fe

Python Multiprocessing concurrency using Manager, Pool and a shared list not working

I am learning python multiprocessing, and I am trying to use this feature to populate a list with all the files present in an os. However, the code that I wrote

how to see which process owns a python thread

My understanding from multi-threading has been that one process (cpu core) can have multiple threads running with it. So far in python when I want to check whi

Python Ray has issues with ArcPy (ArcGIS Pro)

I'm working on a large-size Vehicle Routing Problems using ArcGIS. As my problem has large number of non-overlapping vehicle routing zones, I have decided to us

Can't pickle static method when using multiprocessing

I'm applying some parallelization to my code, in which I use classes. I knew that is not possible to pickle a class method without any other approach different

>90% of the time is spent on method 'acquire' of 'thread.lock' objects

To identify the step that is using most of the computation time, I ran cProfile and got the following result: ncalls tottime percall cumtime percall fil

Tensorflow and Multiprocessing: Passing Sessions

I have recently been working on a project that uses a neural network for virtual robot control. I used tensorflow to code it up and it runs smoothly. So far, I