Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 123 additions & 2 deletions tasks/example/processes/report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,130 @@
# Example Processes
# Process-Based Task Report

This section aggregates the MPI/process example tasks.
Fill in this report for an MPI/process semester or assignment. It aggregates process tasks T1, T2, and T3.
Fill in only the tasks required for your assignment. Each task must compare its MPI implementation only with its
own sequential baseline.

Child reports:

- `t1/report.md`
- `t2/report.md`
- `t3/report.md`

## Where to Write Process-Semester Details

| Repository path | What to describe |
| --------------------------------------- | --------------------------------------------- |
| `t1/seq/include`, `t1/seq/src` | Sequential baseline for process task T1 |
| `t1/mpi/include`, `t1/mpi/src` | MPI implementation for process task T1 |
| `t1/tests/functional/main.cpp` | Functional tests for process task T1 |
| `t1/tests/performance/main.cpp` | Performance tests for process task T1 |
| `t2/seq/include`, `t2/seq/src` | Sequential baseline for process task T2 |
| `t2/mpi/include`, `t2/mpi/src` | MPI implementation for process task T2 |
| `t2/tests/functional/main.cpp` | Functional tests for process task T2 |
| `t2/tests/performance/main.cpp` | Performance tests for process task T2 |
| `t3/seq/include`, `t3/seq/src` | Sequential baseline for process task T3 |
| `t3/mpi/include`, `t3/mpi/src` | MPI implementation for process task T3 |
| `t3/tests/functional/main.cpp` | Functional tests for process task T3 |
| `t3/tests/performance/main.cpp` | Performance tests for process task T3 |

Each `t1`, `t2`, and `t3` report owns its own correctness and performance baseline. Do not compare an MPI task
with a sequential implementation from another process task or from the thread branch.

## Problem Statement

Describe the process-based assignment scope.

- Required process tasks: `<T1 / T2 / T3>`
- Input data: `<Input data format, source, size, and meaning>`
- Output data: `<Output data format and meaning>`
- Constraints: `<Input limits, memory limits, process limits, or memory limits>`
- Correctness criteria: `<Rules used to decide that the output is correct>`
- Expected behavior: `<Expected behavior for normal, edge, and invalid inputs>`

## Build and Run Instructions

Provide the commands used for process-based tasks.

```bash
<Configure command>
<Build command>
<Test command>
<Run command>
```

- Command-line arguments: `<Command-line arguments>`

## Experiment Setup

Describe the environment used for MPI/process performance measurements.

| Parameter | Value |
| ----------------------- | ------------------------ |
| CPU | `<CPU model>` |
| RAM | `<RAM size>` |
| OS | `<Operating system>` |
| Compiler | `<Compiler and version>` |
| Build type | `<Debug/Release>` |
| CMake options | `<CMake options>` |
| Number of runs | `<N>` |
| Input data sizes | `<Input data sizes>` |
| Number of processes | `<Process counts>` |
| Time measurement method | `<Method>` |

## Performance Results

Use a separate sequential baseline for each process task.

### Execution Time

| Task | Implementation | Input size | Processes | Threads | Time, ms | Notes |
| ------ | -------------- | ---------: | --------: | ------: | -------: | --------- |
| `<T1>` | Sequential | `<N>` | 1 | 1 | `<Time>` | `<Notes>` |
| `<T1>` | MPI | `<N>` | `<P>` | 1 | `<Time>` | `<Notes>` |
| `<T2>` | Sequential | `<N>` | 1 | 1 | `<Time>` | `<Notes>` |
| `<T2>` | MPI | `<N>` | `<P>` | 1 | `<Time>` | `<Notes>` |
| `<T3>` | Sequential | `<N>` | 1 | 1 | `<Time>` | `<Notes>` |
| `<T3>` | MPI | `<N>` | `<P>` | 1 | `<Time>` | `<Notes>` |

### Speedup

| Task | Input size | Processes | Sequential time, ms | Parallel time, ms | Speedup |
| -------- | ---------: | --------: | ------------------: | ----------------: | ----------: |
| `<Task>` | `<N>` | `<P>` | `<Seq time>` | `<Par time>` | `<Speedup>` |

### Efficiency

| Task | Input size | Processes | Speedup | Efficiency |
| -------- | ---------: | --------: | ----------: | -------------: |
| `<Task>` | `<N>` | `<P>` | `<Speedup>` | `<Efficiency>` |

### Best Result Summary

| Task | Best configuration | Best time, ms | Speedup | Comment |
| -------- | ------------------ | ------------: | ----------: | ----------- |
| `<Task>` | `<Configuration>` | `<Time>` | `<Speedup>` | `<Comment>` |

```text
Speedup = Sequential time / Parallel time
Efficiency = Speedup / Number of workers
```

