From shartley@king.mcs.drexel.edu  Tue Jan 10 12:56:51 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA13681; Tue, 10 Jan 1995 10:56:05 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA27244; Tue, 10 Jan 95 12:56:51 EST
Date: Tue, 10 Jan 95 12:56:51 EST
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9501101756.AA27244@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: client/server (RPC) programming

  It is possible to do client/server programming using SR, as shown in the
attached example.  The process in the server resource waits in an `in'
statement for incoming requests from clients for service.  Using the `forward'
statement, the server creates a new process to handle the request.  While
the request is being handled, the server can field new requests.  By adding
code to create virtual machines on different physical machines, the clients
can be on remote machines and send their requests to the server process on the
server machine.
  My question is this.  Is is possible to write the client code and the server
code as separate programs?  Can the server process be started on the server
machine from a stand-alone program and then later can the clients be created
and send their requests to the server?  Or must the whole thing be started in
the context of one SR program?
  Thank you for your help.


Steve Hartley
shartley@mcs.drexel.edu

=============================== rpc.sr ===================================

resource server
   optype serve = (client_id, parameters: int)
   op service1, service2, service3 : serve
body server()
   op do_service1, do_service2, do_service3 : serve

   process serving
      do true ->
         in service1(client_id, parameters) ->
            forward do_service1(client_id, parameters)
         [] service2(client_id, parameters) ->
            forward do_service2(client_id, parameters)
         [] service3(client_id, parameters) ->
            forward do_service3(client_id, parameters)
         ni
      od
   end serving

   proc do_service1(client_id, parameters)
      nap(parameters)
   end do_service1

   proc do_service2(client_id, parameters)
      nap(parameters)
   end do_service2

   proc do_service3(client_id, parameters)
      nap(parameters)
   end do_service3
end server

resource client
   import server
body client(client_id : int; server_cap : cap server)

   process go
      do true ->
         nap(10000)
         call server_cap.service1(client_id, age())
         nap(10000)
         call server_cap.service2(client_id, age())
         nap(10000)
         call server_cap.service3(client_id, age())
      od
   end go
end client

resource client_server()
   import server, client
   var server_cap : cap server
   var num_clients : int := 5

   getarg(1, num_clients)
   server_cap := create server()
   fa i := 1 to num_clients -> create client(i, server_cap)
   af
end client_server

==========================================================================


From owner-info-sr  Tue Jan 10 13:12:43 1995
Received: from baskerville.CS.Arizona.EDU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA22987; Tue, 10 Jan 1995 13:12:44 MST
Received: (from gmt@localhost) by baskerville.CS.Arizona.EDU (8.6.9/8.6.6) id NAA10861 for info-sr; Tue, 10 Jan 1995 13:12:43 -0700
Date: Tue, 10 Jan 1995 13:12:43 -0700
From: Gregg Townsend <gmt@baskerville>
Message-Id: <199501102012.NAA10861@baskerville.CS.Arizona.EDU>
To: info-sr@baskerville
Subject: Re: client/server (RPC) programming
Content-Length: 688

   From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
   ...
   My question is this.  Is is possible to write the client code and the server
   code as separate programs?  Can the server process be started on the server
   machine from a stand-alone program and then later can the clients be created
   and send their requests to the server?  Or must the whole thing be started
   in the context of one SR program?

It all has to be one program; SR has no facilities for estabilishing
communications with another program.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From marcos@inf.puc-rio.br  Thu Jan 12 12:10:55 1995
Received: from exu.inf.puc-rio.br by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11536; Thu, 12 Jan 1995 07:12:12 MST
Received: from omolu (omolu.inf.puc-rio.br) by exu.inf.puc-rio.br (4.1/SMI-4.1)
	id AA17847; Thu, 12 Jan 95 12:10:55 EDT
Date: Thu, 12 Jan 95 12:10:55 EDT
From: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
Message-Id: <9501121410.AA17847@exu.inf.puc-rio.br>
To: info-sr@cs.arizona.edu
Subject: SrWin
Cc: marcos@inf.puc-rio.br

	
	I have tryed to use the SrWin functions but I had some problems. The srl can't find the directory or files ,i don't know, of X11. I want to know what is necessary for srl to create the executable file ? , what srl needs of X11 directory. Please, if anyone has answers contact me. 

				marcos@inf.puc-rio.br

From owner-info-sr  Thu Jan 12 13:10:38 1995
Received: from baskerville.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA06303; Thu, 12 Jan 1995 13:10:39 MST
Received: (from gmt@localhost) by baskerville.CS.Arizona.EDU (8.6.9/8.6.6) id NAA22200; Thu, 12 Jan 1995 13:10:38 -0700
Date: Thu, 12 Jan 1995 13:10:38 -0700
From: Gregg Townsend <gmt@baskerville>
Message-Id: <199501122010.NAA22200@baskerville.CS.Arizona.EDU>
To: info-sr@baskerville
Cc: marcos@inf.puc-rio.br
Subject: Re: SrWin
Content-Length: 933

    Date: Thu, 12 Jan 95 12:10:55 EDT
    From: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
    
    I have tryed to use the SrWin functions but I had some problems.
    The srl can't find the directory or files ,i don't know, of X11.
    I want to know what is necessary for srl to create the executable file ? ,
    what srl needs of X11 directory. Please, if anyone has answers contact me. 

The usual way to build an SRWin program "foo.sr" is to use the command

	sr foo.sr srwin.o -lX11    (thats a lowercase L, an X, a number 11)

If that doesn't work, please send the exact error message to
sr-project@cs.arizona.edu along with information specifying your
computer model, operating system, and SR version, and we'll see if we
can figure out what's gone wrong.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From canedo@taec.enet.dec.com  Fri Jan 13 03:35:24 1995
Received: from inet-gw-1.pa.dec.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA02611; Fri, 13 Jan 1995 03:35:24 MST
Received: from vbormc.vbo.dec.com by inet-gw-1.pa.dec.com (5.65/10Aug94)
	id AA20104; Fri, 13 Jan 95 02:30:46 -0800
Received: by vbormc.vbo.dec.com; id AA13080; Fri, 13 Jan 95 11:07:29 +0100
From: canedo@taec.enet.dec.com
Message-Id: <9501131007.AA13080@vbormc.vbo.dec.com>
Received: from taec.enet; by vbormc.enet; Fri, 13 Jan 95 11:07:29 MET
Date: Fri, 13 Jan 95 11:07:29 MET
To: info-sr@cs.arizona.edu
Apparently-To: info-sr@cs.arizona.edu
Subject: Tracing a variable in sr ?

Hello every one,

I wish to implement a tracing mecanism to log variable 
modification. More precisely, I have a variable "toto" 
and I wish to call a command every time this variable is 
changed. Is it possible to do that ?

Thanks in advance

Best regards

Joseph Canedo


From owner-info-sr  Fri Jan 13 09:38:21 1995
Received: from baskerville.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA18387; Fri, 13 Jan 1995 09:38:22 MST
Received: (from gmt@localhost) by baskerville.CS.Arizona.EDU (8.6.9/8.6.6) id JAA09001 for info-sr; Fri, 13 Jan 1995 09:38:21 -0700
Date: Fri, 13 Jan 1995 09:38:21 -0700
From: Gregg Townsend <gmt@baskerville>
Message-Id: <199501131638.JAA09001@baskerville.CS.Arizona.EDU>
To: info-sr@baskerville
Subject: Re: Tracing a variable in sr ?
Content-Length: 482

    From: canedo@taec.enet.dec.com
    
    I wish to implement a tracing mecanism to log variable 
    modification. More precisely, I have a variable "toto" 
    and I wish to call a command every time this variable is 
    changed. Is it possible to do that ?
    
Sorry, SR doesn't have anything like that available.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From john_townsend@taligent.com  Fri Jan 13 18:46:25 1995
Received: from mailserv.taligent.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11233; Fri, 13 Jan 1995 19:49:28 MST
Received: from qm.taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA46548; Fri, 13 Jan 1995 18:49:31 -0800
Message-Id: <n1422099531.5421@qm.taligent.com>
Date: 13 Jan 1995 18:46:25 -0800
From: "John Townsend" <john_townsend@taligent.com>
Subject: Question regarding syntax
To: "SR Mailing List" <info-sr@cs.arizona.edu>
X-Mailer: Mail*Link SMTP-QM 3.0.1

I am new to sr and I am still adjusting to the syntax. (This doesn't mean
that I don't like it. In fact, there are things that I like about it alot). I
did have a question. Consider the following code fragment:

resource main()
   type TName = string[40];
   type TStreet = string(40);  # Note the difference in syntax
end

I have sr 2.3 running on an RS/6000 and this program will compile and run but
yields a warning regarding the usage of older string syntax. Will code that
uses the newer syntax (the brackets) work on older versions of sr? 

I am concerned because I am using 2.3 and the computers at school are using
an older version. Do I have to worry about source compatibility between these
two versions? Am I worrying for nothing? :-)

-- John Townsend, John_Townsend@taligent.com



From greg  Sat Jan 14 10:07:07 1995
Received: from paloverde.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA15332; Sat, 14 Jan 1995 10:05:54 MST
Date: Sat, 14 Jan 1995 10:07:07 MST
From: "Greg Andrews" <greg>
Message-Id: <199501141707.AA19742@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Sat, 14 Jan 1995 10:07:07 MST
To: info-sr@cs.arizona.edu, john_townsend@taligent.com
Subject: Re:  Question regarding syntax

    Date: 13 Jan 1995 18:46:25 -0800
    From: "John Townsend" <john_townsend@taligent.com>
    Subject: Question regarding syntax

    I am new to sr and I am still adjusting to the syntax.  ...

    resource main()
       type TName = string[40];
       type TStreet = string(40);  # Note the difference in syntax
    end

    I have sr 2.3 running on an RS/6000 and this program will compile
    and run but yields a warning regarding the usage of older string
    syntax. Will code that uses the newer syntax (the brackets)
    work on older versions of sr? 

    I am concerned because I am using 2.3 and the computers at school are using
    an older version. Do I have to worry about source compatibility between
    these two versions? Am I worrying for nothing? :-)


The new syntax for string size has been around for ages, so it is
unlikely that your school is using such an old version of SR that
it won't work.

I'd suggest just using the new syntax, and then trying your program
on the older system.  It will complain if it expects parentheses instead
of brackets.

Greg Andrews


From canedo@taec.enet.dec.com  Wed Jan 18 03:21:36 1995
Received: from inet-gw-2.pa.dec.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26938; Wed, 18 Jan 1995 03:21:36 MST
Received: from vbormc.vbo.dec.com by inet-gw-2.pa.dec.com (5.65/10Aug94)
	id AA07529; Wed, 18 Jan 95 02:19:31 -0800
Received: by vbormc.vbo.dec.com; id AA01135; Wed, 18 Jan 95 10:55:42 +0100
From: canedo@taec.enet.dec.com
Message-Id: <9501180955.AA01135@vbormc.vbo.dec.com>
Received: from taec.enet; by vbormc.enet; Wed, 18 Jan 95 10:55:43 MET
Date: Wed, 18 Jan 95 10:55:43 MET
To: info-sr@cs.arizona.edu
Apparently-To: info-sr@cs.arizona.edu
Subject: Trying to interface sr and tcl/tk

Hello every one,

For one month or so, I'm trying to interface sr and 
tcl/tk. I think I found a fairly good solution but I 
don't know exactly if it is possible to implement it... 
I wish to have some opinions on that.

The first step is to invoke tcl scripts in sr code. I do 
that use C external interface of sr and calling Tcl_Eval 
and Tcl_evalFile. The only problem is the script must 
not block (If I remember well). This works well 
(communication sr -> tcl). Tcl_LinkVar allows link 
variables between sr and tcl (tested also with ints, 
doubles...)

The second step is to call sr code in tcl script (to 
make callbacks for example). This can be done using C 
interface of sr and implementing new tcl commands in C. 
For example I could make a rendez-vous or setting a 
semaphore calling sr C interface corresponding procedure 
in a tcl command (I don't know if it is possible, I 've 
just begun to read runtime.ps file in sr distribution). 
For example I could define a tcl command V or P which 
acts on a semaphore identified by its name (shared 
between tcl and sr)...

Thank you for your attention and your remarks.

Best regards

Joseph Canedo


From greg  Wed Jan 18 08:48:22 1995
Received: from paloverde.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA10521; Wed, 18 Jan 1995 08:47:03 MST
Date: Wed, 18 Jan 1995 08:48:22 MST
From: "Greg Andrews" <greg>
Message-Id: <199501181548.AA25784@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Wed, 18 Jan 1995 08:48:22 MST
To: canedo@taec.enet.dec.com, info-sr@cs.arizona.edu
Subject: Re:  Trying to interface sr and tcl/tk

It's fairly easy to call *out* of SR to C, in ways such as you
describe.  Calling in is much trickier, as it requires a detailed
understanding of the SR run-time.  You have to worry not only about
the names and parameters of the appropriate SR runtime routines,
but also have to be very careful about blocking/context switching.

Greg Andrews

From nlam@eecs.wsu.edu  Fri Jan 27 10:51:47 1995
Received: from dns1.eecs.wsu.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA27986; Fri, 27 Jan 1995 11:51:51 MST
Received: from dryden.eecs.wsu.edu by dns1.eecs.wsu.edu (8.6.8.1/8.940801)
	id KAA23422; Fri, 27 Jan 1995 10:51:48 -0800
From: Norman Lam - EECS <nlam@eecs.wsu.edu>
Received: by dryden.eecs.wsu.edu (1.37.109.4) id AA11613; Fri, 27 Jan 95 10:51:47 -0800
Message-Id: <9501271851.AA11613@dryden.eecs.wsu.edu>
Subject: age() function
To: info-sr@cs.arizona.edu
Date: Fri, 27 Jan 1995 10:51:47 -0800 (PST)
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 249       

Hi,

I've used the age() function to time the execution of the matrix multiplication program
in chapter 1 of the book "The SR Programming Language". I found that the time would
change from time to time. Is there any explanation to that?

Norman Lam

From gmt@baskerville  Fri Jan 27 15:31:12 1995
Received: from baskerville.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA14145; Fri, 27 Jan 1995 15:31:13 MST
Received: (from gmt@localhost) by baskerville.CS.Arizona.EDU (8.6.9/8.6.6) id PAA29918; Fri, 27 Jan 1995 15:31:12 -0700
Date: Fri, 27 Jan 1995 15:31:12 -0700
From: Gregg Townsend <gmt@baskerville>
Message-Id: <199501272231.PAA29918@baskerville.CS.Arizona.EDU>
To: info-sr@cs.arizona.edu, nlam@eecs.wsu.edu
Subject: Re: age() function
Content-Length: 525

