
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An assignment for the csi 702 optimization course in fall 2008. Students are required to write short codes demonstrating various optimization techniques, including rearranging loop order, unrolling loops, eliminating branches in loops, and using sentinel values. The assignment also includes instructions for using profilers to measure performance improvements. An optional part offers extra credit for creating codes with different execution times for assigning unique integers to elements of a large two-dimensional array.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

CSI 702- Fall 2008 - Assignment 1 Due: Monday September 17
For this assignment, you will experiment with several of the code tuning techinques we covered in class. You may write your codes in C, C++, or Fortran. The timing results should be done using the profilers for the appropriate compiler. The final assignment will be turned in at the beginning of class on Monday September 17. Electronic submissions will not be allowed for this assignment, and there will be a penalty for late submission.
For each item above, compare the performance with and without the optmization for a simple problem. You must write these programs yourself and NOT use someone else’s code. If you use someone else’s code without attribution, this will be considered plagurism and reported to the honor committee. Use a profiler to examine the speed change between the two codes. To use the profiler, compile the code using
gfortran -pg -o outputfile program.f ./outputfile gprof -l -b outputfile
OR if you use c/c++
gcc -pg -o outputfile program.f ./outputfile gprof -l -b outputfile
You should also compile the codes without the “-pg” option and use the timing command to get real and user times. For each optimization, summarize the results of the two options. Compare compilers, machines, and other compilations flags IF time permits. At the end of the assignment, you will turn in the following-
(a) A listing of versions of the codes you wrote (b) A summary for each code of the timing tests. This should include information about the machine you ran the tests on, the commands used to run the tests, and your conclusions about the optmizations.