The EECS 381 Submission Program

In order to submit projects in EECS 381, you must use Unix (or Linux; Unix is used here as a synonym for Linux). You do not have to develop your programs with Unix (in fact, we encourage you to use one of the IDEs), but you do have to use Unix to submit your project.

Setting up your CAEN account to use the EECS 381 submission program

In order to use the submission program, you must tell your shell where to find it. You only need to do this once. The following instructions have been updated Sept 21, 2013 to reflect CAEN's move to the "bash" shell as being their standard Unix/Linux environment.

  1. Login to a CAEN Unix machine

  2. Open (or create) your .bashrc file in a text editor
    Use pico, vi, emacs, nedit, or your favorite text editor. E.g. type "pico ~/.bashrc" at the shell prompt (machinename%). Your .bashrc file contains commands that are run every time you start a new shell.
  3. Add the EECS 381 afs bin directory to your path
    Copy this line to the end of your .bashrc file:
    export PATH=/afs/$PATH

    This command tells your shell where to look to find the submit381 program.
  4. Similarly, create or edit your .bash_profile to arrange to use your .bashrc when you log in.
    Copy this line to the end of your .bash_profile file:
    if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

    Now when you login, the bash shell will run .bash_profile, which in turn will run the commands in .bashrc, updating your path.
  5. Logout, then login again
    Your new .bash_profile file will run when you login. You can check that it worked by
    echo $PATH

    You should see the new eecs381 part of the path at the begining of the output.

You can find more information about using the bash startup files at:

Note: If your shell is not bash, you will have to make changes to your shell initialization files. If you know how to change your shell, you can probably figure out how to make these changes yourself.

Using the EECS 381 submission program

Follow this procedure every time you turn in a project.

  1. Copy your project source (.h, .c or .cpp) file(s) to your Unix (AFS) directory
    You can use SFTP, SCP, an upload/download utility, or access AFS directly. Your source file(s) must have the exact filenames that are specified, with the same case. Depending on your upload method, you may need to ensure that your files are converted to Unix line-ending format from whatever your development platform format is.
  2. Login to a CAEN Unix machine

  3. Make sure your source files are in your current directory and have the specified names

  4. Verify that your program compiles and runs correctly in a Unix environment
    Why waste a submission if you could have found out that your program had a compilation error before you submitted it? It is also a good idea to run your program using the sample inputs and outputs - this is a good way to detect the common error of relying on undefined platform-specific behavior.
  5. Run the submit381 program
    At the shell prompt, type
    submit381 <project-number> <source-file-names>

    submit381 1 P1.cpp

    submit381 0 hello.cpp hello.h

    submit381 0 *.h, *.c

    Important:You can use shell wildcards to make typing the submit command easier and less error-prone - a file won't get left out. Just be sure your current directory has only the files that you plan to submit, because the wildcard will send all matching files in your current directory:
    submit381 4 *.cpp *.h

    Remember that Unix is case-sensitive so "hello.cpp" != "Hello.cpp".
Note: You can type "submit381" without arguments to see a reminder of how to use it.

The EECS 381 submission program also has a query feature. This allows you to get your total score and bonus level from your last submission if you haven't yet submitted today, but the query does not count as a submission. Only the total score is provided, not the test-by-test results.

Here's the concept: The autograder allows you to submit your code as many times per day as you want, but only gives you feedback on the first two. Say you are finishing early, and want the bonus. You submit your code twice, fixing bugs after getting each feedback, and then submit your code one more time before midnight. If your last fix was good, you have a good score and the early submission bonus. But what if your last fix broke your program and actually got a lower score? But if you submit again tomorrow to get the feedback, you will lose the early bonus!

What to do? Tomorrow (or after midnight today) you can query the autograder to find out if your total score is what you expected, or if some disaster happened, whereupon you will have to fix and resubmit your code - and you will still have two submissions with feedback. The syntax for the query is:

The autograder will email your total score and bonus proportion for the last submission received, if you have not previously submitted today.