in reply to Re^2: Multythread script. The best way.
in thread Multythread script. The best way.

Now I know what and where to read.

Okay, great. But that doesn't seem to be making best use of the "collective intelligence of the monastery".

We are talking about the specific treatment of the strength and aerodynamic data.

So, you are looking to distribute cpu-intensive numerical calculations over multiple cores?

If yes, then you can probably avoid having to read half or more of those.

Will there be a final phase of the processing that will need to consolidate the partial calculations from the distributed subsets? If so, we can probably reduce your search to one or two possibilities.

Are you looking to run this on one multi-cored box or distribute it over several or many boxes? A completely different subset of the list will be applicable in that case.

but ....


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Multythread script. The best way.

Replies are listed 'Best First'.
Re^4: Multythread script. The best way.
by builat (Monk) on Nov 02, 2013 at 07:10 UTC
    0. Yes I need to distribute cpu-intensive numerical calculations over multiple cores. In fact it is not math calculation rather it is check for compliance with a number of attributes (about 100).

    1. No it is no final step. Each thread shuld upload satisfying result to DB (MySQL).

    2. I'll looking to run it on one muli-cored box. But I'd like idea about several computers in calculations. Seems it will be next step, next time.

    Thank you for your involvement
      I need to distribute cpu-intensive numerical calculations over multiple cores. In fact it is not math calculation rather it is check for compliance with a number of attributes (about 100).

      Then forget Coro, or the event driven frameworks.

      Concentrate on threads and Parallel::ForkManager.

      The decision between those two is: in part elective; in part platform dependent; but mostly will centre upon the details of your iterations.

      eg. if the logical approach is to run 100 passes (not all concurrently) over the entire dataset I might use one approach. On the other hand if it makes more sense to perform 1 pass over each of a number of subsets I'd use another.

      I'd need more info to choose which.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Thanks again. I already have read about threads and Parallel::ForkManager.

        And decide that my way is Parallel::ForkManager. So it time to do my work.