450 likes | 600 Views
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
E N D
4.1 Introduction • Parallel Virtual MachinePVM • BeowulfClusterphysics2 • Windows 系統下之分散式運算 • Run pssdotlaplace and bug on several CPU’s
Windows 系統下之分散式運算 Distributed Computing under Windows
4.2 Installation • PVM–the Parallel Virtual Machine • Unix/Linux vs. Windows systems • rsh rshd service • Physics1 consists of 4 pc’s — 3 Windows 98 and 1 Windows Me
Physics1 Pvm1(PIII500) Pvm2 (PIII233) Pvm3 (PIII200) Pvm4 (PIII200)
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)
PVM1 (PIII500) PVM2 (PIII233) PVM3 (PII 200) PVM4 (PII 200) 4104K 2210K 1579K 1579K Result • Load Balancing Table 1. The size of data files
5.3 spmd-psdot.f - send C Loop over all worker processes DO 10 K = 1, NPROCS-1 C 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 IF C 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
Number of nodes 2 nodes 3 nodes 4 nodes CPU time (%) 100 99.23 59.91 Result • Benchmark Timing Table 2 CPU time against number of nodes
平行運算 PVM master-slave model Outline
Parallel Virtual Machine (PVM) • PVM (ornl) and MPI (anl) • Oak Ridge National Lab • Argonne National Lab • Unix / Linux / Windows systems • Remote Shell • rsh /rshd service • Winrshd / Arshd
Setup PVM • InstallShield • Install to C:\PVM • Set path for pvmd, compiler, libraries, and temp directory • Executable –> C:\pvm\bin\win32 • Output –> C:\PVM
Setup Winrshd • Comercial package from http://www.winrshd.com • InstallShield • Install to C:\progra~1\winrshd • Configure the trusted user database • IP list 140.137.34.* • http://www.ataman.com
PVM Console Commands • pvm> add host • add student25 • delete student25 • pvm> conf • pvm> halt
The Logistic Map • x: population : growth rate • A quadratic nonlinear map
The End Next: sequential and parallel laplace solvers