Python Forum
How to parallelize an 2D array?
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to parallelize an 2D array?
#9
(May-11-2017, 04:57 PM)nilamo Wrote: It depends on how much data there is.  Starting processes and passing data to and from them is not free, that takes time.  So if there isn't a lot of data (like, a LOT), then the simple task of starting a process will slow your program down.

On the other hand, if this was realtime data, that you needed to process constantly, then you could start looking at having two different programs... one that ran all the time, and kept a pool of worker processes, and another that fed it data as that data becomes available.  Then you don't have the slowness of spawning processes, as they're already running in the pool just waiting for more data.

Well I have a lots of data (3.5 Gb csv file) that I divided in smaller files. It's an inversion problem, which I have a big map made for the csv file, and I selected profiles on this map, that generates me the input files of my program (the one that I trying to parallelize some functions like the previously posted). 

The function that I posted it's called many times by the minimization algorithm. So, because it's an exhaustive and repetitive process, I was wondering if the parallel programing can improve the velocity of convergence and how fast I have and answer from my program. I'm migrating from MatLab, so I know that I can improve my code removing some io's from the inside of this kind of function. Thats wasn't a concerning in MatLab because I used some global variables, but I had needed to make some adjusts to convert to Python. Now I known how to use args in the minimization algorithm, which can do my functions running a bit faster.
Reply


Messages In This Thread
How to parallelize an 2D array? - by Felipe - May-10-2017, 07:03 PM
RE: How to parallelize an 2D array? - by Mekire - May-10-2017, 07:08 PM
RE: How to parallelize an 2D array? - by Felipe - May-10-2017, 07:18 PM
RE: How to parallelize an 2D array? - by nilamo - May-10-2017, 09:49 PM
RE: How to parallelize an 2D array? - by Felipe - May-10-2017, 10:15 PM
RE: How to parallelize an 2D array? - by nilamo - May-11-2017, 05:08 AM
RE: How to parallelize an 2D array? - by Felipe - May-11-2017, 01:44 PM
RE: How to parallelize an 2D array? - by nilamo - May-11-2017, 04:57 PM
RE: How to parallelize an 2D array? - by Felipe - May-13-2017, 05:11 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020