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.
216
that points to your 216 workspace directory.
So "cd ~/216" would take you there.
216public
to the 216 public directory,
where files are made available for you to copy.
So "cd ~/216public" would take you there.
~/.path
file, the line:setenv PATH
"/afs/glue/class/spring2020/cmsc/216/0201/public/bin:${PATH}"
#216FLAG
submit
and looks elsewhere only if it was not found there.
If this were not there, you would have to type,
eg, "~/216public/bin/submit".
~/.cshrc.mine
file, the following
(needed for the submit command to work):
tap -q java #216FLAG if ("$OSTYPE" == "linux") then limit maxproc 20 endif
~/.aliases
file, the line:alias gcc "gcc -ansi -Wall -g -O0 -Wwrite-strings -Wshadow -pedantic-errors -fstack-protector-all -Wextra"
.cshrc.mine
,
.path
, .aliases
, etc are the ones described above.
In particular, 216-related entries from earlier semesters can stop
the current 216 entries from working.
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.
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.
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"
).
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.
int x;
if (x == 0)
...
--track-origins=yes
.