The Steady State Solver is an ASP.NET Web Application hosted on Azure Cloud. It was a personal project I developed during my third semester at university. I encountered the demanding task of solving steady state vectors for Markov Chains manually, as part of my studies in stochastic modelling, which inspired me to create this application.
This application takes a transition matrix representing a Markov chain as input and provides a step-by-step solution in both a readable format and LaTeX code. Developing this program was a highly enjoyable experience, demanding creative problem-solving skills.
During my fourth semester at university, I enrolled in a high-performance computing class. The main assignment required us to significantly enhance the speed of a software application using techniques like parallelisation and cache optimization. Recognizing its potential, I chose to optimize the steady state solver.
The steady state solver proved to be an ideal candidate for parallelisation due to several constraints in the original web version. Firstly, the code had to run sequentially to maintain order in the workings. Secondly, the algorithms had certain intentional inefficiencies to ensure clarity in the TeX output for human readers.
To address these inefficiencies, I created a console version of the program. This version executed the same algorithms without displaying the step-by-step workings. Instead, it calculated the solution behind the scenes and presented the steady state vector in the console window.
Prior to initiating the parallelistion process, I profiled the application to identify bottlenecks and opportunities for improvement. I focused on optimising the code segments with the most significant impact on performance, striving to enhance algorithm efficiency without resorting to parallelism.
I then meticulously analysed the iteration spaces of the algorithms to determine the feasibility of optimisation. If it was deemed safe, I explored various options. Parallelization was primarily achieved implicitly using both TPL and PLINQ. I experimented with fine and coarse granularity solutions, ultimately adopting a mixed approach where different stages of the program were parallelised at varying granularities.
The performance improvement achieved was remarkable. The following plot illustrates the relationship between the matrix size and the utilisation of 8 logical cores.
The steady state solver project was one of the most enjoyable software projects I have undertaken, and I'm proud of the outcome. It sparked a deep interest in high-performance computing that extends well beyond the scope of the class I attended.