Tkpvm version 1.0 The latest version of this file can be found at http://www.nici.kun.nl/tkpvm/welcome.html What is tkpvm tkpvm is the result of a wedding. The husband is pvm3.3.x (preferably 3.3.10) and the wife is Tcl7.5/Tk4.1. Probably it will work unchanged for pvm3.4.0, but that is not released yet so I cannot try it out. As usual with a marriage, both sides profit from the combination: PVM-users The Tcl-language is an interpreted scripting language. With Tkpvm you can now write pvm processes in the Tcl language, as opposed to C or Fortran. No compilations are necessary any more, once you created pvmsh and pvmwish. The shell program pvmsh can be seen as an enhanced version of the pvm console. It can control the virtual machine in the same way as the pvm console does, but it is a full shell with history substitution ('!!') and variables. The pvmwish interpreter has the same function as pvmsh, but in addition it has a lot of commands to build your own grapical user interface. There are buttons, entry widgets, menu's and so on. Now each process can have input and output through it's own X11-window. Tcl/Tk-users PVM is a library for controlling a virtual parallel machine which consists of any number of hosts. Processes can spawn and kill each other and communicate through a pvm-channel. It can be compared with the Tk 'send' command, only it works with sockets. Therefore it runs without Tk (X11), and the processes can use different displays and run on different hosts. In addition, pvmsh takes control of the event loop from Tcl, while pvmwish does the same with Tk. The library can also be dynamically loaded in tclsh or wish, only you have to provide your own event-loop then (a small patch to Tcl/Tk which makes this not necessary any more is provided in the patch subdirectory of the Tkpvm distribution). The pvm-related commands that can be used in Tcl now are: send, recv Send and recieve anything from or to any other process. spawn, kill Spawn and kill other processes. tasks Request information about running tasks. bind Bind pvm-related events in the Tcl/Tk event loop. This is a very powerful command which makes programming an event-driven application much easier. To do the same in C or Fortran is much more difficult. PVM has no equivalent function for this. Tk has, but originall it is only used for X-events. Now the same can be done with PVM-events. And many more..... How to install tkpvm Tkpvm can be downloaded from 6 sites (as far as I know): * NICI ftp-server (The Netherlands) * Tcl archive (and other mirrors of these) * Internet Parallel Computing Archive (U.K.) * Mirror in Australia * Mirror in France * Mirror in Japan Before you configure and compile tkpvm1.0, first install Tcl7.5 and pvm3.3.x (preferabble 3.3.10 or later). If you want graphical capabilities you need Tk4.1 too. * ftp://ftp.smli.com/pub/tcl/tcl7.5.tar.gz * ftp://ftp.smli.com/pub/tcl/tk4.1.tar.gz * http://www.netlib.org/pvm3/pvm3.3.10.tar.gz If you want to be able to create standalone applications (that don't need installation of Tcl/Tk on your system to run), you need to apply the "plus"-patches to Tcl and Tk: * ftp://ftp.nici.kun.nl/pub/tkpvm/tcl7.5plus.patch.gz * ftp://ftp.nici.kun.nl/pub/tkpvm/tk4.1plus.patch.gz Copy the patch files to the main directories of Tcl or Tk, and run the GNU 'patch' utility. Gunzip (to uncompress .gz-files) and patch can be downloaded from: * ftp://prep.ai.mit.edu/pub/gnu/gzip-1.2.4.tar * ftp://prep.ai.mit.edu/pub/gnu/patch-2.1.tar.gz But if you cannot do that, there are full distributions available of these adapted versions of Tcl7.5/Tk4.1. All adaptations made are fully upwards compatible with the official SUN distributions: * ftp://ftp.nici.kun.nl/pub/tkpvm/tcl7.5plus.tar.gz * ftp://ftp.nici.kun.nl/pub/tkpvm/tk4.1plus.tar.gz For pvm3.3.x, don't forget that the environment variables PVM_ROOT and PVM_ARCH need to be set at all times. Best is to define these in your '.cshrc'. Also, it is useful to add several paths that are used for pvm to the 'path' variable (for the executables) and the 'LD_LIBRARY_PATH' environment variable (LPATH or SHLIB_PATH for HP_UX). An example file "cshrc.stub" is provided. You could append this file to your .cshrc file. Create your ".Pvm_hosts" file, which is the default hostfile for pvmsh and pvmwish. If you don't create this file, only the current machine will be present in the initial network. You can always add new machines to the virtual machine by the "addhost" command. Run "configure" and "make". It is advised that you configure Tcl, Tk and Tkpvm with the option "--enable-shared". This results in shared libraries being created, which costs less memory and results in much smaller executables: --enable-shared Enable creation of shared library In addition, make has the following options: static Make static executables standalone Make standalone executables pvmsh Make pvmsh pvmwish Make pvmwish test Make and execute test hello.c Create example C-code of tcl-script hello Create example standalone executable of tcl-script More Information about Tcl/Tk and PVM There is a Tcl/Tk home page and a PVM home page on the WWW. And there are newsgroups comp.lang.tcl and comp.parallel.pvm where you can get more help. There also is more information available in the tkpvm index ---------------------------------------------------------------------------- written by J. Nijtmans for the [MIAMI] project