Many things can cause variations in age() measurements.  Perhaps the most
obvious is other processes running on the machine -- if they are using
much of the CPU, there will be less available to your SR program, so it
will take longer to finish.  There can be other variables such as the
cache hit rate.  Even an idle system usually shows some amount of variation.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From @exeter.ac.uk:steve@dcs.exeter.ac.uk  Mon Feb  6 12:25:45 1995
Received: from sun2.nsfnet-relay.ac.uk by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA09398; Mon, 6 Feb 1995 07:37:12 MST
Via: uk.ac.exeter; Mon, 6 Feb 1995 12:30:12 +0000
Received: from atlas.exeter.ac.uk by exub.exeter.ac.uk with SMTP (PP) 
          id <27627-0@exub.exeter.ac.uk>; Mon, 6 Feb 1995 12:25:56 +0000
Received: from sirius.dcs.exeter.ac.uk by atlas.dcs.exeter.ac.uk;
          Mon, 6 Feb 95 12:25:46 GMT
From: steve@atlas.ex.ac.uk
Date: Mon, 6 Feb 95 12:25:45 GMT
Message-Id: <3116.9502061225@sirius.dcs.exeter.ac.uk>
To: greg@cs.arizona.edu
Cc: info-sr@cs.arizona.edu
Subject: Operation capabilities


We have noticed what appear to be inconsistencies in the mechanism 
for changing an operation capability using a resource capability 
variable (as described on p94 of the SR book).  I guess this is all 
to do with the way calls of procs are optimized, but my question is 
whether the language is meant to behave in this way.

resource Test
   op a()			# operation capability to be changed
   op b()			# calls a() from within resource
   op c(x: cap Test)    	# calls a() using resource capability x
   op d()			# calls a() using myresource() capability
body Test()
   var  y: cap Test := myresource()
   proc a()    write("old version of a") end	
   proc b()    writes("b: "); a()        end
   proc c(x)   writes("c: "); x.a()      end 
   proc d()    writes("d: "); y.a()      end
end

resource Main
   import Test
   op newa()
body Main()
   proc newa() write("new version of a") end

   var t: cap Test := create Test()   
   t.a(); t.b(); t.c(t); t.d()  # all use old version

   t.a := newa			# assign to operation capability

   t.a()  			# uses new version of a
   t.b() 			# uses old version of a
   t.c(t) 			# uses new version of a
   t.d()			# uses old version of a
end

64 % sr test.sr
65 % a.out
old version of a
b: old version of a
c: old version of a
d: old version of a
new version of a
b: old version of a
c: new version of a
d: old version of a
66 % 

We are currently using SR to explore some issues in computational
reflection [1], where we need to use this or some similar technique,
so it would be helpful for us to have a clear understanding of
the semantics of this mechanism.

[1] T. Watanabe and A. Yonezawa: "Reflection in an Object-Oriented
    Concurrent Language", in A. Yonezawa "ABCL: An Object-Oriented
    Concurrent System" (MIT Press, 1990).

Regards,

Steve

-------------------------------------------------------------------------------
Parallel Systems Research Laboratory	|  Stephen Turner
Email:  steve@dcs.exeter.ac.uk   	|  Department of Computer Science
WWW:	http://www.dcs.exeter.ac.uk	|  University of Exeter
Fax:    +44 392 264067			|  Prince of Wales Road
Tel:    +44 392 264048			|  Exeter EX4 4PT England
-------------------------------------------------------------------------------


From pmcgonig@CS.Trinity.Edu  Mon Feb  6 13:19:43 1995
Message-Id: <199502061916.AA24162@optima.cs.arizona.edu>
Received: from sol.CS.Trinity.Edu ([131.194.131.158]) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA24162; Mon, 6 Feb 1995 12:16:07 MST
Received: by sol.CS.Trinity.Edu
	(1.37.109.11/16.2) id AA150068388; Mon, 6 Feb 1995 13:19:48 -0600
From: patrick mcgonigle  <pmcgonig@CS.Trinity.Edu>
Subject: SR system call
To: info-sr@cs.arizona.edu
Date: Mon, 6 Feb 1995 13:19:43 -0600 (CST)
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 286       

Hi!

How can I call the UNIX command "date" from an SR program?  Basically, I just
want to be able to print the date to stdout by simply calling a procedure, as
in:

PrintDate()

It seems simple enough, but I'm not having any luck.
Any help would be much appreciated.

- Pat McGonigle


From gmt@baskerville  Mon Feb  6 14:35:14 1995
Received: from baskerville.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA01812; Mon, 6 Feb 1995 14:35:21 MST
Received: (from gmt@localhost) by baskerville.CS.Arizona.EDU (8.6.9/8.6.6) id OAA18348; Mon, 6 Feb 1995 14:35:14 -0700
Date: Mon, 6 Feb 1995 14:35:14 -0700
From: Gregg Townsend <gmt@baskerville>
Message-Id: <199502062135.OAA18348@baskerville.CS.Arizona.EDU>
To: info-sr@cs.arizona.edu, pmcgonig@CS.Trinity.Edu
Subject: Re: SR system call
Content-Length: 455

    From: patrick mcgonigle  <pmcgonig@CS.Trinity.Edu>
    
    How can I call the UNIX command "date" from an SR program?  Basically,
    I just want to be able to print the date to stdout by simply calling
    a procedure....
    
Try this:
	external system (cmd: string[*])
	system("date")

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m


From owner-info-sr  Mon Feb  6 15:59:12 1995
Received: from baskerville.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA07268; Mon, 6 Feb 1995 15:59:13 MST
Received: (from gmt@localhost) by baskerville.CS.Arizona.EDU (8.6.9/8.6.6) id PAA22533; Mon, 6 Feb 1995 15:59:12 -0700
Date: Mon, 6 Feb 1995 15:59:12 -0700
From: Gregg Townsend <gmt@baskerville>
Message-Id: <199502062259.PAA22533@baskerville.CS.Arizona.EDU>
To: steve@atlas.ex.ac.uk
Cc: info-sr@baskerville
Subject: Re: Operation capabilities
Content-Length: 913

    From: steve@atlas.ex.ac.uk
    
    We have noticed what appear to be inconsistencies in the mechanism 
    for changing an operation capability using a resource capability 
    variable (as described on p94 of the SR book).  I guess this is all 
    to do with the way calls of procs are optimized, but my question is 
    whether the language is meant to behave in this way....
    
I believe it's behaving correctly.  Assignment to an operation capability
contained within a resource capability changes only that copy of the
resource capability; it does not alter anything in the underlying resource.

You can think of a resource capability as a record containing opcaps as
fields; in fact, that's how it's implemented in the underlying C code.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From marcos@inf.puc-rio.br  Thu Feb  9 15:40:16 1995
Received: from exu.inf.puc-rio.br by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA04391; Thu, 9 Feb 1995 10:40:36 MST
Received: from oxala.puc-rio.br (oxala.inf.puc-rio.br) by exu.inf.puc-rio.br (4.1/SMI-4.1)
	id AA02696; Thu, 9 Feb 95 15:40:16 EDT
Date: Thu, 9 Feb 95 15:40:16 EDT
From: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
Message-Id: <9502091740.AA02696@exu.inf.puc-rio.br>
To: info-sr@cs.arizona.edu
Subject: locate

	I need more information about the command "locate". I've tried to use it but it didn't work. Below is the way that i used it:

var NumMachine : int
	.
	.
	.
 write ("My machine is:",NumMachine)
 
 locate (NumMaq, "oxala")
  
write ("My machine is:",NumMachine)
	.
	.
	.
	- Before and after the "locate" i get -808464433
as my machine number. Is it anything wrong with my enviroment? 
			
						Thanks.
marcos@inf.puc-rio.br

From gmt  Fri Feb 10 08:52:22 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13559; Fri, 10 Feb 1995 08:52:28 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA04580; Fri, 10 Feb 1995 08:52:22 -0700
Date: Fri, 10 Feb 1995 08:52:22 -0700
From: Gregg Townsend <gmt>
Message-Id: <9502101552.AA04580@hawk.CS.Arizona.EDU>
To: info-sr, marcos@inf.puc-rio.br
Subject: Re:  locate

    From: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
    
    var NumMachine : int
       ...
     write ("My machine is:",NumMachine)
     locate (NumMaq, "oxala")
    write ("My machine is:",NumMachine)

    	- Before and after the "locate" i get -808464433
    as my machine number. Is it anything wrong with my enviroment? 
    
It appears that NumMachine is never initialized, and that it has
nothing to do with the locate() call.

Note that the purpose of locate() is to define the meaning of an integer
value x when used in "create vm() on x".  It has no effect on the current
machine.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From marcos@inf.puc-rio.br  Fri Feb 10 16:53:29 1995
Received: from exu.inf.puc-rio.br by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA24180; Fri, 10 Feb 1995 11:53:58 MST
Received: from brahma (brahma.inf.puc-rio.br) by exu.inf.puc-rio.br (4.1/SMI-4.1)
	id AA11099; Fri, 10 Feb 95 16:53:29 EDT
Date: Fri, 10 Feb 95 16:53:29 EDT
From: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
Message-Id: <9502101853.AA11099@exu.inf.puc-rio.br>
To: info-sr@cs.arizona.edu
Subject: srwin

	I am trying to use srwin in a distribute program. My program has many resources, each of them manages one window. The problem happens in execution time. The message error is : "ld.so: libX11.so.4: not found ". I just need to know on what directory SRX looks after this file.
				
					Thanks!

marcos@inf.puc-rio.br

From azhao@cc.gatech.edu  Fri Feb 10 14:56:38 1995
Received: from burdell.cc.gatech.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA28392; Fri, 10 Feb 1995 12:56:43 MST
Received: from oakmont.cc.gatech.edu (azhao@oakmont.cc.gatech.edu [130.207.119.218]) by burdell.cc.gatech.edu (8.6.9/8.6.9) with ESMTP id OAA08459; Fri, 10 Feb 1995 14:56:41 -0500
Received: (from azhao@localhost) by oakmont.cc.gatech.edu (8.6.9/8.6.9) id OAA01394; Fri, 10 Feb 1995 14:56:40 -0500
From: azhao@cc.gatech.edu (Q. Alex Zhao)
Message-Id: <199502101956.OAA01394@oakmont.cc.gatech.edu>
Subject: Re: srwin
To: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
Date: Fri, 10 Feb 1995 14:56:38 -0500 (EST)
Cc: info-sr@cs.arizona.edu
In-Reply-To: <9502101853.AA11099@exu.inf.puc-rio.br> from "Marcos Rodrigues de Lyra" at Feb 10, 95 04:53:29 pm
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 855       

According to Marcos Rodrigues de Lyra in a previous message:
] 
] 	I am trying to use srwin in a distribute program. My program has many resources, each of them manages one window. The problem happens in execution time. The message error is : "ld.so: libX11.so.4: not found ". I just need to know on what directory SRX looks after this file.
] 				
] 					Thanks!
] 
] marcos@inf.puc-rio.br

It was the UNIX runtime library linker which could not find the library. I'm
guessing that if you setenv LD_LIBRARY_PATH in your .profile or .cshrc etc.
to the X lib directory "ld.so" should find it...

