There are restrictions on the use of the Lab facilities:
Note: I strongly encourage you to subscribe with your Stony Brook CS account. This will ensure that mail will arrive to you more quickly, and that you are less likely to run out of your mail quota than if you were using some other ISP's mail service. If I post an important message to the class list, and you don't get it because your mail quota has exceeded, I may get a bounce back saying so, but I will have no way to communicate back with you. It is therefore your responsibility to ensure that you can always read the class mailing list and to stay current with what I post there.
Please do not set your list subscription mode to Digest because digests can take several days to get emailed to you.
| No. | Host Name | Running Operating System |
| 1 | a-centos56.cs.stonybrook.edu | CentOS 5.6 Linux (i386) |
| 2 | b-centos56.cs.stonybrook.edu | CentOS 5.6 Linux (x86_64) |
| 3 | a-ubuntu104.cs.stonybrook.edu | Ubuntu 10.04.2 Linux Server (i386) |
| 4 | b-ubuntu104.cs.stonybrook.edu | Ubuntu 10.04.2 Linux Server (x86_64) |
| 5 | a-freebs82.cs.stonybrook.edu | FreeBSD 8.2 (i386) |
| 6 | b-freebsd82.cs.stonybrook.edu | FreeBSD 8.2 (x86_64) |
| 7 | a-oindiana148.cs.stonybrook.edu | OpenIndiana "Solaris" (build 148, i386) |
| 8 | b-oindiana148.cs.stonybrook.edu | OpenIndiana "Solaris" (build 148, x86_64) |
| 9 | a-osx411.cs.stonybrook.edu | Mac OS X (PPC) |
| 10 | a-solaris8.cs.stonybrook.edu | Sun Solaris 8 (SPARC) |
To login to one of these machines (say, a-centos56):
ssh -p 130 user@a-centos56.cs.stonybrook.eduWhere user is your username for the account that was given to you on the CS Active Directory (AD) server (your CS AD username is most likely the same as your SBU NetID, but using a different password). If you are using the same username, you can omit the "user@" part. Note you have to use port 130 not the default port 22.
Once you get into your one of the work machines machine, you can start editing source files and compiling as needed. Your home directory is shared using NFS across all of the aforementioned machines.
Do not wait until the last minute before submission time to figure out how to submit your homework assignment. Learn these procedures well ahead of time, experiment with them, and try and try again. You can submit your assignment as many times as you'd like, but we will consider the last set of files you've submitted as the ones you want us to grade. Don't be late because we won't accept late submission excuses such as "CVS didn't work for me."
To simplify matters for you we've set up CVS repositories for everyone.
Warning: protect your homework from accidental loss! All of the files you have in your home directories are not being backed-up. That means that if you remove your files my mistake (happens a lot, often right before a due date), you will lose all of your data and won't have anything to submit. Using CVS you can make a copy of your files and more: record each version of your files as you change them. It is your responsibility to use CVS often. The graders will not accept excuses such as "I just removed all my files and can't submit my homework."
ssh -p 130 user@a-centos56.cs.stonybrook.eduwhere user is your CS AD login name.
#!/bin/sh exec ssh -p 130 "$@"Then run the following command to ensure the file, a shell script, has the right execution mode:
chmod 500 myssh
cd
export CVS_RSH="${HOME}/myssh"
cvs -d user@scm.cs.stonybrook.edu:/home/SCM/cvsroot checkout cse376/user
When this step is done, you will have four subdirectories created:
cse376/user/hw1, cse376/user/hw2, cse376/user/hw3, and
cse376/user/hw4: one for each homework assignment.
Note again that this checkout procedure must be done only once: repeating it
can confuse CVS into using recursive repositories, and your homework could
be lost.
cd ~/hw1-template cp Makefile README *.c ~/cse376/user/hw1/
cd ~/cse376/user/hw1/ cvs add Makefile README *.cIf you have other files to include in your submission, you should "cvs add" them as well. But, do not submit or add/commit binaries or other object files: those can be produced easily by running "make."
cd ~/cse376/user/hw1/ mkdir test cvs add testThe last command is crucial to tell CVS that "test" should now be version controlled. After that you can create new new files in test/ and "cvs add" them.
cvs commit -m"message"Replace message with a descriptive message that will help you and us know what was the purpose of your commit. For example:
cvs commit -m"saving initial hw1 files"At this point you have committed the first version of your files. This committal is in fact a submission method: we get an email notification each time you commit files, so we know which files were committed and when.
Now you can go ahead and edit your sources, add new ones, compile your code, etc. In fact, from this point on, you should not continue to work in your older ~/hw1-template/ directory. Instead, work in the ~/cse376/user/hw1/ directory, where you can add new files and safely commit them to CVS for backup and submission purposes.
cvs commit -m"add support for encryption"It's perfectly OK for you to commit (read: submit) your files as many times as you'd like. If you submit many times, we will grade the very last version of your files which you've submitted.
cvs -n update -dAny file listed as a result of the above command, and which has a "?" symbol in front of it, is a file which the CVS server doesn't know about (meaning it does not get committed by default). You may see object files and other temporary editor files listed as unknown. That's OK, because they are not supposed to be committed anyway. But any other file, especially a source file, must be "cvs add"ed and committed.
Second, you can check out a second, temporary version of your own committed files and verify that they compile and run as you expect them to:
mkdir ~/tmp
cd ~/tmp
export CVS_RSH="${HOME}/myssh"
cvs -d user@scm.cs.stonybrook.edu:/home/SCM/cvsroot checkout cse376/user/hw1
cd ~/tmp/cse376/user/hw1
make
If the above "make" command succeeds, you know for example that the code
you've committed indeed compiles. You may now test that code inside VMware
to ensure that it works (just because it compiles doesn't mean that it
works).
cd ~ rm -fr ~/tmp/cse376/user/hw1
cd ~/cse376/user/hw1 rm -f READMEWell, you can easily restore that file from your committed files as follows:
cvs update -dCVS will check back out any files that were committed into the CVS repository but are now no longer in your checked out copy. (If you're going to try this, be careful not to remove a file that you haven't really committed, or it'll be lost forever.)
cvs status foo.cYou can get a detailed history using the log command:
cvs log foo.cThe latter will show you your log messages and version numbers of foo.c. You could then, for example, check what changes you've made between version 1.2 and 1.3:
cvs diff -u -r1.2 -r1.3 foo.c