PVM – Parallel Virtual Machine Michael Springmann
PVM Eigenschaften Aufbau von Hypercomputern / Beowulf-Cluster verteilte Ressourcen als virtueller Rechner einfache Installation und Konfiguration leichte Programmeerstellung durch Bibliothek für Message-Passing-Funktionen Heterogenität auf Applikations-, Maschinen- und Netzwerk-Ebene möglich Anforderungen dementsprechend niedrig
Michael Springmann PVM - Entwicklung PVM 1.0 –Ab 1989 entwickelt von Vaidy Sunderam und Al Geist am Oak Ridge National Laboratory –Nur intern genutzt / nicht veröffentlicht PVM 2.0 –Februar 1991 an der UTK veröffentlicht PVM 3.0 –Februar 1993 veröffentlicht –Wurde de facto Standard für paralleles Rechnen Aktuell PVM –Letzte Aktualisierung September 2001
Michael Springmann Bestandteile von PVM Anwendungen –pvmd:PVM Dämon –pvm: Konsole Bibliotheken –pvm3 C Interface FORTRAN Interface... weitere wie Perl, Python, Java erhältlich Tools –XPVM –Debugger –Anwendung (z.B. pvmpov)
Michael Springmann PVM Dämon Läuft auf jedem Rechner im Cluster Führt KEINE Berechnungen durch Fungiert als Message-Router und Controller PVM Dämon Programm 1 Knoten 1 PVM Dämon Programm 2 Knoten 2 gepackte Daten und Statusinformationen
Michael Springmann Task-Task-Kommunikation Mit pvm_setopt(PvmRoute, PvmRouteDirect) lässt sich diese auch beschleunigen PVM Dämon Programm 1 Knoten 1 PVM Dämon Programm 2 Knoten 2 gepackte Daten und Statusinformationen Separate TCP- Verbindung
Michael Springmann PVM Konsole Wird mit Befehl „pvm“ gestartet Startet wenn nötig pvmd Zeigt den Prompt „pvm>“ Nimmt Befehle entgegen, z.B. –add –delete –conf –ps -a –quit –halt –spawn [->] Zeigt die Ausgabe
Michael Springmann PVM Hostfile Optionen Befehl „add“ startet neuen Dämon auf Optionen können direkt oder in „hostfile“ angegeben werden –lo=userid –so=pw –dx=Pfad zu pvmd –ep=Pfad zu Anwendungen –sp=relative Leistung im Cluster min. 1, max , default ist 1000 –bx=Pfad zum Debugger –wd=Arbeitsverzeichnis –ip=Hostname –so=ms
Michael Springmann PVM C Bibliothek Kontrollfunktionen –ähnlich Befehlen auf der Konsole –Beispiele int info = pvm_addhosts(char **hosts, int nhost, int *infos) int info = pvm_delhosts(char **hosts, int nhost, int *infos) int tid = pvm_mytid(void) int info = pvm_kill(int tid) Informationsfunktionen –Beispiele int tid = pvm_parent(void) int dtid = pvm_tidtohost(int tid) int info = pvm_perror(char *msg) int val = pvm_getopt(int what)
Michael Springmann PVM C Bibliothek II Signal-Funktionen int info = pvm_sendsig(int tid, int signum) int info = pvm_notify(int about, int msgtag, int ntask, int *tids) Nachrichten-Puffer-Funktionen –Beispiele int bufid = pvm_initsend(int encoding) int bufid = pvm_getsbuf(void) int oldbuf = pvm_setrbuf(int bufid) int info = pvm_freebuf(int bufid)
Michael Springmann PVM C Bibliothek III Funktionen zum Packen und Senden int info = pvm_pkint(int *np, int nitem, int stride) int info = pvm_pkdouble(int *dp, int nitem, int stride) int info = pvm_pkstr(char *cp) int info = pvm_packf(printf-like format...) int info = pvm_send(int tid, int msgtag) int info = pvm_mcast(int *tids, int ntask, int msgtag) Funktionen zum Empfangen und Entpacken int bufid = pvm_recv(int tid, int msgtag) int bufid = pvm_nrecv(int tid, int msgtag) int bufid = pvm_trecv(int tid,int msgtag,struct timeval *tmout) int bufid = pvm_probe(int tid, int msgtag) int info = pvm_upk*(...) wie pvm_pk*
Michael Springmann PVM C Bibliothek IV Gruppenfunktionen –PVM bietet dynamische, benannte Gruppen –Erleichtert hierdurch erheblich die Programmierung –Beispiele int inum = pvm_joingroup(char *group) int info = pvm_lvgroup(char *group) int size = pvm_gsize(char *group) int tid = pvm_gettid(char *group, int inum) int inum = pvm_getinst(char *group, int tid) int info = pvm_bcast(char *group, int msgtag) int info = pvm_reduce(void (*func)(), void *data, int nitem, int datatype, int msgtag, char *group, int root) –func kann vordefinierte Funktionen PvmMax, PvmMin, PvmSum oder PvmProduct annehmen int info = pvm_barrier(char *group, int count)
Michael Springmann Quellen Bücher –Al Geist et al.: PVM - A User‘s Guide and Tutorial for Networked Parallel Computing MIT Press 1994 Internet –PVM Homepage: (leider seit Wochen offline) –Netlib.org: –Studienarbeit von Carsten Schindler: bielefeld.de/ti/studien/pvm/title.htmlhttp://parallel.fh- bielefeld.de/ti/studien/pvm/title.html
Michael Springmann Ende der Präsentation