For process-based implementations, workers usually mean the number of MPI processes.

## Results Analysis

- Which process task showed the best MPI speedup?
- Why did this task perform better?
- Where was speedup not achieved?
- What MPI communication overheads affected the result?
- How did the number of processes affect performance?
- Were there any anomalous results?
- How can the implementation be improved?

## Conclusion

- Short summary: `<Summary of completed process tasks>`
- Best implementation: `<Best task and configuration>`
- Explanation of the best result: `<Why this result was best>`
- Limitations: `<Current limitations>`
- Possible future improvements: `<Future improvements>`
18 changes: 16 additions & 2 deletions tasks/example/processes/t1/mpi/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Example Processes T1 MPI
# Process Task T1 MPI Implementation

MPI implementation for process example task T1.
Fill in this report with the MPI implementation for process task T1. Compare it only with
`../seq/report.md`.

- Source files: `<T1 MPI source files>`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does report really need to be that verbose in general? And I still not fully get the multilayer structure of the report itself. Is that really needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does report really need to be that verbose in general? And I still not fully get the multilayer structure of the report itself. Is that really needed?

I ran a few experiments to understand where the agent tends to get stuck, and this structure is based on those results.

If you think it is too heavy or excessive, we can discuss it separately.

But in any case, the agents are already generating this content, so the template is intentionally designed to make the report a bit more demanding and force a more careful output.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I have a plan convert it to pdf
example-report-template.pdf

- Source files to describe: `include/ops_mpi.hpp`, `src/ops_mpi.cpp`
- Task class to describe: `NesterovATestTaskMPI`
- Number of processes: `<Number of processes>`
- Data distribution: `<How T1 data is distributed between processes>`
- Communication pattern: `<Point-to-point or collective communication pattern>`
- Collective operations, if used: `<MPI_Bcast / MPI_Reduce / MPI_Gather / other collectives>`
- Result gathering: `<How final T1 results are collected>`
- Synchronization points: `<MPI synchronization points>`
- MPI calls to explain: `MPI_Comm_rank`, `MPI_Barrier`
- Methods to describe: `ValidationImpl`, `PreProcessingImpl`, `RunImpl`, `PostProcessingImpl`
- Limitations: `<Known limitations>`
50 changes: 48 additions & 2 deletions tasks/example/processes/t1/report.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
# Example Processes T1
# Process Task T1 Report

First process example task.
Fill in this report for the first process-based task. Compare `mpi/report.md` only with `seq/report.md` from this
same `t1` directory.

Child reports:

- `seq/report.md`
- `mpi/report.md`

## Problem Statement

- What must be implemented: `<T1 required computation>`
- Input data: `<T1 input data>`
- Output data: `<T1 output data>`
- Constraints: `<T1 constraints>`
- Correctness criteria: `<T1 correctness criteria>`
- Expected behavior: `<T1 expected behavior>`

## Algorithm Description

- General idea of the algorithm: `<T1 algorithm overview>`
- Sequential algorithm: `<T1 sequential baseline>`
- Parallel decomposition: `<How T1 work is split between processes>`
- Data partitioning: `<How T1 data is divided>`
- Synchronization strategy: `<MPI synchronization strategy>`
- Result aggregation: `<How T1 partial results are combined>`
- Possible data races and how they are avoided: `N/A for separate MPI process memory unless threads are used`
- Complexity, if applicable: `<T1 time and memory complexity>`

## Correctness Verification

- Implemented tests: `<T1 tests>`
- Normal cases: `<T1 normal cases>`
- Edge cases: `<T1 edge cases>`
- Invalid input cases, if applicable: `<T1 invalid input cases>`
- Comparison with sequential implementation: `<How T1 MPI output is compared with T1 sequential output>`
- Floating-point tolerance, if applicable: `<Tolerance value and reason>`
- Correctness explanation: `<How T1 correctness was checked>`
- Test input data: `data/pic.ppm` is loaded in functional tests through `stb_image`
- Functional test class to mention: `NesterovARunFuncTestsProcesses`
- Performance test class to mention: `ExampleRunPerfTestProcesses`
- Implementation classes to describe: `NesterovATestTaskSEQ`, `NesterovATestTaskMPI`

| Test case | Input size / parameters | Expected result | Actual result | Status |
| ------------- | ----------------------: | --------------- | ------------- | ----------------- |
| `<Test name>` | `<Input>` | `<Expected>` | `<Actual>` | `<Passed/Failed>` |

## Performance Results

