4 parallel computing and pvm

Post on 26-Feb-2016

37 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

4 Parallel Computing and PVM . 黃信健. 4.1 Introduction. Parallel Virtual Machine PVM Beowulf Cluster physics2 Windows 系統下之分散式 運算 Run pssdot laplace and bug on several CPU’s. Windows 系統下之分散式運算. Distributed Computing under Windows. 4.2 Installation. PVM – the Parallel Virtual Machine - PowerPoint PPT Presentation

TRANSCRIPT

4 Parallel Computingand PVM

黃信健

4.1 IntroductionParallel Virtual Machine PVMBeowulf Cluster physics2Windows 系統下之分散式運算Run pssdot laplace and bug on several CPU’s

Windows 系統下之分散式運算Distributed Computing under

Windows

4.2 Installation

PVM – the Parallel Virtual Machine Unix/Linux vs. Windows systemsrsh rshd service Physics1 consists of 4 pc’s — 3

Windows 98 and 1 Windows Me

Physics1Pvm1(PIII500)

Pvm4(PIII200)

Pvm3(PIII200)

Pvm2(PIII233)

Physics2, workstation and HPC

32 節點 PC 叢集、刀鋒叢集、高效能平行運算電腦

Two Programming Strategies MPMD — Multiple Program Multiple Data

The Bifurcation Map SPMD — Single Program Multiple Data

2 D Laplace Equation Solver (Jacobi Method)

Case I – Bifurcation Map

)1(1 iii xxx

Result

Load Balancing 

PVM1 (PIII500)

PVM2 (PIII233)

PVM3 (PII 200)

PVM4 (PII 200)

4104K 2210K 1579K 1579K

Table 1. The size of data files

C Loop over all worker processes DO 10 K = 1, NPROCS-1C Spawn process and check for error CALL PVMFSPAWN( 'psdot', 0, 'anywhere', 1, TIDS(K), IERR ) IF (IERR .NE. 1) THEN WRITE(*,*) 'ERROR, could not spawn process #',K, $ '. Dying . . .' CALL PVMFEXIT( IERR ) STOP END IFC Send out startup info CALL PVMFINITSEND( PVMDEFAULT, IBUF ) CALL PVMFPACK( INTEGER4, J, 1, 1, IERR ) CALL PVMFPACK( REAL4, X(I), J, 1, IERR ) CALL PVMFPACK( REAL4, Y(I), J, 1, IERR ) CALL PVMFSEND( TIDS(K), 0, IERR ) I = I + J 10 CONTINUE

5.3 spmd-psdot.f - send

Case II – 2D Laplace Equation

  

ResultBenchmark Timing

  

Number of nodes 2 nodes 3 nodes 4 nodes

CPU time (%) 100 99.23 59.91

Table 2 CPU time against number of nodes

Blade Speedup

12

48

16windows

blade0

200

400

600

800

1000

perc

enta

ge

nodes

Predator-prey

A Visual Fortran Image Processing System

Distributed computing – Unsmoothed

Distributed computing – smoothed

Outline

平行運算PVMmaster-slave model

Parallel Virtual Machine (PVM)

PVM (ornl) and MPI (anl)Oak Ridge National LabArgonne National Lab

Unix / Linux / Windows systemsRemote Shell

rsh / rshd service Winrshd / Arshd

Setup PVM InstallShield Install to C:\PVMSet path for pvmd, compiler,

libraries, and temp directoryExecutable –> C:\pvm\bin\win32Output –> C:\PVM

Setup Winrshd Comercial package from

http://www.winrshd.com InstallShield Install to C:\progra~1\winrshdConfigure the trusted user

database IP list 140.137.34.* http://www.ataman.com

PVM Console Commandspvm> add host

add student25delete student25

pvm> confpvm> halt

Ex Program psdot.f – I

Ex Program psdot.f – II

Ex Program psdot.f – III

Ex Program psdot.f – IV

Ex Program psdot.f – V

Ex Program psdot.f – VI

Ex Program psdot.f – VII

Ex Program psdot.f – VIII

Ex Program master.f – I

Program master.f – II

Program master.f – III

Program master.f – IV

Program slave.f – I

Program slave.f – II

Program slave.f – III

Program slave.f – IV

Laplace’s Equation

2

2

2

2

2

2

4

0

0

U x x

U x

U x y tx

U x y ty

( ) ( )

( )

( , , ) ( , , )

(Poisson's eq.)

(Laplace's eq.)

Finite Difference

U x x y U x y Uxx U

xx

U x yx

U x x y U x x y U x yx

U x yy

U x y y U x y y U x yy

U x x y U x x y U x yx

U x y y U

( , ) ( , ) ( )

( , ) ( , ) ( , ) ( , )( )

( , ) ( , ) ( , ) ( , )( )

( , ) ( , ) ( , )( )

( , ) (

12

2

2

2

2

22

2

2 2

2

2 2

2

x y y U x yy, ) ( , )

( )

2 02

)],(),(

),(),([41),(

yxUyxU

yxyxUyxUyxU

Jocobi Method

Domain Decomposition

  

The Logistic Map

)1(1 iii xxx

x: population : growth rateA quadratic nonlinear map

The Parallel Bifurcation Map

32 節點 Windows PC 叢集Physics2

The EndNext: sequential and parallel

laplace solvers

top related