Cheers,
= Q. Alex Zhao    ~{0"UT~}    ! Graphics, Visualization & Usability Center
  Email: azhao@cc.gatech.edu  ! College of Computing
  FAX:   404-853-9378         ! Georgia Institute of Technology
  Lab:   404-894-9636         ! Atlanta, Georgia 30332-0280

From gmt  Fri Feb 10 13:04:44 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA28967; Fri, 10 Feb 1995 13:04:47 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA05101; Fri, 10 Feb 1995 13:04:44 -0700
Date: Fri, 10 Feb 1995 13:04:44 -0700
From: Gregg Townsend <gmt>
Message-Id: <9502102004.AA05101@hawk.CS.Arizona.EDU>
To: marcos@inf.puc-rio.br
Subject: Re:  srwin
Cc: info-sr

    From: marcos@inf.puc-rio.br (Marcos Rodrigues de Lyra)
    
    I am trying to use srwin in a distribute program. My program has many
    resources, each of them manages one window. The problem happens in
    execution time. The message error is : "ld.so: libX11.so.4: not found ".
    I just need to know on what directory SRX looks after this file.

That's a system library that's part of the X window system.  If you're
running on a Sun Solaris system, you might try setting
	LD_RUN_PATH=/usr/openwin/lib
in your environment at the time you build the program.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From john_townsend@taligent.com  Thu Feb 16 17:47:31 1995
Received: from mailserv.taligent.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA19131; Thu, 16 Feb 1995 18:50:59 MST
Received: from qm.taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA213702; Thu, 16 Feb 1995 17:51:40 -0800
Message-Id: <n1419165441.95551@qm.taligent.com>
Date: 16 Feb 1995 17:47:31 -0800
From: "John Townsend" <john_townsend@taligent.com>
Subject: Problems
To: "info-sr" <info-sr@cs.arizona.edu>
X-Mailer: Mail*Link SMTP-QM 3.0.2

I am trying to run the distributed file system example from the book on my
RS/6000. I am running into problems:

prompt> a.out jaguar
rshd: 0826-813 permission is denied.
[vm 1] RTS abort: attedmpting to create resource on null machine.

Now.. Jaguar is my own machine. This it the only machine I have access to! It
looks like rshd is owned by root and I can't run it. Can someone tell me what
I need to have done to my system to allow me to run this example?

-- John



From john_townsend@taligent.com  Thu Feb 16 23:28:06 1995
Received: from mailserv.taligent.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA08897; Fri, 17 Feb 1995 00:32:46 MST
Received: from qm.taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA105804; Thu, 16 Feb 1995 23:33:28 -0800
Message-Id: <n1419144932.26657@qm.taligent.com>
Date: 16 Feb 1995 23:28:06 -0800
From: "John Townsend" <john_townsend@taligent.com>
Subject: More problems with dfs
To: "info-sr Mailing List" <info-sr@cs.arizona.edu>
X-Mailer: Mail*Link SMTP-QM 3.0.2

Well.. I made progress. I have the program running.. sort of. I found the
first problem. It wasn't working because I didn't have an .rhosts file and
when I finally figured that out, I discovered that rsh won't recognize your
rhosts file unless the permissions are set to 600. Once I did that, I was able
to get things to work.

Unfortunately.. I am still confused. I run the program and enter some
terminals. (pts/3 and pts/4) This seems to work okay except that their are
shells attached to these terminals and I get contention for the terminal (one
character goes to the shell, two character to the terminal, etc.)

Am I doing this wrong? I would like to figure this stuff out because I would
like to use the server design in this program as the basis for a project. 

Any help would be greatly appreciated. 

-- John



From greg  Fri Feb 17 08:41:15 1995
Received: from paloverde.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26831; Fri, 17 Feb 1995 08:41:17 MST
Date: Fri, 17 Feb 1995 08:41:15 MST
From: "Greg Andrews" <greg>
Message-Id: <199502171541.AA26877@paloverde.cs.arizona.edu>
Received: by paloverde.cs.arizona.edu; Fri, 17 Feb 1995 08:41:15 MST
To: info-sr@cs.arizona.edu, john_townsend@taligent.com
Subject: Re:  More problems with dfs

    Date: 16 Feb 1995 23:28:06 -0800
    From: "John Townsend" <john_townsend@taligent.com>
    Subject: More problems with dfs

    ...

    Unfortunately.. I am still confused. I run the program and enter some
    terminals. (pts/3 and pts/4) This seems to work okay except that their are
    shells attached to these terminals and I get contention for the
    terminal (one character goes to the shell, two character to the
    terminal, etc.)

Read the discussion on page 263 of the SR book, just below the
program for the Login resource.  It describes how to solve your
problem.

Greg Andrews

From john_townsend@taligent.com  Sat Feb 18 00:52:31 1995
Received: from mailserv.taligent.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26174; Sat, 18 Feb 1995 01:56:32 MST
Received: from qm.taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA64859; Sat, 18 Feb 1995 00:55:29 -0800
Message-Id: <n1419053597.21935@qm.taligent.com>
Date: 18 Feb 1995 00:52:31 -0800
Priority: Urgent
From: "John Townsend" <john_townsend@taligent.com>
Subject: AIX 4.1?
To: "info-sr Mailing List" <info-sr@cs.arizona.edu>
X-Mailer: Mail*Link SMTP-QM 3.0.2

                          AIX 4.1?
 Aaaaggghhhhhh

I did something that appears to be very bad. Today my RS/6000 was upgraded
from AIX 3.2.5 to AIX 4.1. 

Unfortunately.. my sr setup is now badly hosted. I can't link the assembly
cstest code in the /csw directory. I get three link errors on the stack
underflow, overflow, etc. externs.

Does anyone know anything about this? Has anyone ported SR to AIX 4.1? Am I
completely hosed? I hope not.. I really need to get some coding done in SR!

Please help me if you can.

-- John



From admin@ibmserv.edu.tw  Mon Feb 20 14:21:43 1995
Received: from ibmserv.edu.tw by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11997; Tue, 21 Feb 1995 22:59:14 MST
Received: by ibmserv.edu.tw (AIX 3.2/UCB 5.64/4.03)
          id AA14745; Mon, 20 Feb 1995 14:21:43 -1600
From: admin@ibmserv.edu.tw
Message-Id: <9502210621.AA14745@ibmserv.edu.tw>
Subject: AIX 4.1? (fwd)
To: info-sr@cs.arizona.edu
Date: Mon, 20 Feb 1995 14:21:43 -1600 ()
X-Mailer: ELM [version 2.4 PL23alpha2]
Content-Type: text
Content-Length: 1945      

Forwarded message:
> From root Thu Feb 16 17:21:28 1995
> Message-Id: <n1419053597.21935@qm.taligent.com>
> Date: 18 Feb 1995 00:52:31 -0800
> Priority: Urgent
> From: "John Townsend" <john_townsend@taligent.com>
> Subject: AIX 4.1?
> To: "info-sr Mailing List" <info-sr@cs.arizona.edu>
> X-Mailer: Mail*Link SMTP-QM 3.0.2
> Errors-To: info-sr-errors@cs.arizona.edu
> 
>                           AIX 4.1?
>  Aaaaggghhhhhh
> 
> I did something that appears to be very bad. Today my RS/6000 was upgraded
> from AIX 3.2.5 to AIX 4.1. 
> 
> Unfortunately.. my sr setup is now badly hosted. I can't link the assembly
> cstest code in the /csw directory. I get three link errors on the stack
> underflow, overflow, etc. externs.
> 
> Does anyone know anything about this? Has anyone ported SR to AIX 4.1? Am I
> completely hosed? I hope not.. I really need to get some coding done in SR!
> 
> Please help me if you can.
> 
> -- John
> 
> 
> 

I have the same problem when linking the cstest in ./csw. Here is the error
message:

        as -o asm.o asm.s
        . ../paths.sh; cc  -o cstest  cstest.o asm.o $LIBM $LIBC
ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
        Relocation overflow in reference to: .sr_stk_overflow (entry 2)
        Address: 0x00000154;    RLD type: R_RBR;   RLD length: 26
ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
        Relocation overflow in reference to: .sr_stk_underflow (entry 4)
        Address: 0x00000158;    RLD type: R_RBR;   RLD length: 26
ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
        Relocation overflow in reference to: .sr_stk_corrupted (entry 6)
        Address: 0x0000015c;    RLD type: R_RBR;   RLD length: 26
make: 1254-004 The error code from the last command is 12.

The c compiler V3.1.2 is used for building sr in AIX4.1.1. Is there
anything to do with the cstest.c, asm.c, or rs6000.s?


Richard

From john_townsend@taligent.com  Wed Feb 22 11:22:26 1995
Received: from mailserv.taligent.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA22415; Wed, 22 Feb 1995 12:30:14 MST
Received: from qm.taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA25028; Wed, 22 Feb 1995 11:30:41 -0800
Message-Id: <n1418669908.76113@qm.taligent.com>
Date: 22 Feb 1995 11:22:26 -0800
From: "John Townsend" <john_townsend@taligent.com>
Subject: Re: AIX 4.1? (fwd)
To: admin@ibmserv.edu.tw, "info-sr" <info-sr@cs.arizona.edu>
X-Mailer: Mail*Link SMTP-QM 3.0.2

I solved this problem. Turns out that there are some things in the xlC defs
file that weren't there on AIX 3.2.5 that are they are AIX 4.1. They have to
do with base addresses of the text and data segments. 

Unfortunately, I am at home at the moment and all of the info is at work.
Tommorrow I will send out a message describing the problem to the info-sr
mailing list. 

One note of warning.. to change the xlc defs file, you will need root access
on your machine (at least I did). 
--------------------------------------
Date: 2/22/95 10:32 AM
To: John Townsend
From: admin@ibmserv.edu.tw
Forwarded message:
> From root Thu Feb 16 17:21:28 1995
> Message-Id: <n1419053597.21935@qm.taligent.com>
> Date: 18 Feb 1995 00:52:31 -0800
> Priority: Urgent
> From: "John Townsend" <john_townsend@taligent.com>
> Subject: AIX 4.1?
> To: "info-sr Mailing List" <info-sr@cs.arizona.edu>
> X-Mailer: Mail*Link SMTP-QM 3.0.2
> Errors-To: info-sr-errors@cs.arizona.edu
> 
>                           AIX 4.1?
>  Aaaaggghhhhhh
> 
> I did something that appears to be very bad. Today my RS/6000 was upgraded
> from AIX 3.2.5 to AIX 4.1. 
> 
> Unfortunately.. my sr setup is now badly hosted. I can't link the assembly
> cstest code in the /csw directory. I get three link errors on the stack
> underflow, overflow, etc. externs.
> 
> Does anyone know anything about this? Has anyone ported SR to AIX 4.1? Am I
> completely hosed? I hope not.. I really need to get some coding done in SR!
> 
> Please help me if you can.
> 
> -- John
> 
> 
> 

I have the same problem when linking the cstest in ./csw. Here is the error
message:

        as -o asm.o asm.s
        . ../paths.sh; cc  -o cstest  cstest.o asm.o $LIBM $LIBC
ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
        Relocation overflow in reference to: .sr_stk_overflow (entry 2)
        Address: 0x00000154;    RLD type: R_RBR;   RLD length: 26
ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
        Relocation overflow in reference to: .sr_stk_underflow (entry 4)
        Address: 0x00000158;    RLD type: R_RBR;   RLD length: 26
ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
        Relocation overflow in reference to: .sr_stk_corrupted (entry 6)
        Address: 0x0000015c;    RLD type: R_RBR;   RLD length: 26
make: 1254-004 The error code from the last command is 12.

The c compiler V3.1.2 is used for building sr in AIX4.1.1. Is there
anything to do with the cstest.c, asm.c, or rs6000.s?


Richard

------------------ RFC822 Header Follows ------------------
Received: by qm.taligent.com with SMTP;21 Feb 1995 22:21:05 -0800
Received: from taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA256491; Tue, 21 Feb 1995 22:19:58 -0800
Received: from optima.CS.Arizona.EDU by taligent.com with SMTP
(5.67/23-Oct-1991-eef)
	id AA11931; Tue, 21 Feb 95 22:14:31 -0800
	for 
Received: by optima.cs.arizona.edu (5.65c/15)
	id AA12009; Tue, 21 Feb 1995 22:59:33 MST
From: admin@ibmserv.edu.tw
Message-Id: <9502210621.AA14745@ibmserv.edu.tw>
Subject: AIX 4.1? (fwd)
To: info-sr@cs.arizona.edu
Date: Mon, 20 Feb 1995 14:21:43 -1600 ()
X-Mailer: ELM [version 2.4 PL23alpha2]
Content-Type: text
Content-Length: 1945      
Errors-To: info-sr-errors@cs.arizona.edu




From shartley@king.mcs.drexel.edu  Fri Feb 24 12:06:55 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA16117; Fri, 24 Feb 1995 10:06:11 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA20722; Fri, 24 Feb 95 12:06:55 EST
Date: Fri, 24 Feb 95 12:06:55 EST
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9502241706.AA20722@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: SR on IBM SP2

  I am pleased to report that SR compiles and runs "out of the box" on
IBM's SP2 distributed memory parallel machine.  I am not sure what versions
of AIX and the C compiler (cc command) are running at the Maui High
Performance Computing Center where I tested SR.
  The SP2 at MHPCC has 400 nodes, each with its own CPU and private
memory, connected to each other by Ethernet and by a special high-speed
switch.  Not all nodes are always accessible by all users.  Compiling SR
"out of the box" allows virtual machines on different nodes to communicate
over the Ethernet connections but not the switch connections.  Implementing
the latter will take some work digging through the SP2 documentation.
  The program attached at the end starts worker processes on a number
of nodes to solve the N queens problem using the master/slave technique.
SP2 users must have an .rhosts file in their home directories containing
all the Ethernet node names for rsh commands to work.  Program sample
output is at the end.
  The only problem I have encountered so far is that srv/srv -v quick
reports a problem with the optimized jumble.sr test program.

       0 sr -O -T -c jumble.sr
       0 srl ggg rrr jumble
       0 a.out 01992 161.803e-2 refrigerator >withopt.out
     srv/srv: 19748 Memory fault: A memory image file is created as "core".
         expected 0, got 139 (segmentation violation) from a.out

Steve Hartley
Drexel Univ
shartley@mcs.drexel.edu

=============== queens.sr ============================

global rhosts
   const NUM_RHOSTS : int := 400
   var rhost[1:NUM_RHOSTS] : string[64]
body rhosts()
   var rhosts_file : file
   var name : string[64]
   rhosts_file := open("/u/shartley/.rhosts", READ)
   if rhosts_file = null -> write("cannot open .rhosts"); stop(1) fi
   fa i := 1 to NUM_RHOSTS -> read(rhosts_file, name)
      rhost[i] := name
   af
   write("rhosts:", NUM_RHOSTS, "rhosts read, rhost[1]=", rhost[1])
end rhosts

resource worker
   import Master
   op my_assignment(r: int)
body worker(id : int; n : int; mcap : cap Master)
   write("Worker", id, "starting up with board size", n)
   var solutions : int
   var board[1:n]: int := ([n] 0)

   procedure safe(row, column: int; board[1:*]: int) returns answer: bool
   # Check whether it is safe to place a queen at (row,column);
   #   i.e., is board[column]=row a safe configuration?
      fa j := 1 to column-1 ->
         if board[column-j] = row
               or board[column-j] = row-j
               or board[column-j] = row+j ->
            answer := false
            return
         fi
      af
      answer := true
   end safe

   procedure place(column: int; board[1:*]: int)
   # Place a queen in all safe positions of column c,
   # then try placing a queen in the next column.
   # If a position in column n is safe, print the board.
      fa row := 1 to n ->
         board[column] := row   # try placing a queen in (row,column)
         if safe(row, column, board) ->
            if column = n -> solutions++   # have a solution
            [] column<n -> place(column+1, board)   # try next column
            fi
         fi
         board[column] := 0   # unrecord that a queen was placed
      af
   end place

   process working
      var r : int
      send mcap.give_assignment(id, 0) # tell master this worker is alive
      solutions := 0
      do true ->
         receive my_assignment(r)
         solutions := 0
         board[1] := r
         write("Worker", id, "starts queen in column 1, row", r)
         place(2, board)
         send mcap.give_assignment(id, solutions)
      od
   end working
end worker

resource Master
   import rhosts, worker
   op give_assignment(id : int; solutions : int)
body Master()
   var board_size : int := 0
   var num_workers : int := 0
   var first_rhost : int := 1
   var id : int
   getarg(1, board_size) # First argument on command line is board size.
   if board_size <= 1 ->
      write("board_size =", board_size, "is too small"); stop
   fi
   getarg(2, num_workers) # Second argument on command line is number workers.
   if num_workers <= 0 ->
      write("num_workers =", num_workers, "is too small"); stop
   fi
   getarg(3, first_rhost) # Third argument on command line is first rhost.
   if first_rhost <= 0 or first_rhost + num_workers - 1 > NUM_RHOSTS ->
      write("first_rhost =", first_rhost, "is too big or small"); stop
   fi
   var machine_cap[1:num_workers] : cap vm
   fa i := 1 to num_workers ->
      machine_cap[i] := create vm() on rhost[first_rhost+i-1]
      if machine_cap[i] = null ->
         write("Cannot create vm on", rhost[first_rhost+i-1], "so abort"); stop
      fi
      write("age=", age(), "Virtual machine up on", rhost[first_rhost+i-1])
   af
   var worker_cap[1:num_workers] : cap worker
   var my_cap : cap Master
   var total_solutions : int
   var solutions : int
   my_cap := myresource()
   fa i := 1 to num_workers ->
      worker_cap[i] := create worker(i, board_size, my_cap) on machine_cap[i]
   af
   write("age=", age(), "Solutions to the", board_size,
      "queens problem will be farmed out to", num_workers, "workers")
   total_solutions := 0

# Send all the different initial board positions (queen in some row of column
# one) to any worker waiting for an assignment. The parameter solutions in
# give_assignment will be zero the first time it is received from a worker.
# This serves as a signal to the master that the worker is alive.
   fa r := 1 to board_size ->
      receive give_assignment(id, solutions)
      if solutions > 0 ->
         total_solutions := total_solutions + solutions
         write("age=", age(), "Worker", id, "found", solutions, "solutions")
      fi
      send worker_cap[id].my_assignment(r)
   af
# All initial positions have been passed out.  Wait for workers to finish.
   fa i := 1 to num_workers ->
      receive give_assignment(id, solutions)
      total_solutions := total_solutions + solutions
      write("age=", age(), "Worker", id, "done, found", solutions, "solutions")
   af
   write("age=", age(), "Total number of solutions found was", total_solutions)
   stop
end Master

/* ............... Example compile and run(s)

% sr -o queens queens.sr
% ./queens 9 4
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
Your account is not authorized to login to this machine,
please login in to another machine for all uses.
Cannot create vm on fr1n01.mhpcc.edu so abort
% ./queens 9 4 48
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
age= 880 Virtual machine up on fr3n16.mhpcc.edu
age= 1525 Virtual machine up on fr4n01.mhpcc.edu
fr4n02.mhpcc.edu: A remote host did not respond within the timeout period.
Cannot create vm on fr4n02.mhpcc.edu so abort
% ./queens 9 4 53
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
age= 670 Virtual machine up on fr4n05.mhpcc.edu
age= 1287 Virtual machine up on fr4n06.mhpcc.edu
age= 2089 Virtual machine up on fr4n07.mhpcc.edu
age= 2706 Virtual machine up on fr4n08.mhpcc.edu
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
Worker 1 starting up with board size 9
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
Worker 2 starting up with board size 9
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
Worker 3 starting up with board size 9
rhosts: 400 rhosts read, rhost[1]= fr1n01.mhpcc.edu
age= 4124 Solutions to the 9 queens problem will be farmed out to 4 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
Worker 4 starting up with board size 9
age= 4303 Worker 1 found 28 solutions
Worker 4 starts queen in column 1, row 4
Worker 1 starts queen in column 1, row 5
age= 4328 Worker 2 found 30 solutions
Worker 2 starts queen in column 1, row 6
age= 4335 Worker 3 found 47 solutions
age= 4336 Worker 4 found 44 solutions
Worker 3 starts queen in column 1, row 7
age= 4518 Worker 1 found 54 solutions
Worker 4 starts queen in column 1, row 8
Worker 1 starts queen in column 1, row 9
age= 4530 Worker 2 done, found 44 solutions
age= 4537 Worker 4 done, found 30 solutions
age= 4542 Worker 3 done, found 47 solutions
age= 4707 Worker 1 done, found 28 solutions
age= 4708 Total number of solutions found was 352
                                              */


From grindsta@cs.ucdavis.edu  Mon Feb 27 18:21:52 1995
Received: from toadflax.cs.ucdavis.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11659; Mon, 27 Feb 1995 19:22:02 MST
Received: from burks.cs.ucdavis.edu by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.6)
	id AA21121; Mon, 27 Feb 95 18:21:58 PST
