FAQ Spring 2020 (updated as needed)


Grace setup

The setup command was covered by the TAs and is described in the Introduction to Unix document (linked from resources page). Successful setup should result in the following changes.


Problems submitting from Grace

Ensure you have the appropriate .submit file in the directory in which you execute submit. Do cat .submit and check displayed info (semester, course, etc).

Ensure you are using the appropriate submit command. Do "which submit" in your shell. It should respond with /afs/glue/class/spring2020/cmsc/216/0201/public/bin/submit. If not, your ~/.path file may not be set up properly.

Ensure that your ~/.cshrc.mine contains the "tap -q java" stuff.


Garbage/missing output on screen

If your program, say xyz, (erroneously) generates output with a non-printable character, that character will not show up on the screen or may show up as garbage. To check if this is the case, redirect the output to a file, eg, "xyz > xx". Then "cat -v xx" to see any non-printing characters (do "man cat" or "cat --help"). Or open xx in emacs.


Compiles on Grace but not on submit server

If your program compiles on Grace (or your machine) but not on the submit server, then most likely you have misnamed a submitted file (check the project description) or you are executing gcc without the needed options (do "alias gcc").


Executes on Grace but not on submit server

If your program executes on grace (or your machine) but fails to execute or executes differently on the submit server, it is almost always because your program is using the value in an uninitialized memory location.

On Grace, when the OS starts a process, parts of the memory area of the process is often initialized to zeros. Whereas on the submit server, the memory area of the process is initialized to arbitrary numbers. So in the code below, if x is allocated memory in a previously unused part of the stack, the if test will usually succeed in Grace and almost always fail in the submit server.

Use valgrind with the --track-origins=yes.

Web Accessibility