QUAD
A Program to Estimate an Integral


QUAD is intended to be a program that estimates the integral of a function f(x) from A to B, prints the result, the elapsed wallclock time, and the corresponding MegaFLOPS rate.

This directory contains only partial programs - they are just sketches of the code, and you will need to finish them, adding declarations, computational statements, and print statements.

Assignment:

Choose a partial program in your favorite language.

Source Code:

Completed Source Code:

If you want to see how I completed the programs, you can:

Batch Script:

Once you have made a quad executable, you need to copy this script file to the same directory that contains the executable, and issue the command qsub quad.sh. That submits a request to have the executable program run on 4 processors. You can type showq to see if the request has started yet.


You can go up one level to the HPPC 2008 web page.

Last revised on 23 July 2008.