Assignment 1 Information

Submission

To submit assignment 1, you will create a gzipped tar archive that contains all the source code for this project and upload this file to our web server.

To create the gzipped tar archive, do the following:

$ cd assign1
$ gmake clean
$ cd ..
$ tar cfz assign1.tgz assign1

The "gmake clean" command will delete your object files and executables. We don't want those --- we will compile your code ourselves. There is a 100K limit on the size of the archive file that you can upload. This should be plenty for just your source code and any examples that you created to test your program.

Remember that your code must compile and run on the CS Suns. In order to test this, you can do the following:

$ ls assign1.tgz
assign1.tgz
$ mkdir tmp
$ cd tmp
$ tar xfz ../assign1.tgz
$ cd assign1
$ gmake
$ ./assign1 Problem1.txt

After you have verified that your archive file will properly unpack and your code compiles and runs in the CS Sun environment, you can upload it to the web server.

The number of uploads is unlimited, but we will only look at the last submission.

Getting started

All the required software is already installed on the CS department Suns. If you want to work on your own computer, the software is freely available. (It will work under Linux, probably work under FreeBSD, and theoretically work under windows; I'm not sure about Mac OS.)

Getting the required libraries

Getting and compiling the support code

Here is the support code:

In order to compile this software, you must have the following environment variables set. Here is what you should add to your .bashrc file if you are using the CS department Suns (and are using bash as your shell):

export CGAL_MAKEFILE=/projects/cgal/CGAL-3.0/make/makefile_sparc_SunOS-5.9_g++-3.3.0
export DOLT_MAKEFILE=/projects/arl/make/Makefile-dolt

You then need to either start a new shell or "source ~/.bashrc" to make sure those environment variables are defined.

You should then be able to do the following:

$ tar xfz assign1.tgz
$ cd assign1
$ gmake
$ ./assign1 Problem1.txt
Two important notes:

  1. In the CS department, you must use a sun for this to work. You can ssh to remote.cs.rpi.edu and check with the command uname which should return SunOS. Or you can ssh to solaris.remote.cs.rpi.edu.

  2. Make sure you set the environment variables. Test to make sure they are set with the command echo $CGAL_MAKEFILE, for example. You can also print out all your environment variables with printenv. Just because a variable is set, however, doesn't mean that it's exported. The simplest thing is to just put the right stuff in your .bashrc file and either source it or start a new shell.

  3. You must use the gnu version of make. On the CS suns, this is called gmake. On (I assume) any Linux system, the make command will run gnu make. You can check with the command make --version.

Guide to the code

There are several files in the support code, most of which you won't have to edit: