Homework Instruction¶
This programming assignment consists of three integral parts: coding, conducting experiments, and report writing. It’s essential to give each section equal importance to ensure comprehensive understanding and successful completion of the task at hand. Here’s a breakdown of what’s expected for each part:
Coding¶
1. Code Optimization¶
Begin by analyzing the provided code thoroughly.
Identify areas of improvement and potential inefficiencies.
Develop an optimized version that enhances performance while maintaining functionality.
Do not optimize the code blindly. Focus on code blocks that consume the most time and resources.
It is a good practice to make your program focusing on running only a single experiment. Code for automation can be added later as separated script.
2. Documentation & Clarity¶
Ensure every function, class, and module is accompanied by concise and clear comments explaining its purpose and functionality.
Any complex logic or algorithms used should have inline comments for better understanding. No need to comment anything that is easy to understand.
It’s not just about writing comments but making the code itself self-explanatory through meaningful variable and function names.
3. Makefile¶
Provide a Makefile to streamline the compilation process.
The Makefile should support multiple targets as necessary, allowing for flexibility in compilation and testing.
When optimizations are from compilation flags, make separate targets for each optimization in your Makefile.
Ensure the Makefile is free of errors and can successfully compile the code without issues.
4. Coding Style Consistency¶
Adopt a consistent coding style throughout your work. This includes consistent indentation, naming conventions, and code structure.
If you’re following any particular coding guidelines or standards, ensure you adhere to them strictly.
Consistency aids in readability and maintainability, making it easier for others (and yourself) to review and understand your code in the future.
Note
Remember, well-written code is not just functional, but also clean, readable, and maintainable. Aim for clarity and simplicity wherever possible.
Work with data¶
Data Collection
You may write scripts for automation to feed various inputs to your program and collect results.
Results can be ideally in CSV (Comma Separated Values) format for easy processing and analysis.
Manually input the data into a spreadsheet is also an option, but it’s time-consuming and prone to errors.
Data Processing
Please follow the Data Processing Guide for effective data management.
Data Presentation
Plots are the best way to visualize your data.
Types
Line plot: show trends of series, focus on trend
Bar plot: show comparison of values in series
Scatter plot: show the relationship between two variables or the distribution of data in two-dimensional space
Histogram: show the distribution of data in one-dimensional space
Useful plots in this course
Trend of run time: line plot, X: input size, Y: run time, Series: the optimization
Strong scaling: line plot, X: number of processes, Y: speedup, Series: input size
Weak scaling: line plot, X: number of processes, Y: speedup, Series: input size per process