6.170 / Fall 2000 / Homework Validation and Turnin

Handout H6

Contents:


Overview

Most of your 6.170 assignments will be submitted electronically using the turnin6170 script. This script stores your solution as a .tar.gz file, which the staff will collect when the problem set is due (typically every Friday at noon). We strongly encourage you to submit your problem set well before the deadline. We also provide a validate6170 script which performs basic sanity checks on your problem set solutions and reports any errors or deficiencies. To run the turnin script, type

athena% turnin6170 psN
To run the validation script, type
athena% validate6170 psN
In each case, specify the name of the problem set that you are turning in instead of psN. You may run each script as often as you like (up to the time the problem set is due, including any slack weekend you are using).

Your TA may also ask you to turn in a hardcopy, in order to save him or her the effort of printing out 20 separate solutions.


Manifest file

Important: We will only grade the files you list in your Manifest file.

The scripts determine which files to submit by examining file ~/6.170/psN/Manifest, a simple text file that contains one filename per line. You will generally be given a starter Manifest file for each problem set. You may edit it to add additional files to be turned in; in that case, you should also mention the file's purpose elsewhere in your submission, so that your TA understands why it is included and what role it plays in your assignment. Do not turn in compiled files such as .class files; we will generate those from your submitted .java files. Formats besides plaintext (ASCII) and PDF (good for object models and the like) are not acceptable unless you make prior arrangements with your TA.

We specify a filename for non-code problems -- usually problemN.txt, for appropriate value of N. You must turn in that file (by including its name in the Manifest file) when you run turnin6170, though your answer to the problem might appear in that file, in another file, or be submitted in hardcopy. Your Manifest file should always list problemN.txt, since you will always turn in that file.

