my first e-mail

Erik Arjan Hendriks erik@hendriks.cx
Sat, 16 Dec 2000 14:34:11 -0500


On Fri, Dec 15, 2000 at 12:14:05PM +0100, Andrea Galimberti wrote:
> Hello,
>   I'm new in this mailing list so I hope you'll accept a pair of stupid
> questions:
> 1 - In http://www.beowulf.org/software/bproc.html there are some instructions
>     to subscribe the beowulf-bproc mailing list sending a mail to:
>     beowulf-bproc-request@beowulf.gsfc.nasa.gov, but this address doesn't exists.
>     Is beowulf-bproc the same (maybe the older version) of this list? If not,
>     are the two lists related in some way?
> 2 - I'm using bproc-0.2.1. There are some newer versions?
> 
> Now the "big" question :)
> 	
> I'm using bproc-0.2.1 with my two linux machines (for "experimental"
> purposes).
> I'm developing an application that rforks on every active node. When a node
> dies/a new one becomes up the application should close connection/rfork
> and activate a new connection. To do so it periodically checks active nodes
> with bproc_nodeup(), but this don't work!
> Checking the code in bproc.c I found the code:
> 
> int bproc_nodeup(int num) {
>    num = map_user_node(num);
>     if (num == -1) return 0;
> 
>     /* XXX There needs to be a way to refresh the node map ... */
>     return nodemap[num];
> }
> 
> To refresh the node map at every call of bproc_nodeup() I modified it in this
> way:
> 
> int bproc_nodeup(int num) {
>     num = map_user_node(num);
>     if (num == -1) return 0;
> 
>     /* Refresh the node map ... */
>     read_config("/var/run/bproc");
>     return nodemap[num];
> }
> 
> This work well for my application.
> 
> Do you think it's correct? There is a better way to solve this problem?

This will work.  The idea behind reading it once is that you could
take the information with you (in your memory space) to other machines
when you did an rfork() or whatever.  That change would hurt that but
it seems like an OK way to solve the problem you're having.

A better solution would be to grab a newer version of BProc that
doesn't uses entirely different mechanisms to get that information.

Due to some recent unpleasantness Scyld Computing no longer has recent
BProc tar balls available.  I'll have another host for them setup
soon.  Until then you can grab the bproc source RPM from Scyld Beowulf
and lift an RPM out of there.X

- Erik
-- 
Erik Arjan Hendriks          Printed On 100 Percent Recycled Electrons
erik@hendriks.cx                   Contents may settle during shipment