Received: by burks.cs.ucdavis.edu (5.65/UCD.CS.2.6)
	id AA17288; Mon, 27 Feb 1995 18:21:53 -0800
Date: Mon, 27 Feb 1995 18:21:52 -0800 (PST)
From: Marcus Andrew Grindstaff <grindsta@cs.ucdavis.edu>
To: info-sr@cs.arizona.edu
Subject: Placing BMP or GIF in window in SRWin (fwd)
Message-Id: <Pine.ULT.3.91.950227182036.17200B-100000@burks.cs.ucdavis.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


---------- Forwarded message ----------
Date: Mon, 27 Feb 1995 18:10:35 -0800
From: Ron Olsson <olsson@ivy>
To: grindsta@burks.cs.ucdavis.edu
Subject: Placing BMP or GIF in window in SRWin

> I don't know.  I presume you've checked the man page.  If so, post a
> message to info-sr@cs.arizona.edu.  Please follow up anything you find
> out to the newsgroup.  Thanks.

Is it possible to display BMPs or GIFs (or any other graphics format) in 
SRWin?

Thanks,
Marcus

----------------------------
Marcus Grindstaff
Technical Marketing Engineer
PCI Components
(916)948-8493


From azhao@cc.gatech.edu  Tue Feb 28 00:45:18 1995
Received: from burdell.cc.gatech.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA22307; Mon, 27 Feb 1995 22:45:21 MST
Received: from oakmont.cc.gatech.edu (azhao@oakmont.cc.gatech.edu [130.207.119.218]) by burdell.cc.gatech.edu (8.6.10/8.6.9) with ESMTP id AAA18016; Tue, 28 Feb 1995 00:45:19 -0500
Received: (from azhao@localhost) by oakmont.cc.gatech.edu (8.6.10/8.6.9) id AAA01382; Tue, 28 Feb 1995 00:45:18 -0500
From: azhao@cc.gatech.edu (Q. Alex Zhao)
Message-Id: <199502280545.AAA01382@oakmont.cc.gatech.edu>
Subject: Re: Placing BMP or GIF in window in SRWin
To: grindsta@cs.ucdavis.edu (Marcus Andrew Grindstaff)
Date: Tue, 28 Feb 1995 00:45:18 -0500 (EST)
Cc: info-sr@cs.arizona.edu
In-Reply-To: <Pine.ULT.3.91.950227182036.17200B-100000@burks.cs.ucdavis.edu> from "Marcus Andrew Grindstaff" at Feb 27, 95 06:21:52 pm
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 1681      

According to Marcus Andrew Grindstaff in a previous message:
] 
] From: Ron Olsson <olsson@ivy>
] To: grindsta@burks.cs.ucdavis.edu
] Subject: Placing BMP or GIF in window in SRWin
] 
] > I don't know.  I presume you've checked the man page.  If so, post a
] > message to info-sr@cs.arizona.edu.  Please follow up anything you find
] > out to the newsgroup.  Thanks.
] 
] Is it possible to display BMPs or GIFs (or any other graphics format) in 
] SRWin?
] 
] Thanks,
] Marcus
] 
] ----------------------------
] Marcus Grindstaff
] Technical Marketing Engineer
] PCI Components
] (916)948-8493

SRWin doesn't directly support image file I/O.  If you just want to
display an image you could write the image to a file (in the correct
format) and spawn an "xloadimage" or "xv" to display it.

SRWin uses the default colormap which is shared among all X clients on
the same display.  An SRWin program could easily run out of color if
it displays color images.  I guess SRWin need to be extended to
include better support of colormap manipulation to be flexible in
handling images...

In the short term you could try building a C function and an SR
interface (similar to how SRWin is implemented); using existing data
structures, they could read in the image, find the off-screen
pixmap associated with a "winWindow" structure and put the image
(dithered to the available colorspace) on the pixmap, then call
"WinUpdate"...