Your solution to a problem may consist of multiple files (you'll need to list all of them in the Manifest file, and list them and explain what is contained in each in your problemN.txt file), but for the sake of your TA, please keep the number of files as small as possible.


Code must run on Athena

You may use whatever Java environment you like when solving problem sets. (The Lab Assistants may not be familiar with non-Athena Java environments, but can always help you with Java language issues.) However, you are responsible for making your programs work on Athena. Java is a relatively portable language, so making your code work on Athena should not be onerous. However, give yourself time to run some tests (which you have presumably already written as part of solving the problem set) before submitting your work. The most common problems when copying programs to Athena will have to do with file names. For instance, you might have used the wrong directory structure, or have worked with a file system with non-case-sensitive filenames.

In order to make testing and grading your problem sets easier for us, and in order to provide you with tools for checking for certain common blunders before you submit your work, we may specify particular file names and directory structures for parts of your code.

Do not implement your own Java native methods.


Validate

The validate6170 script will perform sanity checks on your solution. However, the script is not guaranteed to detect every error in your handin, or in your code. In other words, even if you pass all the tests, your code may still be buggy. Nevertheless, by running the script, you can make sure that your assignment does not suffer from a few of the most common handin errors.

To run the validation script, type

athena% validate6170 psN
Specify the name of the problem set that you are validating instead of psN.

If validation passes, the output will look like this:

athena% validate6170 ps1
validate6170: Validating ps1, please be patient...
validate6170: Success -- your solution passed validation.

Messages from validate

The script may give you the following error messages:

validate6170: Command not found

You have not added the 6.170 locker. Type "add 6.170"

python2.0 not found

The script is written mainly in the Python programming language. It requires Python 2.0, which is installed in the python locker for the following systems: i386_linux2, i386_linux22, i386_linux3, i386_nbsd1, sgi_62, sgi_65, sun4x_56, sun4x_57. Try running the script on one of those machine types. (To find out what system you're currently running on, type "echo $ATHENA_SYS").

I don't know about any project called [name]

The script could not find a configuration file with information about the project you named. Remember that you should specify the project name in lowercase, like ps1.

The version of 'java' in your path is [A.B.C]. We require that you use [X,Y,Z].

The version of java in your path is incorrect. Refer to the athena handout to see how to put java in your path, or try "add -f java_vX.Y.Z" where X, Y and Z were given by the output of validate.

Required directory [path] does not exist

You are required to have a directory named [path], but no such directory was found. Perhaps you have mis-named one of your code directories.

Directory [path] is not visible to system:6.170

In order to process your code, the staff must have the AFS permissions necessary to read your handin directories. The script has detected that the directory [path] was not readable by the proper staff group. To give the staff group the necessary permissions, type:
fs sa [path] system:6.170 read
Note: This command is not recursive; if there are any subdirectories under [path], you will need to give the staff read permission on those directories as well.

Source file [filename] not found

The problem set requires you to have the class whose code would be stored in [file], but no such file could be found. Perhaps you have mis-named it, or put it in the wrong location.

Class file [filename] not found

The problem set requires you to have the class whose compiled bytecode would be stored in [file], but no such file could be found. Perhaps you have mis-named it, or put it in the wrong location.

Couldn't compile [classname] ([filename])

The script tried to invoke javac on filename, but was unsuccessful. This could indicate a bug in your code, or mis-placed files. See the output of javac for more information.

[classname] not runnable: ...

The problem set requires that the class named by classname be runnable, but it was not. Remember that in order to be runnable, a class must be public, and have a method named main, whose signature is exactly public static void main(String[])

Manifest file does not exist (No such file or directory: [file])

Your Manifest files does not exist, or is not readable. Make sure that the manifest exists at the expected location (given by [file]).

Manifest cannot contain .class files ([class])

Do not put .class files in your Manifest; the staff will compile your code on their own.

Manifest has non-relative paths (File [file] is not relative to [path])

All files listed in the Manifest must be relative filenames. That is, you should say Foo.java but not /mit/USER/6.170/psN/Foo.java

File listed in manifest does not exist (File [file] does not exist)

A file ([file]) listed in your Manifest file could not be found. Perhaps check your spelling.

Manifest does not contain a required entry (Mainfest does not list required entry [file])

We require your Manifest file to contain certain entries. Add the given entry to your Manifest file

Turnin

The turnin6170 script collects your solution and stores it as a .tar.gz file. The file will be named ~/6.170/psN-turnin.tar.gz. Do not delete this file. The staff will collect the turnin file when the problem set is due (typically every Friday at noon).

We strongly recommend that you run validate6170 before you run turnin6170. This will help ensure that your solution is in working order and that we will be able to grade it.

We strongly encourage you to submit your problem set well before the deadline. At the last minute, you do not want to become the victim of slow networks, power surges, clock skew, or problems with the formatting of your files, all of which could cause you to submit your assignment late and thus receive no credit. The 6.170 staff will extend the deadline for computer-related problems only when the problems affect the functioning of our submission software.

To run the turnin script, type

athena% turnin6170 psN
Specify the name of the problem set that you are turning in instead of psN.

If turnin is successful, the output will look like this:

athena% turnin6170 ps1
turnin6170: Your solution has been stored in /mit/USER/6.170/ps1-turnin.tar.gz
turnin6170: You may rerun turnin6170 up until the homework is due

Messages from turnin

The script may give you the following error conditions:

turnin6170: Command not found

You have not added the 6.170 locker. Type "add 6.170"

python2.0 not found

The script is written mainly in the Python programming language. It requires Python 2.0, which is installed in the python locker for the following systems: sgi_62, sgi_65, sun4x_56, sun4x_57. Try running the script on one of those machine types. (To find out what system you're currently running on, do "printenv ATHENA_SYS").

I don't know about any project called [name]

The script could not find a configuration file with information about the project you named. Remember that you should specify the project name in lowercase, like ps1.

In case of trouble

If you believe you have found a bug in turnin6170 or validate6170, please send email to mistere@mit.edu with all of the following:
  1. Your username
  2. A listing of your handin directory (type ls -R ~/6.170)
  3. The exact command which you ran
  4. The exact output which you received from the script
  5. A short explanation of why this output is incorrect

Logging

We may collect statistics on usage of validate6170 and turnin6170. Any such statistics will have no effect on your grade and will not be publicly released in un-anonymized form.


Back to the Handouts page.
For problems or questions regarding this page, contact: 6.170-webmaster@mit.edu.