Sunday, June 1, 2014

Progress Report and Roadblocks

Most of the utility functions were ported to C. The remaining functionality depends on more complicated structures that will require extra effort to port. I have come to understand the simulation algorithm more completely. We have started to prepare a flowchart of the Monte Carlo algorithm. It can be seen below:

I think I am beginning to understand some of the physics behind the algorithm at least on a layman level. We have also tried running the simulation in Valgrind using the Callgrind tool and KCacheGrind for visualization of the results. Results seem to imply that most of the simulation time is spent in the main simulation loop itself and not in any of the functions it calls. Also some trivial optimizations were discovered, like the fact that Cython translates x ** 2 to pow(x, 2.0) which can be optimized as x * x (pow call is much more expensive). During the porting to C we try to keep the code functional by extensive testing of all the functions that are being rewritten. Hopefully until the mid-term all of the remaining Cython code will be ported to C and structured in a readable way. This way profiling can be done more effectively. Also we will need to look in to gcc compilation options to see if there are some enabling which could be beneficial to us. The main goal behind optimizing TARDIS is to be able to run it with different parameter sets on super-computing clusters. This is another area were we are doing work and it can be seen in a related repository. Right now I can see no problematic road-blocks ahead and everything seems to be going according to plan.

One area were more work needs to be done is benchmarking the functionality that we hope to optimize in asv. Hopefully it will allow us to track any improvements in performance as we go along. For this benchmarks for both utility functions and higher order functionality need to be written.

No comments:

Post a Comment