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

September 18, 2002

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

This URL is stewart.sdsu.edu/cs575/labs/l2report_fileio.html

  1. Problem Solving Skills
  2. Report Template with HTML and Pico
  3. Main Task today: start on Essay Question (report due 25Sept02)
  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 lengthy comments providing instructions on how to proceed.

Main task for 18Sept02 lab: Start on Report Due Sept. 25

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 "datafile81632" here
< /pre >

your "datafile81632" here would be the file datafile81632 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 template above and must include your output data from the modified C or Fortran code, csample.c or fsample.f, using the script - exit instructions above or writing to a file, below. You must discuss the data that you actually generate.

When you have completed your essay, including the authenticating output above, you must send email from your class account to stewart@rohan.sdsu.edu to notify me that your essay is ready to be viewed.

You must also bring a printed copy of your report to class on 25Sept02. I plan to have another member of the class read your report and do a short evaluation of it. The hope is that you will learn even more from reading another persons explanation of the same computational experiment that you have just done.

Revisit Lab1: Xterm, Pine, Timer demos

Write Data to a File

I recommend that you start to consider structuring your code so that they write the output data to a file for subsequent processing. If you are not confident of your programming skills, then the script/exit technique outlined above is fine, 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