Cheers,
= Q. Alex Zhao    ~{0"UT~}    ! Graphics, Visualization & Usability Center
  Email: azhao@cc.gatech.edu  ! College of Computing
  FAX:   404-853-9378         ! Georgia Institute of Technology
  Lab:   404-894-9636         ! Atlanta, Georgia 30332-0280

From admin@ibmserv.edu.tw  Mon Feb 27 18:00:25 1995
Received: from ibmserv.edu.tw by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA15663; Wed, 1 Mar 1995 02:39:51 MST
Received: by ibmserv.edu.tw (AIX 3.2/UCB 5.64/4.03)
          id AA12199; Mon, 27 Feb 1995 18:00:26 -1600
From: admin@ibmserv.edu.tw
Message-Id: <9502281000.AA12199@ibmserv.edu.tw>
Subject: Re: AIX 4.1? (fwd)
To: info-sr@cs.arizona.edu
Date: Mon, 27 Feb 1995 18:00:25 -1600 ()
X-Mailer: ELM [version 2.4 PL23alpha2]
Content-Type: text
Content-Length: 2067      


What are the xlC defs needed to be changed? could you show me the details?

-- Richard


Forwarded message:
> From root Tue Feb 21 03:57:34 1995
> Message-Id: <n1418669908.76113@qm.taligent.com>
> Date: 22 Feb 1995 11:22:26 -0800
> From: "John Townsend" <john_townsend@taligent.com>
> Subject: Re: AIX 4.1? (fwd)
> To: admin@ibmserv.edu.tw, "info-sr" <info-sr@cs.arizona.edu>
> X-Mailer: Mail*Link SMTP-QM 3.0.2
> Errors-To: info-sr-errors@cs.arizona.edu
> 
> I solved this problem. Turns out that there are some things in the xlC defs
> file that weren't there on AIX 3.2.5 that are they are AIX 4.1. They have to
> do with base addresses of the text and data segments. 
> 
> Unfortunately, I am at home at the moment and all of the info is at work.
> Tommorrow I will send out a message describing the problem to the info-sr
> mailing list. 
> 
> One note of warning.. to change the xlc defs file, you will need root access
> on your machine (at least I did). 
> --------------------------------------
> 
> 
> 
> I have the same problem when linking the cstest in ./csw. Here is the error
> message:
> 
>         as -o asm.o asm.s
>         . ../paths.sh; cc  -o cstest  cstest.o asm.o $LIBM $LIBC
> ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
>         Relocation overflow in reference to: .sr_stk_overflow (entry 2)
>         Address: 0x00000154;    RLD type: R_RBR;   RLD length: 26
> ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
>         Relocation overflow in reference to: .sr_stk_underflow (entry 4)
>         Address: 0x00000158;    RLD type: R_RBR;   RLD length: 26
> ld: 0711-780 SEVERE ERROR: Symbol .contextdat (entry 18) in object asm.o:
>         Relocation overflow in reference to: .sr_stk_corrupted (entry 6)
>         Address: 0x0000015c;    RLD type: R_RBR;   RLD length: 26
> make: 1254-004 The error code from the last command is 12.
> 
> The c compiler V3.1.2 is used for building sr in AIX4.1.1. Is there
> anything to do with the cstest.c, asm.c, or rs6000.s?
> 
> 
> Richard
> 


From shartley@king.mcs.drexel.edu  Mon Mar  6 07:17:55 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA02789; Mon, 6 Mar 1995 05:17:09 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA10914; Mon, 6 Mar 95 07:17:55 EST
Date: Mon, 6 Mar 95 07:17:55 EST
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9503061217.AA10914@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: finally

The following is finally (whew!) available from Oxford University Press:

     "Operating Systems Programming: The SR Programming Language".
     The ISBN is 0-19-5095790.  Contact them at (800) 451-7556 for
     a copy.  Suggested list price is $25.00.  About 236 pages.

The example SR programs used in the book are avaliable by anonymous ftp
from site mcs.drexel.edu in directory pub/shartley; retrieve file
book_SR_examples.tar.gz (remember to use binary mode) to get a tar archive
compressed with the GNU compression program gzip.  The SR language is
available by anonymous ftp from site cs.arizona.edu in directory sr.

Steve Hartley
Drexel University
shartley@mcs.drexel.edu

From the Preface:

  SR is a language for concurrent programming.  This book describes the SR
language, presents some examples of SR programs in the context of an operating
systems or concurrent programming course, and provides some programming as-
signments in the form of open Student Laboratories.  The SR language can be
used by instructors of concurrent programming or operating systems courses to
give students experience in writing concurrent programs that use multiple
processes, semaphores, monitors, message passing, remote procedure calls, and
the rendezvous.  The language can also be used for parallel computing in a
shared-memory multiprocessor or a distributed memory cluster environment.

From gln@cs.simpson.edu  Tue Mar  7 15:27:24 1995
Received: from cs.simpson.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA28366; Tue, 7 Mar 1995 14:27:28 MST
Received: by cs.simpson.edu; id AA08256; Tue, 7 Mar 1995 15:27:24 -0600
Date: Tue, 7 Mar 1995 15:27:24 -0600
From: Gary L. Newell <gln@cs.simpson.edu>
Message-Id: <9503072127.AA08256@cs.simpson.edu>
To: info-sr@cs.arizona.edu
Subject: hello


 Hi folks,  hows it goin? I recently (actually as I write this) decided to
download SR for our departmental machine. It is a DEC Alpha running OSF
and as I know that you have at least one such beast in the department now
I was wondering if there is a clean port of SR to OSF or if I'm on my own.
This question might be answered once I take a look at the downloaded material
and if so let me apologize in advance. Either way, could you please add me to
the mailing list? Thanks. Hope things are going well in sunny Tucson - I'm
not sure who is officially part of the SR group now a days so I'm afraid
I will have to avoid any personal hellos...  later


			Gary Newell   gln@cs.simpson.edu


From shartley@king.mcs.drexel.edu  Thu Mar  9 17:50:37 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA10634; Thu, 9 Mar 1995 15:49:56 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA26731; Thu, 9 Mar 95 17:50:37 EST
Date: Thu, 9 Mar 95 17:50:37 EST
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9503092250.AA26731@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: performance question

  The attached program was run on a Sparc multiprocessor with 4 CPUs.  It
was compiled with the MultiSR version of SR.  It runs markedly slower when
SR_PARALLEL is set bigger than 1.  What is slowing it down?  Sample output
is at the end of the program in the form of a big comment.

================ queens.sr ====================

resource worker
   import Master
   op my_assignment(r: int)
body worker(id : int; n : int; mcap : cap Master)
   write("Worker", id, "starting up with board size", n)
   var solutions : int
   var board[1:n]: int := ([n] 0)

   procedure safe(row, column: int; board[1:*]: int) returns answer: bool
   # Check whether it is safe to place a queen at (row,column);
   #   i.e., is board[column]=row a safe configuration?
      fa j := 1 to column-1 ->
         if board[column-j] = row
               or board[column-j] = row-j
               or board[column-j] = row+j ->
            answer := false
            return
         fi
      af
      answer := true
   end safe

   procedure place(column: int; board[1:*]: int)
   # Place a queen in all safe positions of column c,
   # then try placing a queen in the next column.
   # If a position in column n is safe, print the board.
      fa row := 1 to n ->
         board[column] := row   # try placing a queen in (row,column)
         if safe(row, column, board) ->
            if column = n -> solutions++   # have a solution
            [] column<n -> place(column+1, board)   # try next column
            fi
         fi
         board[column] := 0   # unrecord that a queen was placed
      af
   end place

   process working
      var r : int
      send mcap.give_assignment(id, 0) # tell master this worker is alive
      solutions := 0
      do true ->
         receive my_assignment(r)
         solutions := 0
         board[1] := r
         write("Worker", id, "starts queen in column 1, row", r)
         place(2, board)
         send mcap.give_assignment(id, solutions)
      od
   end working
end worker

resource Master
   import worker
   op give_assignment(id : int; solutions : int)
body Master()
   var board_size : int := 0
   var num_workers : int := 0
   var id : int
   getarg(1, board_size)
   if board_size <= 1 ->
      write("board_size =", board_size, "is too small"); stop
   fi
   getarg(2, num_workers)
   if num_workers <= 0 ->
      write("num_workers =", num_workers, "is too small"); stop
   fi
   var worker_cap[1:num_workers] : cap worker
   var my_cap : cap Master
   var total_solutions : int
   var solutions : int
   my_cap := myresource()
   fa i := 1 to num_workers ->
      worker_cap[i] := create worker(i, board_size, my_cap)
   af
   write("age=", age(), "Solutions to the", board_size,
      "queens problem will be farmed out to", num_workers, "workers")
   total_solutions := 0

# Send all the different initial board positions (queen in some row of column
# one) to any worker waiting for an assignment. The parameter solutions in
# give_assignment will be zero the first time it is received from a worker.
# This serves as a signal to the master that the worker is alive.
   fa r := 1 to board_size ->
      receive give_assignment(id, solutions)
      if solutions > 0 ->
         total_solutions := total_solutions + solutions
         write("age=", age(), "Worker", id, "found", solutions, "solutions")
      fi
      send worker_cap[id].my_assignment(r)
   af
# All initial positions have been passed out.  Wait for workers to finish.
   fa i := 1 to num_workers ->
      receive give_assignment(id, solutions)
      total_solutions := total_solutions + solutions
      write("age=", age(), "Worker", id, "done, found", solutions, "solutions")
   af
   write("age=", age(), "Total number of solutions found was", total_solutions)
   stop
end Master

/* ............... Example compile and run(s)

% uname -a
SunOS bandersnatch 5.3 Generic sun4m sparc
% sr -v
MultiSR version 2.3, October 1994
% sr -o queens queens.sr
% time ./queens 10 4
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
Worker 4 starting up with board size 10
age= 42 Solutions to the 10 queens problem will be farmed out to 4 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
Worker 4 starts queen in column 1, row 4
age= 5149 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 5
age= 5915 Worker 4 found 93 solutions
age= 5916 Worker 2 found 48 solutions
age= 5917 Worker 3 found 65 solutions
Worker 4 starts queen in column 1, row 6
Worker 2 starts queen in column 1, row 7
Worker 3 starts queen in column 1, row 8
age= 11589 Worker 1 found 92 solutions
age= 11590 Worker 2 found 93 solutions
Worker 1 starts queen in column 1, row 9
Worker 2 starts queen in column 1, row 10
age= 11793 Worker 4 done, found 92 solutions
age= 11794 Worker 3 done, found 65 solutions
age= 14163 Worker 2 done, found 64 solutions
age= 14363 Worker 1 done, found 48 solutions
age= 14364 Total number of solutions found was 724
14.0u 0.0s 0:14 96% 0+0k 0+0io 0pf+0w
% setenv SR_PARALLEL 1
% time ./queens 10 4
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
Worker 4 starting up with board size 10
age= 42 Solutions to the 10 queens problem will be farmed out to 4 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
Worker 4 starts queen in column 1, row 4
age= 5633 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 5
age= 6432 Worker 4 found 93 solutions
age= 6433 Worker 2 found 48 solutions
age= 6434 Worker 3 found 65 solutions
Worker 4 starts queen in column 1, row 6
Worker 2 starts queen in column 1, row 7
Worker 3 starts queen in column 1, row 8
age= 12807 Worker 1 found 92 solutions
age= 12808 Worker 2 found 93 solutions
Worker 1 starts queen in column 1, row 9
Worker 2 starts queen in column 1, row 10
age= 13030 Worker 4 done, found 92 solutions
age= 13031 Worker 3 done, found 65 solutions
age= 15332 Worker 2 done, found 64 solutions
age= 15523 Worker 1 done, found 48 solutions
age= 15524 Total number of solutions found was 724
15.0u 0.0s 0:15 95% 0+0k 0+0io 0pf+0w
% setenv SR_PARALLEL 2
% time ./queens 10 4
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
Worker 4 starting up with board size 10
age= 47 Solutions to the 10 queens problem will be farmed out to 4 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
Worker 4 starts queen in column 1, row 4
age= 17378 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 5
age= 19392 Worker 2 found 48 solutions
Worker 2 starts queen in column 1, row 6
age= 21436 Worker 4 found 93 solutions
Worker 4 starts queen in column 1, row 7
age= 24186 Worker 3 found 65 solutions
Worker 3 starts queen in column 1, row 8
age= 37968 Worker 1 found 92 solutions
age= 37970 Worker 2 found 92 solutions
Worker 1 starts queen in column 1, row 9
Worker 2 starts queen in column 1, row 10
age= 41285 Worker 4 done, found 93 solutions
age= 47439 Worker 3 done, found 65 solutions
age= 49919 Worker 2 done, found 64 solutions
age= 50093 Worker 1 done, found 48 solutions
age= 50094 Total number of solutions found was 724
51.0u 37.0s 0:50 175% 0+0k 0+0io 0pf+0w
% setenv SR_PARALLEL 3
% time ./queens 10 4
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
Worker 4 starting up with board size 10
age= 53 Solutions to the 10 queens problem will be farmed out to 4 workers
Worker 1 starts queen in column 1, row 1
Worker 3 starts queen in column 1, row 3
Worker 2 starts queen in column 1, row 2
Worker 4 starts queen in column 1, row 4
age= 17910 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 5
age= 19555 Worker 4 found 93 solutions
age= 19557 Worker 2 found 48 solutions
Worker 4 starts queen in column 1, row 6
Worker 2 starts queen in column 1, row 7
age= 21026 Worker 3 found 65 solutions
Worker 3 starts queen in column 1, row 8
age= 38338 Worker 2 found 93 solutions
age= 38339 Worker 1 found 92 solutions
Worker 2 starts queen in column 1, row 9
Worker 1 starts queen in column 1, row 10
age= 40594 Worker 4 done, found 92 solutions
age= 41867 Worker 3 done, found 65 solutions
age= 48549 Worker 2 done, found 48 solutions
age= 48553 Worker 1 done, found 64 solutions
age= 48554 Total number of solutions found was 724
51.0u 58.0s 0:48 223% 0+0k 0+0io 0pf+0w
% setenv SR_PARALLEL 4
% time ./queens 10 4
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
Worker 4 starting up with board size 10
age= 55 Solutions to the 10 queens problem will be farmed out to 4 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
Worker 4 starts queen in column 1, row 4
age= 14024 Worker 2 found 48 solutions
Worker 2 starts queen in column 1, row 5
age= 15591 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 6
age= 16641 Worker 4 found 93 solutions
Worker 4 starts queen in column 1, row 7
age= 20334 Worker 3 found 65 solutions
Worker 3 starts queen in column 1, row 8
age= 30768 Worker 2 found 92 solutions
Worker 2 starts queen in column 1, row 9
age= 31640 Worker 1 found 92 solutions
Worker 1 starts queen in column 1, row 10
age= 32458 Worker 4 done, found 93 solutions
age= 39402 Worker 3 done, found 65 solutions
age= 39476 Worker 2 done, found 48 solutions
age= 39699 Worker 1 done, found 64 solutions
age= 39700 Total number of solutions found was 724
41.0u 49.0s 0:39 226% 0+0k 0+0io 0pf+0w
% time ./queens 10 3
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
age= 46 Solutions to the 10 queens problem will be farmed out to 3 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
age= 12149 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 4
age= 14508 Worker 3 found 65 solutions
Worker 3 starts queen in column 1, row 5
age= 14829 Worker 2 found 48 solutions
Worker 2 starts queen in column 1, row 6
age= 25927 Worker 1 found 93 solutions
Worker 1 starts queen in column 1, row 7
age= 27898 Worker 2 found 92 solutions
Worker 2 starts queen in column 1, row 8
age= 29851 Worker 3 found 92 solutions
Worker 3 starts queen in column 1, row 9
age= 38592 Worker 1 found 93 solutions
Worker 1 starts queen in column 1, row 10
age= 42044 Worker 2 done, found 65 solutions
age= 43960 Worker 3 done, found 48 solutions
age= 44311 Worker 1 done, found 64 solutions
age= 44312 Total number of solutions found was 724
47.0u 47.0s 0:44 211% 0+0k 0+0io 0pf+0w
% unsetenv SR_PARALLEL
% time ./queens 10 3
Worker 1 starting up with board size 10
Worker 2 starting up with board size 10
Worker 3 starting up with board size 10
age= 35 Solutions to the 10 queens problem will be farmed out to 3 workers
Worker 1 starts queen in column 1, row 1
Worker 2 starts queen in column 1, row 2
Worker 3 starts queen in column 1, row 3
age= 3660 Worker 1 found 64 solutions
Worker 1 starts queen in column 1, row 4
age= 4329 Worker 2 found 48 solutions
age= 4330 Worker 3 found 65 solutions
Worker 2 starts queen in column 1, row 5
Worker 3 starts queen in column 1, row 6
age= 7662 Worker 1 found 93 solutions
Worker 1 starts queen in column 1, row 7
age= 8713 Worker 3 found 92 solutions
age= 8714 Worker 2 found 92 solutions
Worker 3 starts queen in column 1, row 8
Worker 2 starts queen in column 1, row 9
age= 11753 Worker 1 found 93 solutions
Worker 1 starts queen in column 1, row 10
age= 12860 Worker 2 done, found 48 solutions
age= 12861 Worker 3 done, found 65 solutions
age= 13773 Worker 1 done, found 64 solutions
age= 13774 Total number of solutions found was 724
13.0u 0.0s 0:13 93% 0+0k 0+0io 0pf+0w
                                              */

From nlam@eecs.wsu.edu  Fri Mar 10 09:40:01 1995
Received: from dns1.eecs.wsu.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11929; Fri, 10 Mar 1995 10:40:04 MST
Received: from dryden.eecs.wsu.edu by dns1.eecs.wsu.edu (8.6.10/8.940801)
	id JAA25551; Fri, 10 Mar 1995 09:40:02 -0800
From: Norman Lam - EECS <nlam@eecs.wsu.edu>
Received: by dryden.eecs.wsu.edu (1.37.109.4) id AA10259; Fri, 10 Mar 95 09:40:01 -0800
Message-Id: <9503101740.AA10259@dryden.eecs.wsu.edu>
Subject: Stack overflow
To: info-sr@cs.arizona.edu (SR User Group)
Date: Fri, 10 Mar 1995 09:40:01 -0800 (PST)
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 378       

Hi,
 
What does the error message "RTS: stack overflow" mean typically?
Is there any document on what the error messages mean?
My sr program compiled correctly but gave the above error message during
execution. The error occurred where a procedure is called and none of
the statements inside the procedure got executed as a result.

Your help is greatly appreciated.
Norman Lam

From gmt  Fri Mar 10 13:32:09 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA23195; Fri, 10 Mar 1995 13:32:14 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA22447; Fri, 10 Mar 1995 13:32:09 -0700
Date: Fri, 10 Mar 1995 13:32:09 -0700
From: Gregg Townsend <gmt>
Message-Id: <9503102032.AA22447@hawk.CS.Arizona.EDU>
To: info-sr@cs.arizona.edu, shartley@king.mcs.drexel.edu
Subject: Re:  performance question

    From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)

      The attached program was run on a Sparc multiprocessor with 4 CPUs.  It
    was compiled with the MultiSR version of SR.  It runs markedly slower when
    SR_PARALLEL is set bigger than 1.  What is slowing it down?

    % setenv SR_PARALLEL 1
    % time ./queens 10 4
    15.0u 0.0s 0:15 95% 0+0k 0+0io 0pf+0w

    % setenv SR_PARALLEL 2
    % time ./queens 10 4
    51.0u 37.0s 0:50 175% 0+0k 0+0io 0pf+0w

    % setenv SR_PARALLEL 3
    % time ./queens 10 4
    51.0u 58.0s 0:48 223% 0+0k 0+0io 0pf+0w

    % setenv SR_PARALLEL 4
    % time ./queens 10 4
    41.0u 49.0s 0:39 226% 0+0k 0+0io 0pf+0w

Of course, there is some cost to running with parallelism enabled,
as the various parts of the runtime system need to coordinate with
each other.  truss(1) shows a huge number of system lock/unlock/p/v
calls with SR_PARALLEL>1 that aren't there with SR_PARALLEL=1.
Still, I wouldn't expect to see a slowdown like you reported.

Without trying to analyze this particular program, I ran it several
times on our multiprocessor Sparcstation.  This system is running the
same versions of Solaris and SR as you reported.  Here are the real
(elapsed) times I recorded for "queens 10 4":
	SR_PARALLEL=1	12.6, 12.4, 12.9
	SR_PARALLEL=2	12.8, 13.8, 14.2
	SR_PARALLEL=3	29.3, 29.2, 30.9
	SR_PARALLEL=4	30.2, 21.7, 33.1

In my experiments, the big increase came with the attempt to run with
parallelism of 3.  That makes some sense here, because our Sparcstation
has only two processors.  The user and system times you reported, though,
do seem to indicate more than two processors available, so that doesn't
explain your figures.

I did not have a dedicated machine available for these experiments, so I
watched /usr/openwin/bin/perfmeter to verify that the system was idle.
I noticed that when I asked for more parallelism than really available,
the number of system context switches on the perfmeter went way up --
whereas there were none earlier.  On the on the other hand, with
SR_PARALLEL=2 the program did not appear to actually make use of the
second CPU.

One really interesting discovery was that the SR_PARALLEL=3 case runs
more quickly when the system is NOT idle.  In fact, if I run two of
those at once, each of them finishes in under 15 seconds, while alone
a single one runs for about 30 seconds!

I'm not sure what conclusions to draw from this other than that the
Solaris scheduling sometimes seems strange.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From gmt  Fri Mar 10 14:03:22 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA25389; Fri, 10 Mar 1995 14:03:27 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA22583; Fri, 10 Mar 1995 14:03:22 -0700
Date: Fri, 10 Mar 1995 14:03:22 -0700
From: Gregg Townsend <gmt>
Message-Id: <9503102103.AA22583@hawk.CS.Arizona.EDU>
To: info-sr@cs.arizona.edu, nlam@eecs.wsu.edu
Subject: Re:  Stack overflow

    From: Norman Lam - EECS <nlam@eecs.wsu.edu>
     
    What does the error message "RTS: stack overflow" mean typically?
    Is there any document on what the error messages mean?
    My sr program compiled correctly but gave the above error message during
    execution. The error occurred where a procedure is called and none of
    the statements inside the procedure got executed as a result.
    
There's no document describing SR error messages.  Infinite recursion will
produce a "stack overflow" (or worse) but the message can also occur in a
correct program that just needs a larger stack.  The stack size can be
set using the "-S" option of srl.

Unfortunately, we've found nothing better than trial and error for
predicting stack sizes.  The amount needed depends on lots of system-
dependent things beyond the user's control, such as the requirements
of the C runtime system.  The default of 40000 is sufficient to run the
programs in the SR test suite on all the machines we normally use.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt@cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m

From john_townsend@taligent.com  Tue Mar 14 10:51:04 1995
Received: from mailserv.taligent.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA07072; Tue, 14 Mar 1995 11:52:09 MST
Received: from qm.taligent.com by mailserv.taligent.com (AIX 3.2/UCB 5.64/4.03)
          id AA26827; Tue, 14 Mar 1995 10:53:23 -0800
Message-Id: <n1416944174.10882@taligent.com>
Date: 14 Mar 1995 10:51:04 -0800
From: "John Townsend" <john_townsend@taligent.com>
Subject: SR on AIX 4.1
To: "info-sr Mailing List" <info-sr@cs.arizona.edu>
X-Mailer: Mail*Link SMTP-QM 3.0.2

I apologize for not posting this sooner. I have been extrordinarily busy with
projects, finals, job interviews, etc. and haven't had the time to remember
what we did to solve this problem. Anyway.. here it is:

