CS 575 Supercomputing
Lab 2: Report Template and File I/O
First Report Due 24 Sept 03

September 17, 2003

Dr. Kris Stewart (stewart@rohan.sdsu.edu)
San Diego State University

This URL is http://www.stewart.cs.sdsu.edu/cs575/labs/l2report_fileio.html

  1. Problem Solving Skills
  2. Report Template with HTML and Pico
  3. Essay Question (report due 24Sept03)
  4. Requirement for Report 1
  5. Examples of Source Code Writing to a File (future use, perhaps?)

Problem Solving Skills

Developing Problem Solving Skills is a Goals of this Course: Problem Solving Skills
Programming Exploration (You should have been doing this in the past week)
Validate Computed Data (You should have started to think about this)
Writing Skills
Computational Experimentation

First Report Template

Edit using Pico
At the UNIX command, in an Xterm window, type pico. This text-based editor accompanies the pine email system and it often preferred for UNIX editing over the system editor, vi. If you are already comfortable with vi or emacs, please do not change. For those somewhat new to UNIX, Xterms and SDSU, you might find pico useful. Be sure to carefully look at the editing windows that is displayed, and to read the messages that flash on the very bottom line.
Report Template
This report template is available on ROHAN. You can use this as a sample to start your own class-account web page. After logging on to your class-account, issue the following commands (only need to do this one). At the UNIX prompt in an Xterm window As you read the contents of assign1.html in the editor, you'll see length comments providing instructions on how to proceed.

ROHAN Directions for creating a home page (NOTE: this may need some updating. I'm trying to provide specifics in the Report Template)

Main task for 17Sept03 lab: Start on Report Due Sept. 24

Start to edit and prepare your class home page for Assignment 1 on timers

Your essay question

How large does the input parameter, N, controlling the loop in the sample code you examined in lab last week have to be to obtain convincing data that you can relate the known OpCounts to the actual measured CPU time as measures of work? Provide the data to support your conclusion. Consider both user CPU time and system CPU time.

  1. CPU time (both user and system)
  2. Wall Clock time (using the UNIX command date)
using the timing results similar to those you examined in Lab 1.

For ideas on how to gather convincing data, see Validating Data in the Problem Solving Skills page.

You should start to form the habit of capturing your data to a file and identifying this data. One simple way to accomplish this would be to

A simple HTML tag would be to use the tag pre for pre-formatted text.

< pre >
your "datafile" here
< /pre >

your "datafile3cases" here would be the file datafile3cases in the script example above.

Requirements for First Report

You are required to edit the timer program (Fortran or C) and insert lines of authenticating code to output the following information, along with the CPU timer information which is already written:
  1. Your name (First name, Last name)
  2. Your class account number (masc????)
  3. Your "finger" name (set in lab last week)
This information will then appear as the output from the timer code and will identify (or authenticate) you as the writer of the essay, based on the data.

Your essay must use the html-template, named assign1.html in your public_html directory as the starting point. You should include an Appendix of your output data from the modified C or Fortran code, csample.c or fsample.f using the
script - exit
instructions above or by writing to a file, instructions below.

You must discuss the data that you actually generate. You should modify the code to produce the Tables or other organized collections of data. Concise, focussed data and report are valued. Please do not compute pages of data, since this becomes difficult to reference in your written report. Instead, once you have experimented and examined enough data to be familiar with the problem and draw some conclusions, you should modify your source code to produce concise, focussed data tables to directly include in your written report.

When you have completed your essay, including the authenticating output as an Appendix, you must send email from your class account to stewart@rohan.sdsu.edu to notify me that your html-essay is ready to be viewed. I do not read an essay until I hear from you.

Revisit Lab1: Xterm, Pine, Timer demos

Write Data to a File

I recommend that you consider structuring your code so that the code writes the output data to a file. If you are not confident of your programming skills, then the script/exit technique outlined above is okay, for now. If you have not had the opportunity to work with code writing to a file, I am providing the following simple examples.

Return to CS 575 Class Home Page