Copying, Compiling, and Testing

The same approach can be used to set up the code for all three modules (BufMgr, INL_Join, SM_Join). The instructions are for the BufMgr module, but you need only change a few words (indicated in square brackets below) to set up the two join modules.

  1. Add the following three lines to the end of the .cshrc file in your home directory on orcas/sanjuan:

    setenv MINIBASE_ROOT /cse/courses/misc_lang/axp/minibase-2.0
    setenv PLATFORM `$MINIBASE_ROOT/bin/sysname`
    set path=($MINIBASE_ROOT/bin $path)

  2. Create a directory (anywhere in your account's directory hierarchy) to hold the files for the assignment. Use the command mkdir BufMgr [mkdir INL_Join, mkdir SM_Join].
  3. Go to the new directory: cd BufMgr [cd INL_Join, cd SM_Join].
  4. Copy the Makefile into the new directory: cp /projects/instr/cse594/mini_hwk/assign/BufMgr/src/Makefile Makefile [replace BufMgr with INL_Join, SM_Join].
  5. Type the command gmake setup.
  6. Write the code. Put it in buf.C [sortMerge.C, index_nl.C].
  7. Compile the code: gmake
  8. Test the code: ./buftest [./SortMerge, ./index_nl ].

If you want to see what a working version of the Buffer Manager or Sort-Merge Join code does with the test data, you can link in an executable solution by replacing Step 6 above with Step 6': Edit the Makefile to reverse the commenting on the two LFLAGS definitions and on the two SRCS definitions. Comments in a Makefile are lines beginning with #.

Naturally, you're free to monkey with the Makefile and to create more thorough tests (in the appropriate .C files). Other useful include files may be found in the directory /projects/instr/cse594/mini_hwk/assign/BufMgr/include [replace BufMgr with INL_Join, SM_Join].