31
Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Embed Size (px)

Citation preview

Page 1: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Company

LOGO

Parallel Virtual Machine

Issued by: Ameer Mosa Al_Saadi

1

University of Technology Computer Engineering and Information Technology

Department

Page 2: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

AgendaAgenda

1. High Power Computing (HPC) 1. High Power Computing (HPC)

2. Computing platform evaluation2. Computing platform evaluation

3. Orientation toward PVM3. Orientation toward PVM

4. Initiation PVM from console4. Initiation PVM from console

2

5. PVM configuration 5. PVM configuration

6. Abstract PVM library command 6. Abstract PVM library command

7. Compile and Running program7. Compile and Running program

8. Ten Years of Cluster Computing8. Ten Years of Cluster Computing

Page 3: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

3

High Power Computing (HPC) Drivers

High Power Computing (HPC) Drivers

We need to Solve grand challenge applications using computer modeling, simulation and analysis.

Life SciencesLife Sciences

CAD/CAMCAD/CAM

AerospaceAerospace

Military ApplicationsDigital BiologyDigital Biology Military ApplicationsMilitary Applications

E-commerce/anything

• The world of modern computing potentially offers many helpful methods and tools for scientific and engineering to help them to applying theories, methods, and original applications in such areas as :

1. Parallelism.2. large-scale simulations.3. time-critical computing.4. computer-aided design .

• Use of computers in manufacturing, visualization of scientific data, and human-machine interface technology.

Page 4: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

4

How to Run App. Faster ?How to Run App. Faster ?

There are 3 ways to improve performance:–1. Work Harder–2. Work Smarter–3. Get Help parallelism.

Computer Analogy

–1. Use faster hardware: e.g. reduce the time per instruction (clock cycle).

–2. Optimized algorithms and techniques–3. Multiple computers to solve problem: That

is, increase no. of instructions executed per clock cycle.

Page 5: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Progress Diagram Computer Food Chain

Progress Diagram Computer Food Chain

Computer Food

Chain (Now and Future)

Computer Food

Chain (Now and Future)

1994 Computer

Food Chain

1994 Computer

Food Chain

1984 Computer

Food Chain

1984 Computer

Food Chain

Phase 1Phase 1 Phase 2Phase 2 Phase 3Phase 3

5

Page 6: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Computing platform evaluationComputing platform evaluation

6

Page 7: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Orientation toward PVMOrientation toward PVM

7

How can I do computer parallelism?Answer\\By Some Message Passing System.

What is Message Passing? Why Do I Care?Message passing allows two processes to:

Exchange informationSynchronize with each other.

From here appearing needed to the tool like Parallel Virtual Machine (PVM)

Page 9: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

PVM definitionPVM definition

9

• PVM is a software tool for parallel networking of computers.

PVM is a software tool provide single interface and environs to exploit resources on heterogeneous computers interconnected by network for execute tasks with help message system, to be used as a coherent and flexible concurrent computational resource, or a

"Parallel Virtual Machine"

Page 10: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Popular PVM UsesPopular PVM Uses

10

Poor man’s SupercomputerBeowulf (PC) clusters, Linux, Solaris, NTCobble together whatever resources you can get

Metacomputer linking multiple Supercomputersultimate performance: eg. have combined nearly 3000

processors and up to 53 supercomputers

Education Toolteaching parallel programmingacademic and thesis research

Page 11: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

What Must provide PVM? What Must provide PVM?

1111

Resource Managementadd/delete hosts from a virtual machine

Process Controlspawn/kill tasks dynamically

Message Passingblocking send, blocking and non-blocking receive,

mcast Dynamic Task Groups

task can join or leave a group at any timeFault Tolerance

VM automatically detects faults and adjusts

Heterogeneous Virtual Machine support for:

Page 12: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

PVM Model PVM Model

1212

• PVM daemon (pvmd3 or pvmd ): run in each node for accepting remote connection and connecting to remote machines.

• Interface (PVM library – libpvm3.a): library with functions for (send or receive task)programmer use with (C , C++, Fortran).

• Environs : execution units(processors), memories and network….etc.

12121212

PVM communication

Lib pvm3

User program

pvmd3

Lib pvm3

User program

pvmd3

Application #1 Application #2

12

Page 13: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

PVM (Physical Vs Logical View) PVM(Physical Vs Logical View)

13

Page 14: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Levels of ParallelismLevels of Parallelism

1414

Code-GranularityCode ItemLarge grain(task level)Program

Medium grain(control level)Function (thread)

Fine grain(data level)Loop (Compiler)

Very fine grain(multiple issue)With hardware

Code-GranularityCode ItemLarge grain(task level)Program

Medium grain(control level)Function (thread)

Fine grain(data level)Loop (Compiler)

Very fine grain(multiple issue)With hardware

Task i-lTask i-l Task iTask i Task i+1Task i+1

func1 ( ){........}

