====== Tech Ref ====== ===== Electronic Submission ===== You should make a cs377 directory under your home directory on your CS account, and protect it: $ cd $ mkdir cs377 $ chmod 700 cs377 Your programming assignments should each be saved in a subdirectory named cs377. This makes it easy to use the submit377 script for each individual assignment, as well as keeps your assignments organized. :-) $ cd cs377 $ mkdir prog1 $ cd prog1 ~~~ repeat: edit, compile, run ~~~ until: your program is ready to submit $ cd .. $ submit377 prog1 ===== Concurrent Languages ===== Here is a technical reference for setting up language environments on spaceserver, then compiling and running your programs. Be sure you have a home bin directory, and if you don't, create one via: $ cd $ mkdir bin Next, use the following commands to copy the scripts you'll need to use concurrent programming languages on spaceserver: $ cp ~mlsmith/bin/set-upc-env ./ /* $ cp ~mlsmith/bin/set-linda-env ./ $ cp ~mlsmith/bin/set-linda-tcp ./ $ cp ~mlsmith/bin/set-cds ./ */ ==== kroc ==== To set up kroc's environment: $ source /usr/local/bin/kroc-setup.sh To compile and run a kroc (occam) program: $ kroc myprog.occ $ ./myprog To compile a program that uses the course library: (like the ones we'll be compiling in class) $ kroc myproc.occ -lcourse ==== UPC ==== To set up UPC's environment: $ source ~/bin/set-upc-env To compile and run a UPC program: $ upcc -T n myprog.upc $ upcrun myprog /* ==== Linda ==== To set up Linda's environment: Upon login: $ source ~/bin/set-linda-env For CDS: $ source ~/bin/set-cds For TCP: $ source ~/bin/set-linda-tcp To check which: ./echo-linda-env To copy the example programs directory on spaceserver to your home course directory: $ cp -R /usr/sca/linda8.1/common/cl-examples/ ~/cs377/cl-examples To compile (for CDS or LINDA_TCP): $ clc -o foo foo.cl To compile for use with Tuplescope (must be under CDS): $ clc -o foo -linda tuple_scope foo.cl To run your program under CDS (with or without Tuplescope): $ ./foo (must run from an xterm to use Tuplescope) To run your program under LINDA_TCP: $ ntsnet -mp 3 -n 8 foo *