We are using shared directories on GL's Andrew File System (AFS) for project submission this semester. Using AFS's permission system, we can specify that certain directories are only accessible to an individual student and the instructors and teaching assistants. These directories are the "shared directories". You will submit your projects simply by copying your files into these directories.
Shared directories for each student have already been prepared. (If you added this class late, please contact the course coordinator Mr. Lupoli @ slupoli at cs dot umbc diot edu) The first step is to make a symbolic link to your shared directories in your home directory on GL. In the examples that follow, we will use smurf19 as the example username. You should replace this with your own user name.
Step 1: Log into GL (using Putty, TeraTerm, Terminal, ...). If you are unfamiliar with the GL system, the lecture notes from CMSC 121 Introduction to Unix will walk you through the steps.
Step 2: In the Unix shell, make a symbolic link to your shared
directory in your home directory.
Your shared directory resides in
under your username. So, if your username is smurf19
your shared directory is
A symbolic link will allow you to refer to your shared directory in a more convenient form. The following Unix command will add a link called cs341proj to your home directory. (If you already have a directory called cs341proj, you should rename it.)
ln -s /afs/umbc.edu/users/s/l/slupoli/pub/cs341/smurf19 ~/cs341projHenceforth, you can refer to your shared directory as ~/cs341proj.
Shared Directory Layout
Explore your shared directory. You will notice that there are already subdirectories in your shared directory.
linux2% cd ~/cs341proj/ linux2% ls ~/cs341proj/ exception proj0-late3 proj1-late3 proj2-late3 proj3-late3 proj4-late3 proj5-late3 proj0 proj1 proj2 proj3 proj4 proj5 proj0-late1 proj1-late1 proj2-late1 proj3-late1 proj4-late1 proj5-late1 proj0-late2 proj1-late2 proj2-late2 proj3-late2 proj4-late2 proj5-late2The idea is quite simple. For example, to submit your code for Project 3, simply copy all your files from Project 3 into the proj3 subdirectory. After the due date for Project 3, you will no longer be able to write into the proj3 subdirectory. You would need copy your files into proj3-late1 in order to submit Project 3 one day late. The second day after the due date, you would have to submit to proj3-late2 because you will not be able to write into either proj3 or proj3-late1. Four days after the due date for Project 3, you will not be able write into any of the Project 3 directories (as per the Late Submission Policy).
If you have files submitted to more than one of the directories for a particular project, we will assume that you want to have the files in the most late directory graded. The appropriate late penalty will then be applied.
You might notice that you do not have write permission at the top
level of your shared directory. Thus, you cannot create Additional
subdirectories in your shared directory or rename the subdirectories.
These actions would break the scripts used to collect your projects for
grading. At the project level (e.g.,
you have all of the AFS permissions to read and write.
Submitting Your Files
If you already know how to copy files to the GL system, then whatever you are using now is fine. For example, you might be using scp on a Linux or MacOS and WinSCP on a Windows machine. Just make sure that you are copying the files into the correct project directory. Also, make sure that the files reside in the top level of the project directory and not in a subdirectory. For example, a listing of the directory for Project 3 should look like:
linux2% ls ~/cs341proj/proj3 build.xml src/and NOT LIKE
linux2% ls ~/cs341proj/proj3 myproj3/
- If you are using scp on Linux or MacOS and your files
are in a myproj3 directory, you cannot overwrite
~/cs341proj/proj3 with myproj3 since you do not have
those permissions. Instead, you must copy all of the files in
myproj3 into ~/cs341proj/proj3.
For example, the following variation of scp will give you a permission error:
scp -r myproj3 firstname.lastname@example.org:cs341proj/ <-- BAD
This next command creates a subdirectory ~/cs341proj/proj3/myproj3/ on GL which is NOT WHAT YOU WANT.
scp -r myproj3 email@example.com:cs341proj/proj3/ <-- BAD
scp -r myproj3/* firstname.lastname@example.org:cs341proj/proj3/
- Consider using rsync instead of scp,
especially if you want to submit your files several times over
the duration of the project (which is actually a good idea).
For example, the following rysnc command will copy
new files in myproj3 to the proj3 directory
on GL. It will also delete files that were copied over previously, but
have been removed from myproj3.
rsync -rv --delete myproj3/ email@example.com:cs341proj/proj3/
Note that the trailing / are needed. Here, the -r option asks rsync to look recursively in myproj3 and the -v option asks rsync to be verbose so you can see which files are copied. The --delete option tells rsync to delete files in the remote host that are no longer on the local host.
If all your files are already on GL (perhaps you are using the UMBC Linux machines in the labs), then the rsync command is just:
rsync -rv --delete myproj3/ ~/cs341proj/proj3/
Testing Your Submission
You are encouraged to test your program after copying your files to a shared directory. For example, this sequence of Unix commands would verify that your files submitted for Project 3 were submitted to the right place and that the graders will be able to compile and run your program:
cd ~/cs341proj/proj3 make make runYou should clean up your submission after this test:
make cleanEven though you can read and write in your shared directories before the due date, you should NOT develop your programs in the shared directories. Furthermore, the files in the shared directories should NOT be your only copy of the programs. You should have a copy of your programs on your own computer or in a separate location in your GL account.