|
754 | 754 | "\n",
|
755 | 755 | "Now we do the same for runtime vs matrix size and number of processes.\n",
|
756 | 756 | "\n",
|
757 |
| - "<!-- TODO: Add image -->\n", |
758 |
| - "<!--  -->" |
| 757 | + "\n", |
| 758 | + "\n", |
| 759 | + "Based on this plot, we would be tempted to say that not only the execution time is much bigger that it is for `numpy` and `scipy`, but it might also seem that our method does not scale with respect to the number of processes.\n", |
| 760 | + "However, running a single time the file `shell/time_profile.sh`, we notice that this is likely a problem related to how `time.time()` saves the results.\n", |
| 761 | + "\n", |
| 762 | + "Running, for instance,\n", |
| 763 | + "```bash\n", |
| 764 | + "$ shell/time_profile.sh 1 1500 # 1 refers to n_procs, 1000 to the matrix size\n", |
| 765 | + "```\n", |
| 766 | + "we get the following results:\n", |
| 767 | + "```mermaid\n", |
| 768 | + "Some results\n", |
| 769 | + "```\n", |
| 770 | + "Re-running with `n_procs=2`, we obtain\n", |
| 771 | + "```mermaid\n", |
| 772 | + "Even more results\n", |
| 773 | + "```\n", |
| 774 | + "Finally, for `n_procs=4`, we obtain\n", |
| 775 | + "```mermaid\n", |
| 776 | + "Final results\n", |
| 777 | + "```\n", |
| 778 | + "The previous results suggest that the method scales well with the number of processes, and that the performance (while worse than `numpy` and `scipy`) is such that the comparison goes much better than it seemed to do earlier.\n", |
| 779 | + "We believe that the reason for such a behavior is related to the execution of multiple scripts, which can have an impact on execution times as measured with `time.time()`.\n", |
| 780 | + "\n", |
| 781 | + "Notice that we parallelized everything that could be parallelized (except for the secular solver, which usually takes no more than $5\\%$ of the total time): the bottleneck is given by the Lanczos method, which cannot be parallelized.\n", |
| 782 | + "If the Lanczos method is not needed (that is, if the matrix $A$ of which we want to compute the eigenvalues and eigenvectors is already tridiagonal), then the execution time of our solver becomes comparable to the one of `numpy` and `scipy`." |
759 | 783 | ]
|
760 | 784 | },
|
761 | 785 | {
|
|
817 | 841 | " ), \"Error. The eigenvalues were not computed correctly.\""
|
818 | 842 | ]
|
819 | 843 | },
|
| 844 | + { |
| 845 | + "cell_type": "markdown", |
| 846 | + "metadata": {}, |
| 847 | + "source": [ |
| 848 | + "# Final remarks\n", |
| 849 | + "We hope this file, along with the `README.md`, provides sufficient information to understand the work done in our project.\n", |
| 850 | + "If anything remains unclear, feel free to reach out: we’ll be happy to answer any questions you may have." |
| 851 | + ] |
| 852 | + }, |
820 | 853 | {
|
821 | 854 | "cell_type": "markdown",
|
822 | 855 | "metadata": {
|
|
0 commit comments