You are here

Parallel Programming

26 July, 2019 - 09:47
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at

In 1985, by design, G was developed to address and simplify parallel programming. If you have gone through the examples in this book, you have already developed various parallel programs.

In the following example, we will develop a simple program where interactivity and parallelism are part of the program.

Figure 9.1 Select Diagram for Parallel Programming  

From the menu select Edit »Copy.

Figure 9.2 Copy Selected Diagram  

Create a copy of the while loop and its contents by selecting Edit »Paste. Organize the diagram as shown in the figure below.

Figure 9.3 Paste Diagram  

Go the Front Panel window and organize the input and output controls as shown in the figure below.

Figure 9.4 Parallel G Program  

You have just completed your first parallel interactive program using G. Save the program, run it and interact with it.

Figure 9.5 Parallel Interactive G Program 

To end this program click on the stop and stop 2 terminals.