Group Abstract Group Abstract

Message Boards Message Boards

Parallel Computing and Object Oriented Programming - Part 3

Posted 6 years ago
4 Replies
Posted 3 years ago
POSTED BY: andrea andrea

Hello Andrea, Thank you for your information.

As you point out, there is a trade-off between parallelization and handling global variables. So how to shrink global variables is the first challenge for parallelization. However, there are cases where global variables cannot be eliminated. For example, in the LifeGame I contributed to Community a few years ago, the global variable of the entire board cannot be eliminated.

Title is, Applying Instance Indexed OOP to Multi-core Life Game Hirokazu Kobayashi, Free Posted 2 years ago.

Having said that, we cannot say that parallelization is meaningless. This is because you can get a reasonable computational speed. In this case, the approach is to take a thin band of regions adjacent to the edge of each parallelized region and copy it. In addition, I introduced a virtual addressing method for the address of each region and managed everything with a uniform address, so programming seems to have been considerably abstracted.

Enjoy, Mathematica.

Posted 3 years ago

Hello, the combination of OOP and parallel programming seems very very appealing. It is well known that parallel programming is well suited for problems where you are able to minimize the dependencies (in terms of variables, functions and data) between the computing units running within the different kernels. That means to get the maximum possible separation of input/output data and functions so as to avoid as much as possible the use of "shared variables" and "distributed definitions" which introduce large overheads and slow down the efficiency of parallel processing.

Now, from the analysis of your examples of parallel processing with OOP encapsulation of data and functions I wonder whether you could exploit some way this technique to get an efficient management of parallel processing when there are "global" problem variables and functions which otherwise would need to be shared and distributed among the different kernels. I hope my doubts have been clearly exposed. Thank you very much for your efforts and for any kind reply. Andrea

POSTED BY: andrea andrea

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard