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

Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

  • Upload
    franz

  • View
    44

  • Download
    1

Embed Size (px)

DESCRIPTION

University of Technology Computer Engineering and Information Technology Department. Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi. Agenda. 1. High Power Computing (HPC). 2. Computing platform evaluation. 3. Orientation toward PVM. 4. Initiation PVM from console. - PowerPoint PPT Presentation

Citation preview

Page 1: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Company

LOGO

Parallel Virtual Machine

Issued by: Ameer Mosa Al_Saadi

1

University of Technology Computer Engineering and Information Technology

Department

Page 2: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Agenda1. High Power Computing (HPC)

2. Computing platform evaluation

3. Orientation toward PVM

4. Initiation PVM from console

2

5. PVM configuration

6. Abstract PVM library command

7. Compile and Running program

8. Ten Years of Cluster Computing

Page 3: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

3

High Power Computing (HPC) Drivers

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

Life Sciences

CAD/CAM

Aerospace

Military ApplicationsDigital 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

4

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Progress Diagram Computer Food Chain

Computer Food

Chain (Now and Future)

1994 Computer

Food Chain

1984 Computer

Food Chain

Phase 1 Phase 2 Phase 3

5

Page 6: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Computing platform evaluation

6

Page 7: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Orientation 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

PVM 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Popular 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

PVM (Physical Vs Logical View)

13

Page 14: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Levels 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

Task i-l Task i Task i+1

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

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

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

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

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

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

+ x Load

PVM

Threads

Compilers

CPU14

Page 15: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

PVM 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

PVMd – 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Initiation 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

19

Page 20: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

XPVM

2

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

20

Page 21: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Abstract PVM library command

exit

create spawn

sendreceive

execute

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Hello 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Compile 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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Ten Years of Cluster Computing

1989 9490 96 97 99 2000PVM-1 PVM-2 PVM-3 PVM-3.4 Harness

Wide-area GRID experiments

Building a Cluster Computing Environment for 21st Century

Networksof Workstations PC Clusters

25

Page 26: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

The End

Thanks your Attention

26

Page 27: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

27

Mainframe

Vector Supercomputer

Mini ComputerWorkstation

PC

1984 Computer Food Chain

Page 28: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

1994 Computer Food Chain

28

Mainframe

Vector Supercomputer MPP

WorkstationPC

Mini Computer(hitting wall soon)

(future is bleak)

Page 29: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

Computer Food Chain (Now and Future)

29

Page 30: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

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: Parallel Virtual Machine Issued by: Ameer Mosa Al_Saadi

31