The goal of this assignment is to practice concurrent and distributed programming using the SALSA programming language.
You are to analyze three-dimensional data from the Sloan Digital Sky Survey, in particular, stars in our MilkyWay galaxy, for future human space colonization. Your program needs to compute the following:
For each computation, output multiple answers if there are ties. For example, when computing closest neighbours, if there are multiple pairs with the same minimum pairwise distance, output both pairs.
More information on Milky Way visualization can be found in the associated MilkyWay@Home forum.
You are given a stars text file
with the first line giving the total number of stars in the file
followed by one line per star representing each star's three dimensions
X Y Z. Please remove duplicate entries in your program. Your output should look as follows:
d1 // minimal pairwise distance s1 s2 ... d2 // maximal pairwise distance s1 s2 s3 s2 ... d3 // minimum maximal distance s3 s1 ... d4 // maximum minimal distance s4 s5 ... d5 // minimal average distance s1 ...where
d_idenotes a distance and
s_idenotes a star, which is represented as (x,y,z), corresponding to the x, y, and z coordinates of the star.
Write an actor-based solution to the space colonization problem.
salsaare UNIX aliases or Windows batch scripts that run
javacwith the expected arguments: See .cshrc for UNIX, and salsac.bat salsa.bat for Windows.
[host0:dir0]$ wwcns [port number 0] [host1:dir1]$ wwctheater [port number 1] [host2:dir2]$ wwctheater [port number 2] ...where
wwctheaterare UNIX aliases or Windows batch scripts: See .cshrc for UNIX, and wwcns.bat wwctheater.bat for Windows. Make sure that the theaters are run where the actor behavior code is available, that is, the
pa2directory should be visible in directories:
host2:dir2. Then, run the distributed program as mentioned above.
Spacebehavior should be in a relative path
pa2/Space.salsa, and should start with the line
m1(...);m2(...);does not imply
nis processed after m is executed, but not necessarily after messages sent inside
mare executed. For example, if inside
m2are sent, in general,
ncould happen before
Due Date: April 12th, 6:00PM
Grading: The assignment will be graded mostly on correctness, but code clarity / readability will also be a factor (comment, comment, comment!).
Submission Requirements: Please submit a ZIP file with your code, including a README file. In the README file, place the names of each group member. Your README file should also have a list of specific features / bugs in your solution. Your ZIP file should be named with your LMS user name(s) as the filename, either userid1.zip or userid1_userid2.zip. Only submit one assignment per pair via LMS.