We are using shared directories on GL's Andrew File System (AFS) to submit the Haskell programs in your homework assignments. In AFS, 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 Haskell programs 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 Prof. Richard Chang chang@umbc.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 user name. You should replace smurf19 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
/afs/umbc.edu/users/c/h/chang/pub/cs331/
under your user name. So, if your user name is smurf19
your shared directory is
/afs/umbc.edu/users/c/h/chang/pub/cs331/smurf19
.
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 cs331hw to your home directory. (If you already have a directory called cs331hw, you can rename it.)
ln -s /afs/umbc.edu/users/c/h/chang/pub/cs331/smurf19 ~/cs331hwHenceforth, you can refer to your shared directory as ~/cs331hw.
Explore your shared directory. You will notice that there are already subdirectories in your shared directory.
linux2% cd ~/cs331hw/ linux2% ls 00Gradesheets hw03-1Fri hw05-4Mon hw08-1Fri hw10-4Mon exception hw03-2Sat hw05-5Tue hw08-2Sat hw10-5Tue hw01 hw03-3Sun hw06 hw08-3Sun hw11 hw01-1Fri hw03-4Mon hw06-1Fri hw08-4Mon hw11-1Fri hw01-2Sat hw03-5Tue hw06-2Sat hw08-5Tue hw11-2Sat hw01-3Sun hw04 hw06-3Sun hw09 hw11-3Sun hw01-4Mon hw04-1Fri hw06-4Mon hw09-1Fri hw11-4Mon hw01-5Tue hw04-2Sat hw06-5Tue hw09-2Sat hw11-5Tue hw02 hw04-3Sun hw07 hw09-3Sun hw12 hw02-1Fri hw04-4Mon hw07-1Fri hw09-4Mon hw12-1Fri hw02-2Sat hw04-5Tue hw07-2Sat hw09-5Tue hw12-2Sat hw02-3Sun hw05 hw07-3Sun hw10 hw12-3Sun hw02-4Mon hw05-1Fri hw07-4Mon hw10-1Fri hw12-4Mon hw02-5Tue hw05-2Sat hw07-5Tue hw10-2Sat hw12-5Tue hw03 hw05-3Sun hw08 hw10-3SunThe idea is quite simple. For example, to submit your code for Homework 3, simply copy your files from Homework 3 into the hw03 subdirectory.
You can check that your files compile and execute correctly in this directory, but please remove all executable, .o and .hi files after you are done testing. Also, files in these directories may be removed and/or altered, without advance notice. These are submission directories, not a place to keep the only copy of your files.
Continuing with our example, after 11:59pm on Thursday, you will no longer be able to write into the hw03 subdirectory. You will need copy late submissions into one of the late subdirectories:
hw03-1Fri hw03-2Sat hw03-3Sun hw03-4Mon hw03-5TueAs each day passes, permission to write into the corresponding directories will be rescinded. For example, past 11:59pm on Friday, you will no longer be able to write into the hw03-1Fri subdirectory. You would have to copy your files to hw03-2Sat instead.
Do consult the late submission policy in the Course Description for the late penalty for each day. Recall, that the deadline for Tuesday is 10am not 11:59pm. Also, the late penalty for Tuesday submission is 100%, so you will receive credit for a Tuesday submission only if you have a late pass available.
If you have files submitted to more than one of the directories for a particular homework, 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 homework for
grading.
At the homework level (e.g., ~/cs331hw/hw03/
)
you have all of the AFS permissions to read and write.
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 homework directory. Also, make sure that the files reside in the top level of the homework directory and not in a subdirectory. For example, a listing of the directory for hw03 might look like:
linux2% ls ~/cs331hw/hw03 Postfix.hsand NOT LIKE
linux2% ls ~/cs331hw/hw03 myhw3/
Some Tips:
For example, the following variation of scp will give you a permission error:
scp -r myhw3 smurf19@gl.umbc.edu:cs331hw/ <-- BAD
This next command creates a subdirectory ~/cs331hw/hw03/myhw3/ on GL which is NOT WHAT YOU WANT.
scp -r myhw3 smurf19@gl.umbc.edu:cs331hw/hw03/ <-- BAD
Instead, use:
scp -r myhw3/* smurf19@gl.umbc.edu:cs331hw/hw03/
rsync -rv --delete myhw3/ smurf19@gl.umbc.edu:cs331hw/hw03/
Note that the trailing / are needed. Here, the -r option asks rsync to look recursively in myhw3 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, then the rsync command is just:
rsync -rv --delete myhw3/ ~/cs331hw/hw03/
You should test that your code compiles and runs on GL using the Haskell compiler on GL.
Thus, 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.