Tkpvm version 1.2

references since Mar 8 1996
The latest version of this file can be found at http://www.cogsci.kun.nl/tkpvm/welcome.html

What is tkpvm

tkpvm is the result of a wedding. The husband is pvm3.3.x (preferably 3.3.11) and the wife is Tcl7.5/Tk4.1, Tcl7.6/Tk4.2 or Tcl8.0/Tk8.0. 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 (version 1.2) can be downloaded from the following sites: Before you configure and compile tkpvm1.2, first install Tcl (Tcl7.6p2 is preferred) and pvm3.3.x (preferable 3.3.11 or later). If you want graphical capabilities you need Tk (preferrable version 4.2p2) as well.

As an alternative, Tkpvm 1.2 also works well (and much faster!!) with Tcl8.0/Tk8.0. Use version 8.0a2 or greater, if possible. Patches needed for Tcl8.0a2 are included in the distribution. 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: 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:

But if you cannot do that, there are full distributions available of these adapted versions of Tcl7.6/Tk4.2. All adaptations made are fully upwards compatible with the official SUN distributions:

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