| Implementation | Input size | Processes | Threads | Time, ms | Notes |
| -------------- | ---------: | --------: | ------: | -------: | --------- |
| Sequential | `<N>` | 1 | 1 | `<Time>` | `<Notes>` |
| MPI | `<N>` | `<P>` | 1 | `<Time>` | `<Notes>` |
16 changes: 14 additions & 2 deletions tasks/example/processes/t1/seq/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Example Processes T1 Seq
# Process Task T1 Sequential Implementation

Sequential baseline for process example task T1.
Fill in this report with the sequential baseline for process task T1. Use it as the only baseline for
`../mpi/report.md`.

- Source files: `<T1 sequential source files>`
- Source files to describe: `include/ops_seq.hpp`, `src/ops_seq.cpp`
- Short description: `<T1 sequential implementation description>`
- Main functions/classes: `<T1 sequential functions or classes>`
- Task class to describe: `NesterovATestTaskSEQ`
- Important implementation details: `<T1 sequential implementation details>`
- Methods to describe: `ValidationImpl`, `PreProcessingImpl`, `RunImpl`, `PostProcessingImpl`
- Input preparation: `<How input data is prepared for the baseline>`
- Output validation: `<How baseline output is validated>`
- Limitations: `<Known limitations>`
18 changes: 16 additions & 2 deletions tasks/example/processes/t2/mpi/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Example Processes T2 MPI
# Process Task T2 MPI Implementation

MPI implementation for process example task T2.
Fill in this report with the MPI implementation for process task T2. Compare it only with
`../seq/report.md`.

- Source files: `<T2 MPI source files>`
- Source files to describe: `include/ops_mpi.hpp`, `src/ops_mpi.cpp`
- Task class to describe: `NesterovATestTaskMPI`
- Number of processes: `<Number of processes>`
- Data distribution: `<How T2 data is distributed between processes>`
- Communication pattern: `<Point-to-point or collective communication pattern>`
- Collective operations, if used: `<MPI_Bcast / MPI_Reduce / MPI_Gather / other collectives>`
- Result gathering: `<How final T2 results are collected>`
- Synchronization points: `<MPI synchronization points>`
- MPI calls to explain: `MPI_Comm_rank`, `MPI_Barrier`
- Methods to describe: `ValidationImpl`, `PreProcessingImpl`, `RunImpl`, `PostProcessingImpl`
- Limitations: `<Known limitations>`
50 changes: 48 additions & 2 deletions tasks/example/processes/t2/report.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
# Example Processes T2
# Process Task T2 Report

Second process example task.
Fill in this report for the second process-based task. Compare `mpi/report.md` only with `seq/report.md` from this
same `t2` directory.

Child reports:

- `seq/report.md`
- `mpi/report.md`

## Problem Statement

- What must be implemented: `<T2 required computation>`
- Input data: `<T2 input data>`
- Output data: `<T2 output data>`
- Constraints: `<T2 constraints>`
- Correctness criteria: `<T2 correctness criteria>`
- Expected behavior: `<T2 expected behavior>`

## Algorithm Description

- General idea of the algorithm: `<T2 algorithm overview>`
- Sequential algorithm: `<T2 sequential baseline>`
- Parallel decomposition: `<How T2 work is split between processes>`
- Data partitioning: `<How T2 data is divided>`
- Synchronization strategy: `<MPI synchronization strategy>`
- Result aggregation: `<How T2 partial results are combined>`
- Possible data races and how they are avoided: `N/A for separate MPI process memory unless threads are used`
- Complexity, if applicable: `<T2 time and memory complexity>`

## Correctness Verification

- Implemented tests: `<T2 tests>`
- Normal cases: `<T2 normal cases>`
- Edge cases: `<T2 edge cases>`
- Invalid input cases, if applicable: `<T2 invalid input cases>`
- Comparison with sequential implementation: `<How T2 MPI output is compared with T2 sequential output>`
- Floating-point tolerance, if applicable: `<Tolerance value and reason>`
- Correctness explanation: `<How T2 correctness was checked>`
- Test input data: `data/pic.ppm` is loaded in functional tests through `stb_image`
- Functional test class to mention: `NesterovARunFuncTestsProcesses2`
- Performance test class to mention: `ExampleRunPerfTestProcesses2`
- Implementation classes to describe: `NesterovATestTaskSEQ`, `NesterovATestTaskMPI`

| Test case | Input size / parameters | Expected result | Actual result | Status |
| ------------- | ----------------------: | --------------- | ------------- | ----------------- |
| `<Test name>` | `<Input>` | `<Expected>` | `<Actual>` | `<Passed/Failed>` |

## Performance Results

| Implementation | Input size | Processes | Threads | Time, ms | Notes |
| -------------- | ---------: | --------: | ------: | -------: | --------- |
| Sequential | `<N>` | 1 | 1 | `<Time>` | `<Notes>` |
| MPI | `<N>` | `<P>` | 1 | `<Time>` | `<Notes>` |
16 changes: 14 additions & 2 deletions tasks/example/processes/t2/seq/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Example Processes T2 Seq
# Process Task T2 Sequential Implementation

