Contents:
POSYBL is a nice implementation of the Linda parallel processing environment by G. Schoinas.
If you wish to install POSYBL (with my modifications), first go to the src directory and copy my files NMsys_util.c and NMtmanager.c to sys_util.c and tmanager.c, respectively. Click here to get those two files.
Then from the src directory, type
makein the src/ directory.
Afterward, copy the executables (startup, system and tmanager) to ../bin and libposybl.a to ../lib.
The package compiles and runs on SunOS 4.1 and MIPS-based DEC Ultrix machines. It does not compile on newer Solaris systems. Though it compiles under HP-UX there seems to be a fundamental runtime problem, at least on our CSIF machines. On our SGIs, the system will compile if one comments out "signal ( SIGQUIT, exit )" and changes calls to vfork() to fork(), but again there is a fundamental runtime problem.
POSYBL is a fairly straightforward Linda implementation, except for the following two points:
lstring("xyz")Following is an example from MatMult.c our sample program available here.
in(lstring("next row"),qlint(&Row)); out(lstring("next row"),lint(Row+1));The first statement searches for and removes from the tuple space a 2-tuple whose first component is the string "next row" and the second component is some integer. The value of the second component is then place in Row. The second line outputs to the tuple space a 2-tuple whose first component is the string "next row", and whose second components is the values of Row+1.
To run your code, you will need a front-end program which calls eval() and your "worker" program which is invoked by eval(). I've written the front end for you, under the name POSYBLFrontEnd.c, available here. If it is not already in your $POSYBLDIR/bin directory, compile it, by typing
gcc -g -o POSYBLFrontEnd POSYBLFrontEnd.c $POSYBLDIR/lib/libposybl.a
and then make sure it is somewhere in your search path.
To compile your POSYBL application code, say worker.c, do:
gcc -g -o worker worker.c $POSYBLDIR/lib/libposybl.a
To run your POSYBL application code:
chimi 1 #0 ~matloff/Pub/POSYBL/bin/tmanager #2 ~matloff/Pub/POSYBL/examples garnacha 1 #0 ~matloff/Pub/POSYBL/bin/tmanager #2 ~matloff/Pub/POSYBL/examples
Here the machines chimi and garnacha are assigned the speeds 1, the location of tmanager is given on each machine and the directory containing the worker program is given. (Stick to the #0 and #2 designations shown here.)
POSYBLFrontEnd node_file worker_program number_of_workers cmd_line_args
Note that the name of the worker program should NOT include a full path; it is simply the name within its directory.
The command-line arguments, if any, are intended for use by your worker program. (Note: These are passed by the front end as integers, but as long as you are running on a homogeneous set of machines then these can be floats.)
When you leave the ACS machines, make sure to remember to kill the tuple manager processes! (Insert a check for this in your .logout file.)
tmanager port_number &The port number must be between 1024 and 65535, inclusive. Before choosing a port number, try
ps ax | grep tmanagerto see if it is already in use. (You would get an error message if you tried a duplicate one anyway.) On some machines you may need to type "ps -e" or some other command instead of "ps ax" to get a list of all processes.
This tuple manager invocation will serve all your POSYBL programs until you terminate it, so don't have more than one running at once and make sure your code cleans up all leftover tuples at the end of execution. In particular, IF YOU HAVE TO KILL YOUR POSYBL PROGRAM, ITS TUPLES WILL STILL BE THERE, SO YOU SHOULD TERMINATE AND RESTART THE TUPLE MANAGERS.
I have discovered that the group number argument in init() does not seem to work except for 0.
For information on how to debug, see my parallel debugging tutorial.
The tuple space is apparently distributed among the nodes. When one node wishes to query another about a tuple which is the subject of an in() or rd() call, it will send a "template" which lists the matching criteria for that tuple.