EuroPython 2016

A case study of porting a Fortran77 Monte Carlo simulation code to python&numba

Speaker(s) Robert Froeschl

The EDARA code is used at CERN (European Council for Nuclear Research) to assess the environmental impact of airborne releases of radioactivity. Its development has started in the 1990ies and the code is written in FORTRAN 77. The EDARA code will be significantly upgraded in the next years to meet the future legal requirement of including additional age groups in the impact assessments, to have the capability of choosing among several different atmospheric dispersion models and to be interfaced from other software packages. Therefore it has been decided to port the EDARA code to python and a prototype has been developed with the following characteristics: - The numba just-in-time compiler has been used for the computationally demanding Monte Carlo simulation core routines. Closures over just-in-time compiled functions have been used to implement function pointer like features for the atmospheric dispersion model selection. - The data analysis and reporting features have been implemented using the pandas library. - implementation. - An API is provided for scripting and interfacing from other codes. This prototype demonstrates that the python/numba/pandas implementation leads to a much smaller and cleaner code base that the FORTRAN 77 implementation without incurring a significant performance penalty for the computationally demanding parts. It has substantially increased the flexibility and extensibility of the code and will ensure its long-term maintainability.

in on Tuesday 19 July at 11:30 See schedule

Do you have some questions on this talk?

New comment