Sequential baseline for process example task T2.
Fill in this report with the sequential baseline for process task T2. Use it as the only baseline for
`../mpi/report.md`.

- Source files: `<T2 sequential source files>`
- Source files to describe: `include/ops_seq.hpp`, `src/ops_seq.cpp`
- Short description: `<T2 sequential implementation description>`
- Main functions/classes: `<T2 sequential functions or classes>`
- Task class to describe: `NesterovATestTaskSEQ`
- Important implementation details: `<T2 sequential implementation details>`
- Methods to describe: `ValidationImpl`, `PreProcessingImpl`, `RunImpl`, `PostProcessingImpl`
- Input preparation: `<How input data is prepared for the baseline>`
- Output validation: `<How baseline output is validated>`
- Limitations: `<Known limitations>`
18 changes: 16 additions & 2 deletions tasks/example/processes/t3/mpi/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Example Processes T3 MPI
# Process Task T3 MPI Implementation

MPI implementation for process example task T3.
Fill in this report with the MPI implementation for process task T3. Compare it only with
`../seq/report.md`.

- Source files: `<T3 MPI source files>`
- Source files to describe: `include/ops_mpi.hpp`, `src/ops_mpi.cpp`
- Task class to describe: `NesterovATestTaskMPI`
- Number of processes: `<Number of processes>`
- Data distribution: `<How T3 data is distributed between processes>`
- Communication pattern: `<Point-to-point or collective communication pattern>`
- Collective operations, if used: `<MPI_Bcast / MPI_Reduce / MPI_Gather / other collectives>`
- Result gathering: `<How final T3 results are collected>`
- Synchronization points: `<MPI synchronization points>`
- MPI calls to explain: `MPI_Comm_rank`, `MPI_Barrier`
- Methods to describe: `ValidationImpl`, `PreProcessingImpl`, `RunImpl`, `PostProcessingImpl`
- Limitations: `<Known limitations>`
50 changes: 48 additions & 2 deletions tasks/example/processes/t3/report.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,54 @@
# Example Processes T3
# Process Task T3 Report

Third process example task.
Fill in this report for the third process-based task. Compare `mpi/report.md` only with `seq/report.md` from this
same `t3` directory.

Child reports:

- `seq/report.md`
- `mpi/report.md`

## Problem Statement

- What must be implemented: `<T3 required computation>`
- Input data: `<T3 input data>`
- Output data: `<T3 output data>`
- Constraints: `<T3 constraints>`
- Correctness criteria: `<T3 correctness criteria>`
- Expected behavior: `<T3 expected behavior>`

## Algorithm Description

- General idea of the algorithm: `<T3 algorithm overview>`
- Sequential algorithm: `<T3 sequential baseline>`
- Parallel decomposition: `<How T3 work is split between processes>`
- Data partitioning: `<How T3 data is divided>`
- Synchronization strategy: `<MPI synchronization strategy>`
- Result aggregation: `<How T3 partial results are combined>`
- Possible data races and how they are avoided: `N/A for separate MPI process memory unless threads are used`
- Complexity, if applicable: `<T3 time and memory complexity>`

## Correctness Verification

- Implemented tests: `<T3 tests>`
- Normal cases: `<T3 normal cases>`
- Edge cases: `<T3 edge cases>`
- Invalid input cases, if applicable: `<T3 invalid input cases>`
- Comparison with sequential implementation: `<How T3 MPI output is compared with T3 sequential output>`
- Floating-point tolerance, if applicable: `<Tolerance value and reason>`
- Correctness explanation: `<How T3 correctness was checked>`
- Test input data: `data/pic.ppm` is loaded in functional tests through `stb_image`
- Functional test class to mention: `NesterovARunFuncTestsProcesses3`
- Performance test class to mention: `ExampleRunPerfTestProcesses3`
- Implementation classes to describe: `NesterovATestTaskSEQ`, `NesterovATestTaskMPI`

| Test case | Input size / parameters | Expected result | Actual result | Status |
| ------------- | ----------------------: | --------------- | ------------- | ----------------- |
| `<Test name>` | `<Input>` | `<Expected>` | `<Actual>` | `<Passed/Failed>` |

## Performance Results

| Implementation | Input size | Processes | Threads | Time, ms | Notes |
| -------------- | ---------: | --------: | ------: | -------: | --------- |
| Sequential | `<N>` | 1 | 1 | `<Time>` | `<Notes>` |
| MPI | `<N>` | `<P>` | 1 | `<Time>` | `<Notes>` |
Loading
Loading