Newsgroups: comp.lang.tcl,comp.parallel.pvm
From: Jan Nijtmans <nijtmans@nici.kun.nl>
Subject: ANNOUNCE: tkpvm1.0b1. First beta release available now
Organization: NICI (Nijmegen Institute of Cognition and Informatics)
Date: 28 Jul 1995 16:41:20 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3vb3vg$g3v@wn1.sci.kun.nl>

What is tkPvm
-------------

tkPvm is the result of a wedding. The husband is pvm3.3.x (preferably 3.3.7)
and the wife is Tk4.0 or Tk3.6 (preferably 4.0). Probably it will work
unchanged for pvm3.4.0, but that is not released yet so I cannot try it.
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 ('!!'), variables,
        arthimetics and much more. 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 has access
	to the same event loop as Tk 4.0. This means that you now can use
	the 'after' and 'fileevent' commands without tk and X11.

The pvm-related commands that can be used in Tcl now are:

send, recv
    Send and recieve anything from or to any other process. The
    send command now can be used without X11, but the original
    syntax is still supported and still works the same way.
spawn, kill
    Spawn and kill other processes.
tasks
    Request information about running tasks. (This command will be
    expanded in the next version)
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 too.

And many more..... (see http://www.nici.kun.nl/tkpvm/commands.html)

Examples
--------
Some demo's from the pvm3 distribution have been translated to Tcl/Tk.,
ready to run after you installed pvmsh and pvmwish. For example the
"hello" and "hello_other" demo's can now be written in resp 5 and 2
lines of Tcl-code. Compare that with the 18 lines of C-code, both for
hello_other.c and hello.c. And these run without compilation:
*************** hello.tcl *******************
#!/usr/local/bin/pvmsh
puts stdout "i'm [id]"
bind [spawn [pwd]/hello_other.tcl] 1 {
    puts stdout "from %t: [recv string]"
}
************** hello_other.tcl **************
#!/usr/local/bin/pvmsh
send parent 1 "hello, world from $env(HOST)"
*********************************************

How to install tkPvm
--------------------

First, install Tcl7.4 and pvm3.3.7. If you want graphical capabilities
you need Tk4.0 too. These can be downloaded from:

	ftp://ftp.smli.com/pub/tcl/tcl7.4.tar.Z
	ftp://ftp.smli.com/pub/tcl/tk4.0.tar.Z
	http://www.netlib.org/pvm3/pvm3.3.7.tar.gz

For pvm3.3.7, 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 (the pvm libraries). All
 information about this is available inside the pvm distribution.

It is advised that you use shared libraries as much as possible,
although tkpvm will run fine without it. The NICI ftp-server has
patches available for Tcl7.4 and Tk4.0 to archive that. Copy the
patch files to the main directories of Tcl7.4 and Tk4.0, and run
the GNU 'patch' utility. Gunzip (to uncompress .gz-files), patch
and the patches for Tcl7.4 and Tk4.0 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
	ftp://ftp.nici.kun.nl/pub/tkpvm/tcl7.4+.patch.gz
	ftp://ftp.nici.kun.nl/pub/tkpvm/tk4.0+.patch.gz


More Information about Tcl/Tk, PVM and tkPvm
--------------------------------------------

There is a Tcl/Tk home page <http://www.sco.com/Technology/tcl/Tcl.html>
and a PVM home page <http://www.epm.ornl.gov/pvm/> on the WWW. And there
are newsgroups comp.lang.tcl <news:comp.lang.tcl> and comp.parallel.pvm
<news:comp.parallel.pvm> where you can get more help

A new home page for tkpvm is available now at the NICI WWW server:

	http://www.nici.kun.nl/tkpvm/

These pages will be updated for future releases of tkpvm.

	Jan Nijtmans
	NICI (Nijmegen Institute of Cognition and Information
	email: nijtmans@nici.kun.nl
	url:   http://www.nici.kun.nl/~nijtmans/