func1 ( ){........}

func2 ( ){........}

func2 ( ){........}

func3 ( ){........}

func3 ( ){........}

a ( 0 ) =..b ( 0 ) =..

a ( 0 ) =..b ( 0 ) =..

a ( 1 )=..b ( 1 )=..

a ( 1 )=..b ( 1 )=..

a ( 2 )=..b ( 2 )=..

a ( 2 )=..b ( 2 )=..

++ xx LoadLoad

PVM

Threads

Compilers

CPU

14

Page 15: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

PVM TaskPVM Task

15

• Parallel compute is divided into sequence tasks, which can execute parallel.

• Tasks is can start on separate nodes, where execute is not migration.

• Each task has a one identification TID, which is create by PVM daemon.

• Message addressing by help TID.

• Tasks can rang to groups.

• Task is implementing as OS process.

15

Page 16: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

PVMd – daemond executePVMd – daemond execute

161616

1. Master : usually start from control command.

2. Create socket to communicate with tasks and pvmd.

3. Read hostfile.4. Start slave pvmd- on remote

node.5. Slave : receive parameters

from master through arguments and configuration message.

6. Return results to master.7. Master: wait all tasks to end

then find final results.

Page 17: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Initiation PVM from consoleInitiation PVM from console

1. # pvm Pvm>

2. #pvm hostfile

- hostfile : content list(index) nodes, which have be component of PVM (on each row one name).

17

Page 18: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

PVM configuration PVM configuration

• Instruction PVM in console:

1. Add host name , delete host name.

2. Conf (extract actual configuration).

3. Halt (Stand off environs ).

4. quit (end console ).

5. Spawn (initiation new task).

18

Page 19: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

19

Page 20: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

XPVMXPVM

2

XPVM screen shot provides visual information about machine utilization, flows, configuration PVM Cluster

20

Page 21: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Abstract PVM library command Abstract PVM library command

exit

create spawn

sendreceive

executeexecute

Program steps

21

recognize

To create task id “”TID: tid = pvm_mytid ();

To spawn tasks to another computers: numt = pvm_spawn();

To recognize worker from supervisor : pvm_parent();To send require data to task “TID”:

pvm_pkdatatype (); pvm_send ();

To receive result from workers or reveres : pvm_recv ();

pvm_upkdatatype ();

To exit Pvm execute : pvm_exit ();

N

d

Page 22: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Ex. Program Ex. Program #include <stdio.h>#include "pvm3.h"

main(){ int cc, tid; char buf[100];

printf("i'm t%x\n", pvm_mytid());

cc = pvm_spawn("hello_other", 0, 0, "", 1, &tid);

if (cc == 1) printf(“start hello_other\n"); else printf("can't start hello_other\n");

If( pvm_parent()==PVMNOPARENT) ;{ cc = pvm_recv(-1, -1); pvm_bufinfo(cc, 0, 0, &tid); pvm_upkstr(buf); printf("from t%x: %s\n", tid, buf);

} pvm_exit(); exit(0);}

22

Page 23: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Hello World – PVM StyleHello World – PVM Style

Process AInitializeSend(B, “Hello World”)Recv(B, String)Print String

“Hi There”

Finalize

Process BInitializeRecv(A, String)Print String

“Hello World”

Send(A, “Hi There”)Finalize

23

Page 24: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Compile and Running programCompile and Running program

To compile Any cpp program in Linux OS can use command:

# g++ hello.cpp

To Running Any cpp program in Linux OS can use command:

#./a.out

24

Page 25: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Ten Years of Cluster ComputingTen Years of Cluster Computing

1989 9490 96 97 99 2000

PVM-1 PVM-2 PVM-3 PVM-3.4Harness

Wide-area GRID experiments

Building a Cluster Computing Environment for 21st Century

Networksof Workstations PC Clusters

25

Page 26: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

The End The End

Thanks your Attention

26

Page 27: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

27

Mainframe

Vector Supercomputer

Mini ComputerWorkstation

PC

1984 Computer Food Chain1984 Computer Food Chain

Page 28: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

1994 Computer Food Chain1994 Computer Food Chain

28

Mainframe

Vector Supercomputer MPP

WorkstationPC

Mini Computer(hitting wall soon)

(future is bleak)

Page 29: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

Computer Food Chain (Now and Future)Computer Food Chain (Now and Future)

29

Page 30: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

3030

Abstract PVM library command To create task id “”TID: tid = pvm_mytid ();

To spawn tasks to another computers: numt = pvm_spawn();

To recognize worker from supervisor computer: pvm_parent()

To send require data to task “TID”: pvm_pkdatatype (); pvm_send ();

To receive result from workers to each task “TID” or reveres : pvm_recv (); pvm_upkdatatype ();

To exit Pvm execute : pvm_exit ();

Page 31: Company LOGO Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi 1 University of Technology Computer Engineering and Information Technology Department

31