Making SR run on AIX 4.1
1. You need root access on your RS/6000 box.
2. You need to make the following change in /etc/xlC.cfg

* common definitions
DEFLT:
...
...
...
* this is the old line. The new line is the second line.
*       options   =
-D_AIX,-D_AIX32,-D_IBMR2,-D_POWER,-bpT:0x10000000,-bpD:0x20000000
         options   = -D_AIX,-D_AIX32,-D_IBMR2,-D_POWER


Change the options line to NOT include the -bpT and -bpD linker options. These
are options that specify the base address of text and data for the AIX linker.
Near as we can tell, these are default settings and aren't neccessary. In
fact, they mess up SR.

3. Please consider recompiling the entire SR package.
4. Now things should be working for you.

That's all I did. Your mileage may vary. I may be using a different version of
AIX 4.1 than you are using and I don't know how this change will effect non-SR
work. (I build LOTS of stuff with xlC and everything is working just fine for
me. Your experience could be different).

And that's it. If you have any questions, please let me know...

-- John Townsend


From bergenhe@db.erau.edu  Sat Mar 18 19:44:57 1995
Received: from db.erau.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13501; Sat, 18 Mar 1995 17:44:57 MST
Received: from zeta.sun by db.erau.edu with smtp
	(Smail3.1.28.1 #2) id m0rq95q-0007zhC; Sat, 18 Mar 95 19:43 EST
Message-Id: <m0rq95q-0007zhC@db.erau.edu>
From: bergenhe@db.erau.edu (Erik Bergenholtz)
Subject: virtual machine communication
To: info-sr@cs.arizona.edu
Date: Sat, 18 Mar 95 19:44:57 EST
X-Mailer: ELM [version 2.3 PL11]

Hi!

I am trying to implement the Byzantine Generals Problem using SR. 
I am having difficulty getting virtual machines to communicate with
each other. Is this possible to do? The "SR Programming Language" book does
not explicitly mention this.

Any information or help is greatly appreciated.

Best Regards,

Erik Bergenholtz
e-mail: bergenhe@db.erau.edu


From greg  Mon Mar 20 08:24:07 1995
Received: from paloverde.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA20259; Mon, 20 Mar 1995 08:24:10 MST
Received: by paloverde.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA03425; Mon, 20 Mar 1995 08:24:07 -0700
Date: Mon, 20 Mar 1995 08:24:07 -0700
From: Greg Andrews <greg>
Message-Id: <9503201524.AA03425@paloverde.CS.Arizona.EDU>
To: bergenhe@db.erau.edu, info-sr@cs.arizona.edu
Subject: Re:  virtual machine communication

    From: bergenhe@db.erau.edu (Erik Bergenholtz)
    Subject: virtual machine communication
    To: info-sr@cs.arizona.edu
    Date: Sat, 18 Mar 95 19:44:57 EST
    
    Hi!
    
    I am trying to implement the Byzantine Generals Problem using SR. 
    I am having difficulty getting virtual machines to communicate with
    each other. Is this possible to do? The "SR Programming Language" book does
    not explicitly mention this.
    
    Any information or help is greatly appreciated.
    
    Best Regards,
    
    Erik Bergenholtz
    e-mail: bergenhe@db.erau.edu
    
    
Virtual machines are merely address spaces.  Resources are the "active"
unit in SR.  Resources communicate with each other, and they can be
placed on different virtual machines.  There are examples of this in
the SR book.  Look at the Distributed File System chapter, for example.

Greg Andrews

From sirirut@csgrad.cs.vt.edu  Fri Mar 31 10:05:08 1995
Received: from csgrad.cs.vt.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA03384; Fri, 31 Mar 1995 08:05:10 MST
Received: by csgrad.cs.vt.edu; (5.65/1.1.8.2/19Sep94-1023AM)
	id AA18111; Fri, 31 Mar 1995 10:05:09 -0500
Message-Id: <9503311505.AA18111@csgrad.cs.vt.edu>
Subject: Want to be in mailing list
To: info-sr@cs.arizona.edu
Date: Fri, 31 Mar 1995 10:05:08 -0500 (EST)
From: "Sirirut Vanichayobon" <sirirut@csgrad.cs.vt.edu>
X-Mailer: ELM [version 2.4 PL23]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 73        

 I am interested in SR. My e-mail address is sirirut@csgrad.cs.vt.edu.



From jperez@lensis3.lsi.us.es  Wed Apr 12 18:49:00 1995
Received: from lensis3.lsi.us.es by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA20903; Wed, 12 Apr 1995 08:50:21 MST
Received: by lensis3.lsi.us.es (AIX 3.2/UCB 5.64/4.03)
          id AA14161; Wed, 12 Apr 1995 18:49:00 -0500
Date: Wed, 12 Apr 1995 18:49:00 -0500
From: jperez@lensis3.lsi.us.es (Jos Antonio Prez Castellanos)
Message-Id: <9504122349.AA14161@lensis3.lsi.us.es>
To: info-sr@cs.arizona.edu

INFO-SR Mailing List

	Hello. 

	Last week I mailed you for being included in the INFO-SR Mailing
List. My e-mail has just been changed, so please, you could delete my old
e-mail and insert my new one:

my old e-mail: jperez@lensis1.fie.us.es 
my new e-mail: jperez@lensis1.lsi.us.e

	Sincerelly Yours,

				Jose Antonio Perez Castellanos
				Facultad Informatica y Estadistica
				Sevilla - ESPA%A

				jperez@lensis1.lsi.us.e

From mcnamee@dromio.ecs.csus.edu  Mon Apr 17 20:07:42 1995
Received: from dromio.ecs.csus.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA06653; Mon, 17 Apr 1995 20:05:21 MST
Received: (from mcnamee@localhost) by dromio.ecs.csus.edu (8.6.10/8.6.9) id UAA10246; Mon, 17 Apr 1995 20:07:43 -0700
Date: Mon, 17 Apr 1995 20:07:42 -0700 (PDT)
From: Carole McNamee <mcnamee@dromio.ecs.csus.edu>
To: info-sr@cs.arizona.edu
Cc: crowa@dromio.ecs.csus.edu
Subject: timing sr progs
Message-Id: <Pine.SUN.3.91.950417200121.10242B-100000@dromio.ecs.csus.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

We are timing some sr programs using /bin/time and csh time on both 
sparcs and HP machines.  We are getting some results that are contrary 
to results obtained five years ago with a much older version of sr.  
The results for elapsed time seem quite reasonable but the user time 
figures seem to give the inverse of the expected result.  Have you or 
anyone else observed this phenomenon and might you have an explanation 
for it???   We are quite puzzled!

tks,
Carole McNamee
mcnamee@dromio.csus.edu


  

From Tsomber@aol.com  Tue Apr 25 12:37:49 1995
Received: from mail06.mail.aol.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA10523; Tue, 25 Apr 1995 09:37:51 MST
Received: by mail06.mail.aol.com
	(1.37.109.11/16.2) id AA275797869; Tue, 25 Apr 1995 12:37:49 -0400
Date: Tue, 25 Apr 1995 12:37:49 -0400
From: Tsomber@aol.com
Message-Id: <950425123745_95668901@aol.com>
To: info-sr@cs.arizona.edu
Subject: installing on linux

  Hi! I'd appreciate some feedback on the following problem I am having
trying to install SR on a PC running Slackware linux.  I am a student at
California State Univ. Hayward and SR is being used in an Operating Systems
class there taught by Profession G. Lippman.

    I installed the latest version of SR on a Pent. 16meg machine running
Slackware.  I performed the Configuration change mentioned in the file
Systems, and performed the make, and make install proecess.  No errors were
seen at this time.
   I then ran the tester program  -p -v quick /vm .   This seemd to run fine
but at the end the following message was seen before termination :  
   0  $RSHPath $HOST  -n date >date.out
    ./sev:   /usr/bin/rsh: no such directory exists
     expected 0, got 126 from $RSHPATH

   Now, I tried running some example programs from Chap01 examples.  The
'Hello.SR' program worked fine, as did the 'Factorial.SR' .  However, other
programs in Chap01 and Chap02 would generate errors like "array bounds
overfow.."  AND more alarmingly "Parser error at ' Procedcure '  "   .

   I know you are busy, but *any* help on this matter is greatly appreciated.
 I am supposed to demonstrate the SR installation process soon so it can be
used in classes at CSUH.

thomas smith

From gmt  Tue Apr 25 11:15:37 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA17650; Tue, 25 Apr 1995 11:15:39 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA12066; Tue, 25 Apr 1995 11:15:37 -0700
Date: Tue, 25 Apr 1995 11:15:37 -0700
From: Gregg Townsend <gmt>
Message-Id: <9504251815.AA12066@hawk.CS.Arizona.EDU>
To: Tsomber@aol.com
Subject: Re:  installing on linux
Cc: info-sr

The first problem sounds like SR can't find the rsh (remote shell)
program.  Check your setting of RSHPATH in the Configuration file.

I don't know about "Parser error" and "bounds overflow" messages.
Those messages aren't part of SR.  Perhaps another of our Linux
users can shed some light there.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 520 621 4325     gmt@CS.Arizona.EDU     110 57 16 W / 32 13 45 N / +758m

From pingu!edgar@tmpuhf.saar.de  Tue May  2 12:10:23 1995
Received: from shug-internet.saar.de by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA10625; Tue, 2 May 1995 12:10:23 MST
Received: from TMPuhf.Saar.DE (tmpuhf.saar.de [192.109.53.3]) by Shug-Internet.Saar.DE (8.6.8.1/8.5) with SMTP id VAA09702; Tue, 2 May 1995 21:10:07 +0200
Received: from pingu by TMPuhf.Saar.DE with uucp
	(Smail3.1.28.1 #1) id m0s6NKf-00020zC; Tue, 2 May 95 21:10 WET DST
Received: by pingu.saar.de (Smail3.1.28.1 #4)
	id m0s6LOA-0002KoC; Tue, 2 May 95 19:05 MET DST
Message-Id: <m0s6LOA-0002KoC@pingu.saar.de>
Date: Tue, 2 May 95 19:05 MET DST
From: edgar@pingu.saar.de (Edgar Greuter)
To: info-sr@cs.arizona.edu
Subject: Patch for .../srlatex/print.c

Hi!

The SR 2.3 version of srlatex has a small error. When a @-sign is output, a
break was missing in the C-source, and so another ^-char is echoed behind it
in the output. The following patch corrects the problem:

--- srlatex/print.c.orig	Sat Mar  6 00:57:37 1993
+++ srlatex/print.c	Tue May  2 18:47:53 1995
@@ -275,6 +275,7 @@
 	    case '@':
 		mmode ();
 		out ("\\char`\\@ ");
+		break;
 	    case '^':
 		mmode ();
 		out ("\\char`\\^ ");

Thanks for your attention!

	- Edgar

From gmt  Tue May  2 12:31:37 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA12095; Tue, 2 May 1995 12:31:40 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA20945; Tue, 2 May 1995 12:31:37 -0700
Date: Tue, 2 May 1995 12:31:37 -0700
From: Gregg Townsend <gmt>
Message-Id: <9505021931.AA20945@hawk.CS.Arizona.EDU>
To: edgar@pingu.saar.de
Subject: Re:  Patch for .../srlatex/print.c
Cc: info-sr

Thanks for the fix.  I'll see that it's included in the next version.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 520 621 4325     gmt@CS.Arizona.EDU     110 57 16 W / 32 13 45 N / +758m

From colin@dcs.st-and.ac.uk  Mon Jun  5 10:20:44 1995
Received: from tamdhu.dcs.st-andrews.ac.uk (tamdhu.dcs.st-and.ac.uk) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26606; Mon, 5 Jun 1995 10:20:44 MST
Received: by tamdhu.dcs.st-andrews.ac.uk (4.1/SMI-4.1)
	id AA16427; Mon, 5 Jun 95 18:21:37 BST
Date: Mon, 5 Jun 95 18:21:37 BST
From: colin@dcs.st-and.ac.uk (Colin Allison)
Message-Id: <9506051721.AA16427@tamdhu.dcs.st-andrews.ac.uk>
To: info-sr@cs.arizona.edu
Subject: non-blocking read() ?

I'm seeing some unexpected behaviour using the read() command
in resource instances created on a different vm from the
"main" part of a program - basically the read() never waits and
in the example below the loop goes on indefinitely outputting
the prompt.

If the example is modified so the "remote" resource is created
on the same vm() it behaves as expected.

can anyone explain this?

thanks,
Colin Allison
St Andrews
-------------------------------------------------
resource remote()

  var answer: string[8]
  do  true ->
      writes("Enter (o for OK, q for quit):")
      read (answer)
      if answer = "o" -> write("OK")
      [] answer = "q" -> write("quitting"); exit
      fi
  od

end remote


resource main()
import remote

  var remote_resource: cap remote
  var host1: cap vm

  host1 := create vm() on "glenkinchie"
  remote_resource := create remote() on host1

end main

From gmt  Tue Jun  6 09:13:26 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA00987; Tue, 6 Jun 1995 09:13:44 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA29216; Tue, 6 Jun 1995 09:13:26 -0700
Date: Tue, 6 Jun 1995 09:13:26 -0700
From: Gregg Townsend <gmt>
Message-Id: <9506061613.AA29216@hawk.CS.Arizona.EDU>
To: colin@dcs.st-and.ac.uk, info-sr@cs.arizona.edu
Subject: Re:  non-blocking read() ?

    Date: Mon, 5 Jun 95 18:21:37 BST
    From: colin@dcs.st-and.ac.uk (Colin Allison)
    
    I'm seeing some unexpected behaviour using the read() command
    in resource instances created on a different vm from the
    "main" part of a program - basically the read() never waits and
    in the example below the loop goes on indefinitely outputting
    the prompt.

New virtual machines inherit only standard output and standard error from
the original VM.  In particular, standard input is connected to /dev/null.
The read() is getting an immediate EOF, resulting in a loop.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 520 621 4325     gmt@CS.Arizona.EDU     110 57 16 W / 32 13 45 N / +758m

From vanmaren@fast.cs.utah.edu  Wed Jul 12 17:43:26 1995
Received: from cs.utah.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA00122; Wed, 12 Jul 1995 16:43:34 MST
Received: from fast.cs.utah.edu by cs.utah.edu (8.6.12/utah-2.21-cs)
	id RAA01004; Wed, 12 Jul 1995 17:43:26 -0600
Received: by fast.cs.utah.edu (8.6.10/utah-2.15-leaf)
	id RAA25778; Wed, 12 Jul 1995 17:43:26 -0600
Date: Wed, 12 Jul 1995 17:43:26 -0600
From: vanmaren@fast.cs.utah.edu (Kevin  Van maren)
Message-Id: <199507122343.RAA25778@fast.cs.utah.edu>
To: info-sr@cs.arizona.edu

I used SR last semester for a class at the University
of Wyoming.  Now that I am at Utah, I thought I'd
install SR 2.3 on the HP RISC (800 or 735) machines
that I have access to.  Unfortunatly, it doesn't seem
to like the installation process.  It chokes on building
the asm.o file.  I am using gcc 2.5.8 (cc & as 2.5.2).
The error message is 
asm.s:26: Fatal error:Not in a space.
when I build that one file manually using make asm.o
in the csw directory.

Is this a problem with g-cc/g-as?  I am wondering if
someone has already figured out the fix for this.
There are some other machines around here I could try,
but they all use the gcc compiler.

I also get *** Error code 1 (ignored) right after the 
cc of util.c and before the cc of main.c. (twice)

I haven't subscribed tothe list yet, so I would
appreciate it if you cound send a copy of the 
response directly to me.

Thanks,
Kevin Van Maren

From gmt  Thu Jul 13 10:35:29 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA22185; Thu, 13 Jul 1995 10:35:30 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA23701; Thu, 13 Jul 1995 10:35:29 -0700
Date: Thu, 13 Jul 1995 10:35:29 -0700
From: Gregg Townsend <gmt>
Message-Id: <9507131735.AA23701@hawk.CS.Arizona.EDU>
To: vanmaren@fast.cs.utah.edu
Subject: Re: errors building SR on HP using gcc
Cc: info-sr

    Date: Wed, 12 Jul 1995 17:43:26 -0600
    From: vanmaren@fast.cs.utah.edu (Kevin  Van maren)
    
    ... I thought I'd install SR 2.3 on the HP RISC (800 or 735) machines
    that I have access to.  Unfortunatly, it doesn't seem to like the
    installation process.  It chokes on building the asm.o file. 
    I am using gcc 2.5.8 (cc & as 2.5.2)....

This is just a guess, but does gcc predefine the same symbols as the
HP C compiler?  In particular, SR (in the top-level arch.h file)
depends on the predefined symbol "hp9000s800" to identify any HP-RISC
architecture.

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 520 621 4325     gmt@CS.Arizona.EDU     110 57 16 W / 32 13 45 N / +758m

From shartley@king.mcs.drexel.edu  Mon Jul 17 07:10:28 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA18341; Mon, 17 Jul 1995 04:10:16 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA08313; Mon, 17 Jul 95 07:10:28 EDT
Date: Mon, 17 Jul 95 07:10:28 EDT
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9507171110.AA08313@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: The future of SR

  I am wondering what plans there are for SR's future by the developers, such
as new features contemplated.  Or maybe SR has stabilized and future releases
will be of the bug fix and maintenance kind.
  Thanks.

Steve Hartley
Math and Computer Science
Drexel University

From shartley@king.mcs.drexel.edu  Thu Jul 27 12:08:10 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13350; Thu, 27 Jul 1995 09:07:52 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA13499; Thu, 27 Jul 95 12:08:10 EDT
Date: Thu, 27 Jul 95 12:08:10 EDT
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9507271608.AA13499@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: book errata

  An errata Web page has been set up for the book

      "Operating Systems Programming: The SR Programming Language",
      Oxford University Press, 1995, ISBN 0-19-5095790.

See http://www.mcs.drexel.edu/~shartley/BookOSusingSR/errata.html

From s2157613@cse.unsw.edu.au  Sun Aug 20 12:44:40 1995
Received: from albeniz.orchestra.cse.unsw.EDU.AU by optima.CS.Arizona.EDU (5.65c/15) via SMTP
	id AA02803; Sat, 19 Aug 1995 19:49:26 MST
Return-Path: s2157613@cse.unsw.edu.au
Received: From bribe With LocalMail ; Sun, 20 Aug 95 12:46:32 +1000 
From: s2157613@cse.unsw.edu.au (Tuan Van Nguyen)
To: info-sr@cs.arizona.edu
Date: Sun, 20 Aug 95 12:44:40 +1000
Message-Id:  <950820024440.23913@cse.unsw.edu.au>
Subject: hello

 My name is TUAN , I am from N.S.W university . I wuold like to
say hello to all of you . I have just learned on Concurrent about
few months ago , but i am really interesting on that . when you 
receive this mail, please mail back to me . Thank you.
					TUAN.


From farraj@sybase.com  Fri Sep 22 09:49:30 1995
Resent-Date: Fri, 22 Sep 1995 09:49:30 -0700 (PDT)
Resent-From: farraj@sybase.com
Received: from Arizona.EDU (Penny.Telcom.Arizona.EDU) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11421; Fri, 22 Sep 1995 09:48:17 MST
Received: from Arizona.EDU by Arizona.EDU (PMDF V5.0-5 #2381)
 id <01HVKM8SQWGY9D4EV9@Arizona.EDU> for info-sr@CS.Arizona.EDU; Fri,
 22 Sep 1995 09:48:11 -0700 (MST)
Received: from halon.sybase.com (192.138.151.33)
 by Arizona.EDU (PMDF V5.0-5 #2381) id <01HVKM8EIRRKBRB0NX@Arizona.EDU> for
 info-sr@Arizona.EDU; Fri, 22 Sep 1995 09:47:55 -0700 (MST)
Received: from sybase.com (sybgate.sybase.com)
 by halon.sybase.com (5.x/SMI-SVR4/SybFW4.0) id AA16297; Fri,
 22 Sep 1995 09:47:17 -0700
Received: from surf.sybgate.sybase.com by sybase.com (4.1/SMI-4.1/SybH3.4)
 id AA18313; Fri, 22 Sep 1995 09:49:31 -0700 (PDT)
Received: by surf.sybgate.sybase.com (4.1/SMI-4.1/SybEC3.2) id AA08188; Fri,
 22 Sep 1995 09:49:30 -0700 (PDT)
Date: Fri, 22 Sep 1995 09:49:30 -0700 (PDT)
From: farraj@sybase.com (Jack Farraj)
Subject: 
Resent-To: info-sr@cs.arizona.edu
To: info-sr@arizona.edu
Resent-Message-Id: <01HVKM8SXLLW9D4EV9@Arizona.EDU>
Message-Id: <9509221649.AA08188@surf.sybgate.sybase.com>
X-Vms-To: IN%"info-sr@Arizona.EDU"
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Transfer-Encoding: 7BIT



From 75162.1362@compuserve.com  Sat Sep 23 02:08:25 1995
Received: from arl-img-5.compuserve.com by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA26785; Fri, 22 Sep 1995 23:10:19 MST
Received: by arl-img-5.compuserve.com (8.6.10/5.950515)
	id CAA02683; Sat, 23 Sep 1995 02:10:17 -0400
Date: 23 Sep 95 02:08:25 EDT
From: Julie <75162.1362@compuserve.com>
To: Info-SR Mailing List <info-sr@cs.arizona.edu>
Subject: SR Mailing List
Message-Id: <950923060824_75162.1362_FHI5-1@CompuServe.COM>

Please put me on your mailing list for SR issues.  If you have additional
information on the SR Programming Language that will be helpful for a graduate
course project or ideas for an internet project, please e-mail the information.


My e-mail addresses:   75162.1362@compuserve.com
                                          dujulie@orion.etsu.edu

Thank you very much.
Julie Du


From shartley@king.mcs.drexel.edu  Fri Sep 29 13:24:25 1995
Received: from mcs.drexel.edu (king.mcs.drexel.edu) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA07940; Fri, 29 Sep 1995 10:24:26 MST
Received: by mcs.drexel.edu (4.1/SMI-4.0)
	id AA18787; Fri, 29 Sep 95 13:24:25 EDT
Date: Fri, 29 Sep 95 13:24:25 EDT
From: shartley@king.mcs.drexel.edu (Stephen J. Hartley)
Message-Id: <9509291724.AA18787@mcs.drexel.edu>
To: info-sr@cs.arizona.edu
Subject: Using SR in OS classes

Concurrent Programming for Operating Systems Classes Using SR


For Web-browsable text, example programs, animations, and laboratory exercises
about using the SR programming language in operating systems classes, see

    http://www.mcs.drexel.edu/~shartley/OSusingSR/index.html

Table of Contents

Introduction
Processes
The SR Programming Language
   Laboratory
Race Conditions and Process Synchronization
   Laboratory
Semaphores
   Laboratory
Monitors
   Laboratory
Message Passing
   Laboratory
Rendezvous
   Laboratory

This work is supported by the National Science Foundation,
Division of Undergraduate Education, Course and Curriculum Development
Program, DUE-9455307.


Stephen J. Hartley, Assistant Professor
Math and Computer Science, Drexel University, Philadelphia, PA  19104
office (215) 895-2678, fax (215) 895-1582/4999, e-mail shartley@mcs.drexel.edu
WWW URL http://www.mcs.drexel.edu/~shartley

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      From gmt  Mon Oct 16 11:31:36 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA13051; Mon, 16 Oct 1995 11:31:37 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA23549; Mon, 16 Oct 1995 11:31:36 -0700
Date: Mon, 16 Oct 1995 11:31:36 -0700
From: Gregg Townsend <gmt>
Message-Id: <9510161831.AA23549@hawk.CS.Arizona.EDU>
To: info-sr
Subject: Building SR on Linux

 From benson@cs.ucdavis.edu  Sun Oct 15 03:53:00 1995
 [fowarded with permission]

In recent versions of Slackware (A popular Linux distribution) SR
fails to build with the following link error:

ld: Output file requires shared library `libc.so.4'
gcc: Internal compiler error: program ld got fatal signal 6

A fix I have used in the past is to remove "-g" from the definition
of CFLAGS in the main Makefile.  This allows SR to build, but without
debugging support.  For most users this is fine.

A cleaner fix is to change the LIBM line in Configuration to:

LIBM = -lm -lc

This allows SR to be compiled on Linux with debugging support.
Note that the debugging info is removed (stripped) from the executables
when they are installed.

It seems that when gcc is told to generate debugging information
a dependency is created by the math library.  I am guessing libm
depends on something in libc which is needed by gcc to produce
debugging info.  This might not be a Slackware problem, but rather
a gcc+linux problem.  Sorry for the lack of a better explanation.

I know this is a problem for Slackware 2.2 and 2.3.  It might apply
to other distributions as well.  

Perhaps this should be mentioned in the Systems file.  I have run into
at least two other people that have had this problem, I am sure there
are others.

Greg


From steve@atlas.ex.ac.uk  Tue Oct 31 14:37:29 1995
Received: from hermes (hermes.ex.ac.uk) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA04668; Tue, 31 Oct 1995 07:38:40 MST
Received: from atlas.dcs.exeter.ac.uk by hermes via SMTP (OAA19388); Tue, 31 Oct 1995 14:38:51 GMT
From: steve@atlas.ex.ac.uk
Received: from vega.dcs.exeter.ac.uk by atlas.dcs.exeter.ac.uk; Tue, 31 Oct 95 14:37:26 GMT
Date: Tue, 31 Oct 95 14:37:29 GMT
Message-Id: <15170.9510311437@vega.dcs.exeter.ac.uk>
To: info-sr@cs.arizona.edu
Subject: Signaling Disciplines


Re: Signal and Exit in Monitors

I wrote a small program in an attempt to illustrate the
difference between the alternative signaling disciplines
in monitors:

file sigdis.m:

_monitor(test)
    op req(id: int), wake() 

_body(test)
   _condvar(cond);

   _proc( req(id) )
      printf("Process Pr%d enters at time %d\n", id, age())
      nap(1000)
      printf("Process Pr%d queued at time %d\n", id, age())
      _wait(cond)
      printf("Process Pr%d awakes at time %d\n", id, age())
   _proc_end

   _proc( wake() )
      printf("Process Sig enters at time %d\n", age())
      _signal(cond)
      printf("Process Sig continues at time %d\n", age())
   _proc_end
_monitor_end

file sigmain.sr:

resource SigDis()
   import test

   process Pr (i := 1 to 3) 
      nap(i * 1000)
      test.req(i)
   end

   process Sig
      nap(2500)
      test.wake()
   end
end 

Using the m2sr preprocessor, I get the behaviour I would 
expect with signal and continue, signal and wait, and 
signal and urgent wait.  However, the signal and exit option
does not appear to be preemptive:

20 % m2sr -sx sigdis.m
21 % sr sigdis.sr sigmain.sr
sigdis.sr:
sigmain.sr:
sigdis.sr:
sigmain.sr:
linking:
22 % a.out
Process Pr1 enters at time 1042
Process Pr1 queued at time 2111
Process Pr2 enters at time 2168
Process Pr2 queued at time 3242
Process Sig enters at time 3297
Process Pr3 enters at time 3300
Process Pr3 queued at time 4312
Process Pr1 awakes at time 4317

i.e. Pr3 is allowed to enter the monitor even though Pr1 was
the process awakened by the signal.

Looking at the macro definitions, it seems that what has been 
implemented is the equivalent of:

sem e := 1
sem c := 0
var nc:int := 0

monitor entry:	P(e)
wait(cond):	nc++; V(e); P(c); P(e)
signal(cond):   if nc > 0 -> nc--; V(c) fi; V(e); return
monitor exit:	V(e)

whereas for preemptive behaviour I would expect something like:

sem e := 1
sem c := 0
var nc:int := 0

monitor entry:	P(e)
wait(cond):	nc++; V(e); P(c)
signal(cond):   if nc > 0 -> nc--; V(c) [] nc = 0 -> V(e) fi; return
monitor exit:	V(e)

Do you agree with this?  If so, I think the following modification
to m2sr.h is required:

*** m2sr.old	Mon Oct 30 09:47:53 1995
--- m2sr.h	Mon Oct 30 09:52:04 1995
***************
*** 132,138 ****
    send x.m_wait_ranks(y); \
    send m_mutex(); \
    receive m_return_from_wait(); \
-   receive m_mutex();
  
  /* enclose in if statement in attempt to avoid unreachable code
   * messages that come in case _signal comes right before _proc_end.
--- 132,137 ----
***************
*** 140,147 ****
  #define _signal(x) \
  SLINE \
    if true -> \
!     m_bozo := x.m_signal(); \
!     send m_mutex(); \
      return; \
    fi;
  
--- 139,147 ----
  #define _signal(x) \
  SLINE \
    if true -> \
!     if not x.m_signal() -> \
!       send m_mutex(); \
!     fi; \
      return; \
    fi;
  
This gives the preemptive behaviour I would expect:

29 % m2sr -sx sigdis.m
30 % sr sigdis.sr sigmain.sr
sigdis.sr:
sigmain.sr:
sigdis.sr:
sigmain.sr:
linking:
31 % a.out
Process Pr1 enters at time 1035
Process Pr1 queued at time 2105
Process Pr2 enters at time 2163
Process Pr2 queued at time 3226
Process Sig enters at time 3231
Process Pr1 awakes at time 3234
Process Pr3 enters at time 3235
Process Pr3 queued at time 4246

Steve

-------------------------------------------------------------------------------
Parallel Systems Research Laboratory	|  Stephen Turner
Email:  steve@dcs.exeter.ac.uk   	|  Department of Computer Science
WWW:	http://www.dcs.exeter.ac.uk	|  University of Exeter
Fax:    +44 1392 264067			|  Prince of Wales Road
Tel:    +44 1392 264048			|  Exeter EX4 4PT England
-------------------------------------------------------------------------------


From olsson@cs.ucdavis.edu  Tue Oct 31 12:51:32 1995
Received: from toadflax.cs.ucdavis.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA27320; Tue, 31 Oct 1995 13:51:36 MST
Received: from ivy.cs.ucdavis.edu by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.6)
	id AA14156; Tue, 31 Oct 95 12:51:33 PST
Received: by ivy.cs.ucdavis.edu (5.65/UCD.CS.2.6)
	id AA02865; Tue, 31 Oct 1995 12:51:32 -0800
Date: Tue, 31 Oct 1995 12:51:32 -0800
From: olsson@cs.ucdavis.edu (Ron Olsson)
Message-Id: <9510312051.AA02865@ivy.cs.ucdavis.edu>
To: steve@atlas.ex.ac.uk
Cc: info-sr@cs.arizona.edu
In-Reply-To: <15170.9510311437@vega.dcs.exeter.ac.uk> (steve@atlas.ex.ac.uk)
Subject: Signaling Disciplines

I agree with your analysis and your patch looks good.  Thanks.  Sorry
for the no-brainer.

From bartis@cnu.edu  Thu Nov  2 12:14:19 1995
Received: from drake.cnu.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA24074; Thu, 2 Nov 1995 10:15:54 MST
Received: from drake.cnu.edu (localhost [127.0.0.1]) by drake.cnu.edu (8.6.12/8.6.9) with SMTP id MAA05605 for <info-sr@cs.arizona.edu>; Thu, 2 Nov 1995 12:14:19 -0500
Message-Id: <199511021714.MAA05605@drake.cnu.edu>
Date: Thu, 02 Nov 95 12:14:19 -0500
Sender: bartis@cnu.edu
From: Brian Artis <bartis@cnu.edu>
X-Mailer: Mozilla 1.12 (X11; I; SunOS 5.4 sun4m)
Mime-Version: 1.0
To: info-sr@cs.arizona.edu
Subject: Buddy System
X-Url: http://www.mcs.drexel.edu/~shartley/OSusingSR/index.html
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

Are there any examples of the Buddy System available in SR code?  This seems
like it would be a good topic for an Operating Systems class.


bla



From greg  Thu Nov  2 13:27:28 1995
Received: from paloverde.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA03175; Thu, 2 Nov 1995 13:27:34 MST
Received: by paloverde.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA27452; Thu, 2 Nov 1995 13:27:28 -0700
Date: Thu, 2 Nov 1995 13:27:28 -0700
From: Greg Andrews <greg>
Message-Id: <9511022027.AA27452@paloverde.CS.Arizona.EDU>
To: bartis@cnu.edu, info-sr@cs.arizona.edu
Subject: Re:  Buddy System

Sorry, but there are no examples of which I am aware.  Perhaps
someone will write one?  It would be a good topic.

Greg Andrews

From lschwe@ns  Fri Nov  3 21:01:02 1995
Received: from tiny.sprintlink.net by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA01915; Fri, 3 Nov 1995 20:02:28 MST
Received: from ns.cencom.net (ns.cencom.net [198.69.20.2]) by tiny.sprintlink.net (8.6.9/8.6.9) with SMTP id WAA16512 for <info-sr@cs.arizona.edu>; Fri, 3 Nov 1995 22:02:03 -0500
Received: by ns.cencom.net (5.x/SMI-SVR4)
	id AA02173; Fri, 3 Nov 1995 21:01:02 -0600
Date: Fri, 3 Nov 1995 21:01:02 -0600 (CST)
From: Larry Schweizer DIALUP <lschwe@ns.cencom.net>
Subject: Installing SR
To: info-sr@cs.arizona.edu
Message-Id: <Pine.3.89.9511032033.A1707-0100000@ns.cencom.net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


I am running Linux 1.2.8 on a Pentium 60 PC.  I get the following error(s)
when I run 'make all':

make[1]:  Entering directory /sr/sr
.... expect 4 shift/reduction conflicts :
yacc -d grammar.y
make: /usr/bin/make: cannot execute binary file
make[1]:***[grammar.c] Error 126
make[1]: Leaving directory /sr/sr
make:***[all] Error 2

Please help!

Also, any suggestions on the proper values for the Configuration file 
would be gratefully appreciated.  I wasn't at all clear on some of 
the necessary values for my Linux/Pentium box.

Thanks-a-many!
Larry Schweizer
lschwe@ns.cencom.net


From gmt  Mon Nov  6 09:20:07 1995
Received: from hawk.CS.Arizona.EDU by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA09210; Mon, 6 Nov 1995 09:20:07 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA24047; Mon, 6 Nov 1995 09:20:07 -0700
Date: Mon, 6 Nov 1995 09:20:07 -0700
From: Gregg Townsend <gmt>
Message-Id: <9511061620.AA24047@hawk.CS.Arizona.EDU>
To: lschwe@ns.cencom.net
Subject: Re:  Installing SR
Cc: info-sr

    From: Larry Schweizer DIALUP <lschwe@ns.cencom.net>
    
    I am running Linux 1.2.8 on a Pentium 60 PC.  I get the following error(s)
    when I run 'make all':
    
    make[1]:  Entering directory /sr/sr
    .... expect 4 shift/reduction conflicts :
    yacc -d grammar.y
    make: /usr/bin/make: cannot execute binary file
    make[1]:***[grammar.c] Error 126
    make[1]: Leaving directory /sr/sr
    make:***[all] Error 2

My guess is that for some reason yacc isn't executable.  It appears to
have something do to with how your particular system is configured / 
installed.
    
    Also, any suggestions on the proper values for the Configuration file 
    would be gratefully appreciated.  I wasn't at all clear on some of 
    the necessary values for my Linux/Pentium box.

Our latest info is that you should leave everything at the settings
distributed except for three items in the Configuration file:

	CCPATH = /usr/bin/cc
	LIBL =
	LIBM = -lm -lc

   Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W
   Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077

From lschwe@ns  Tue Nov  7 23:36:22 1995
Received: from tiny.sprintlink.net by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA16342; Tue, 7 Nov 1995 22:37:22 MST
Received: from ns.cencom.net (ns.cencom.net [198.69.20.2]) by tiny.sprintlink.net (8.6.9/8.6.9) with SMTP id AAA16180 for <info-sr@cs.arizona.edu>; Wed, 8 Nov 1995 00:37:21 -0500
Received: by ns.cencom.net (5.x/SMI-SVR4)
	id AA09903; Tue, 7 Nov 1995 23:36:22 -0600
Date: Tue, 7 Nov 1995 23:36:22 -0600 (CST)
From: Larry Schweizer DIALUP <lschwe@ns.cencom.net>
Subject: SR install
To: info-sr@cs.arizona.edu
Message-Id: <Pine.3.89.9511072332.A9269-0100000@ns.cencom.net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Many thanks to William R. Patters, Jose A Perez Castellone and Greg 
Townsend for responding to my request for help.  I hope I can return the 
favor someday.  However, that may be a while because ...... I have a new 
problem!  But first, the good news:
  I found out that I'm actually running GNU Bison instead of Yacc, and that
Bison has different output filenames than Yacc.  So 'Make' was looking for
a different filename.  Setting YACC=bison and YFLAGS=-y  in the 
/sr/sr Makefile makes Bison's output filenames the same as Yacc's.  I 
also set my Configuration file to the values suggested by all of you.
So now when I run 'make all', it gets past the original problem to this 
new one:
   gcc -g   -c errors.c -o errors.o
   errors.c: In function 'yyerror':
   errors.c:58: conflicting types for 'yylval'
   tokens.h:137: previous declaration of 'yylval"
   make[1]:***{errors.o} Error 1
   make[1]: Leaving directory '/usr/sr/sr'
   make: ***{all} Error 2

Once again, any help would be truly appreciated!

Thanx!
Larry Schweizer
lschwe@ns.cencom.net 

From lschwe@ns  Sat Nov 11 19:08:15 1995
Received: from tiny.sprintlink.net by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA12572; Sat, 11 Nov 1995 18:09:14 MST
Received: from ns.cencom.net (ns.cencom.net [198.69.20.2]) by tiny.sprintlink.net (8.6.9/8.6.9) with SMTP id UAA00526 for <info-sr@cs.arizona.edu>; Sat, 11 Nov 1995 20:09:13 -0500
Received: by ns.cencom.net (5.x/SMI-SVR4)
	id AA20571; Sat, 11 Nov 1995 19:08:16 -0600
Date: Sat, 11 Nov 1995 19:08:15 -0600 (CST)
From: Larry Schweizer DIALUP <lschwe@ns.cencom.net>
Subject: SR install
To: info-sr@cs.arizona.edu
Message-Id: <Pine.3.89.9511111810.A20030-0100000@ns.cencom.net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Thanks once more to Jose A Perez Castellone and Greg Townsend for your help.

I installed Yacc, ran 'make', and everything went fine.  Obviously, Bison 
and Yacc are NOT compatible in this circumstance!  One more question, though.
I requested the following in the Configuration file:

SRSRC = /usr/local/src/sr
SRCMD = /usr/local/bin
SRLIB = /usr/local/lib/sr
MAN1  = /usr/local/man/man1
MAN3  = /usr/local/man/man3
MAN5  = /sur/local/man/man5

When 'make' completed, I went to those directories and they were empty.
Am I supposed to move the various files to their respective directories
manually?  Otherwise everything stays in the /usr/local/src/sr directory 
and various subdirectories.

Gratefully,
Larry Schweizer
lschwe@ns.cencom.net



From jperez@arturo.lsi.us.es  Mon Nov 13 13:09:19 1995
Received: from opalo.us.es by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA15795; Mon, 13 Nov 1995 05:09:18 MST
Received: from arturo.lsi.us.es by opalo.us.es (AIX 3.2/UCB 5.64/4.03)
          id AA21076; Mon, 13 Nov 1995 13:07:02 +0100
Received: from selene.lsi.us.es by lsi.us.es (5.x/SMI-SVR4)
	id AA01831; Mon, 13 Nov 1995 13:07:33 +0100
Received: by selene.lsi.us.es (5.x/SMI-SVR4)
	id AA21631; Mon, 13 Nov 1995 13:09:20 +0100
From: jperez@arturo.lsi.us.es (JOSE A. PEREZ CASTELLANOS)
Message-Id: <9511131209.AA21631@selene.lsi.us.es>
Subject: INSTALLING SR
To: info-sr@cs.arizona.edu
Date: Mon, 13 Nov 1995 13:09:19 +0100 (MET)
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text

	No, of course you haven't to copy files manually. Once SR is built
with 'make all', you must install each file to its location by typing 
'make install'. When this is done, and if the location where SR is placed is
within the PATH environment, SR is ready to run. Good luck.


						Jose Antonio Perez Castellanos
						Dep. Lenguajes y Sistemas 
						     Informaticos
						Universidad de Sevilla
						Spain
						
						jperez@lsi.us.es

From lschwe@ns  Wed Nov 15 21:32:55 1995
Received: from tiny.sprintlink.net by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA00350; Wed, 15 Nov 1995 20:33:52 MST
Received: from ns.cencom.net (ns.cencom.net [198.69.20.2]) by tiny.sprintlink.net (8.6.9/8.6.9) with SMTP id WAA18935 for <info-sr@cs.arizona.edu>; Wed, 15 Nov 1995 22:33:49 -0500
Received: by ns.cencom.net (5.x/SMI-SVR4)
	id AA29543; Wed, 15 Nov 1995 21:32:56 -0600
Date: Wed, 15 Nov 1995 21:32:55 -0600 (CST)
From: Larry Schweizer DIALUP <lschwe@ns.cencom.net>
Subject: SR install
To: info-sr@cs.arizona.edu
Message-Id: <Pine.3.89.9511152145.A28532-0100000@ns.cencom.net>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Just wanted to say thanks to Ron Olsson and Jose Antonio Perez 
Castellanos for their helpful responses.  Yes, I forgot to run 'make 
install'!  A big DUH for me.  However, I did successfully install 
gcc-2.7.0 tonight, and Linux-1.2.13 last night, so I'm on a roll!
Thanks again!

Yours truly,
Larry Schweizer
lschwe@ns.cencom.net

From cliff@convx1.ccit.arizona.edu  Mon Dec 11 14:51:19 1995
Received: from optima.CS.Arizona.EDU by cheltenham.CS.Arizona.EDU; Mon, 11 Dec 1995 14:52:08 MST
Received: from Arizona.EDU (Penny.Telcom.Arizona.EDU) by optima.cs.arizona.edu (5.65c/15) via SMTP
	id AA11674; Mon, 11 Dec 1995 14:52:08 MST
Return-Path: cliff@Arizona.EDU
Received: from convx1.ccit.arizona.edu by Arizona.EDU (PMDF V5.0-5 #2381)
 id <01HYOO67K5HS95MUA5@Arizona.EDU> for info-sr@cs.arizona.edu; Mon,
 11 Dec 1995 14:52:05 -0700 (MST)
Received: from localhost by convx1.ccit.arizona.edu; Mon,
 11 Dec 1995 14:51:19 -0700
Date: Mon, 11 Dec 1995 14:51:19 -0700
From: cliff@convx1.ccit.arizona.edu (Clifford Hathaway)
Subject: test from convx1 through che
To: info-sr@cs.arizona.edu
Message-Id: <199512112151.OAA21287@convx1.ccit.arizona.edu>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Transfer-Encoding: 7BIT


From cliff  Mon Dec 11 15:07:01 1995
Date: Mon, 11 Dec 1995 15:07:01 MST
From: "Cliff Hathaway" <cliff>
Message-Id: <199512112207.AA02435@cheltenham.cs.arizona.edu>
Received: by cheltenham.cs.arizona.edu; Mon, 11 Dec 1995 15:07:01 MST
To: info-sr
Subject: test from che through che



From gmt  Fri Dec 15 16:35:51 1995
Received: from hawk.CS.Arizona.EDU by cheltenham.CS.Arizona.EDU; Fri, 15 Dec 1995 16:35:52 MST
Received: by hawk.CS.Arizona.EDU; (5.65/1.1.8.2/08Nov94-0446PM)
	id AA10886; Fri, 15 Dec 1995 16:35:51 -0700
Date: Fri, 15 Dec 1995 16:35:51 -0700
From: Gregg Townsend <gmt>
Message-Id: <9512152335.AA10886@hawk.CS.Arizona.EDU>
To: info-sr
Subject: Maintenance release of SR

SR version 2.3.1 is now available for FTP from the /sr directory
on ftp.cs.arizona.edu.

This version contains an accumulation of portability fixes, notably
for AIX 4.1, Linux, and FreeBSD.  If you had trouble building SR before,
this release may help.

The number of bug fixes is small.  Unless you have a specific reason,
there's no need to upgrade a copy of SR that's currently working.

   Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W
   Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077

