Introduction to Parallel Computation |
~risc/path/path.f
. Use this source code as
the basis of your own work. You may change the problem size (N, L)
to an appropriate value.
-O1
) and measure the
runtime of the program (man time). Compare this value with the runtimes
of all following variants of the program.
-O2
) and analyze the
generated compilation information. What does it say? To which extent has the
program been vectorized and why? Which transformations has the compiler
applied and why? Please answer these questions also for all following
program variants.
square
such that the compiler is
able to vectorize the loop in a better way (hint: get rid of the auxiliary
variable) and analyze the changes.
square
by replacing the intrinsic
function MIN
by an IF
statement and analyze the changes.
square
by applying the function SMIN (man smin) of VECLIB (man veclib) and analyze the changes.
Do not forget to link this library to your program using the option
-lveclib
.
square
), the messages generated by the compiler (redirect it into a
file), your interpretations of these messages, the program timings, and your
conclusions. If you have any ideas how to improve the program, go on!
You can print a file from the Convex on the central line printer of the university using lpr on the default printer. Use ftp to transfer files from/to the Convex.
If there are major problems, drop me an email.
Have fun!
You can tell how far we have to go, when FORTRAN is the language of supercomputers. - Steven Feiner
Real programmers don't write in FORTRAN. FORTRAN is for pipe stress freaks and crystallography weenies. FORTRAN is for wimp engineers who wear white socks.