{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,8]],"date-time":"2026-04-08T05:07:49Z","timestamp":1775624869541,"version":"3.50.1"},"reference-count":27,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2026,4,6]],"date-time":"2026-04-06T00:00:00Z","timestamp":1775433600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Funda\u00e7\u00e3o para a Ci\u00eancia e a Tecnologia","award":["UID\/00147"],"award-info":[{"award-number":["UID\/00147"]}]},{"name":"Funda\u00e7\u00e3o para a Ci\u00eancia e a Tecnologia","award":["LA\/P\/0112\/2020"],"award-info":[{"award-number":["LA\/P\/0112\/2020"]}]},{"name":"Funda\u00e7\u00e3o para a Ci\u00eancia e a Tecnologia","award":["2023.10674.CPCA"],"award-info":[{"award-number":["2023.10674.CPCA"]}]},{"award":["UID\/00147"],"award-info":[{"award-number":["UID\/00147"]}],"id":[{"id":"https:\/\/ror.org\/00snfqn58","id-type":"ROR","asserted-by":"publisher"}]},{"award":["LA\/P\/0112\/2020"],"award-info":[{"award-number":["LA\/P\/0112\/2020"]}],"id":[{"id":"https:\/\/ror.org\/00snfqn58","id-type":"ROR","asserted-by":"publisher"}]},{"award":["2023.10674.CPCA"],"award-info":[{"award-number":["2023.10674.CPCA"]}],"id":[{"id":"https:\/\/ror.org\/00snfqn58","id-type":"ROR","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computation"],"abstract":"<jats:p>The development of high-performance Fortran code for large-scale scientific simulations is inherently challenging: direct Fortran implementation demands substantial expertise in numerical methods, optimization and system architecture. Manual derivation of numerical schemes is error-prone and time-consuming. This paper advocates a four-stage development methodology involving Python prototyping and symbolic derivation. Systematic validation at each step of incremental transition from symbolic specification to Fortran code produces numerically correct maintainable code faster than by direct manual implementation without sacrificing the resultant performance or code quality. Large Language Models effectively accelerate Python prototyping and boilerplate generation but require rigorous verification of the generated Fortran code. We suggest practical implementation guidelines including validation strategies. Python prototyping and symbolic code generation provide effective instruments for developing efficient production-ready Fortran implementations.<\/jats:p>","DOI":"10.3390\/computation14040086","type":"journal-article","created":{"date-parts":[[2026,4,7]],"date-time":"2026-04-07T09:40:31Z","timestamp":1775554831000},"page":"86","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Python-Assisted Development of High-Performance Fortran Codes: A Hybrid Methodology Integrating Symbolic Mathematics and Large Language Models"],"prefix":"10.3390","volume":"14","author":[{"given":"Daniil","family":"Tolmachev","sequence":"first","affiliation":[{"name":"Institute of Earthquake Prediction Theory and Mathematical Geophysics, Russian Academy of Sciences, 84\/32 Profsoyuznaya Street, 117997 Moscow, Russia"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5179-4344","authenticated-orcid":false,"given":"Roman","family":"Chertovskih","sequence":"additional","affiliation":[{"name":"SYSTEC\u2013ARISE Research Center for Systems and Technologies, Faculty of Engineering, University of Porto, Rua Dr. Roberto Frias s\/n, 4200-465 Porto, Portugal"}]}],"member":"1968","published-online":{"date-parts":[[2026,4,6]]},"reference":[{"key":"ref_1","unstructured":"Ray, B., Posnett, D., Filkov, V., and Devanbu, P. (2011). Assessing Programming Language Impact on Development Productivity and Maintainability. Proceedings of the 33rd International Conference on Software Engineering (ICSE), ACM."},{"key":"ref_2","unstructured":"Wharton, L. (2002). Should C Replace FORTRAN as the Language of Scientific Computing?. Proceedings of the National Conference on Scientific Computing, ACM. Available online: https:\/\/www.semanticscholar.org\/paper\/Should-C-Replace-FORTRAN-as-the-Language-of-Wharton\/b0e6fc6b15fa1f6c8077cea2da06c4029aa01703."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"109364","DOI":"10.1016\/j.cpc.2024.109364","article-title":"GPU-enabled extreme-scale turbulence simulations: Fourier pseudo-spectral algorithms at the exascale using OpenMP offloading","volume":"306","author":"Yeung","year":"2025","journal-title":"Comput. Phys. Commun."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"617","DOI":"10.1007\/s12043-013-0594-4","article-title":"Benchmarking and scaling studies of pseudospectral code Tarang for turbulence simulations","volume":"81","author":"Verma","year":"2013","journal-title":"Pramana"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"77","DOI":"10.1016\/j.jpdc.2017.10.014","article-title":"Scaling of a Fast Fourier Transform and a pseudo-spectral fluid solver up to 196608 cores","volume":"113","author":"Chatterjee","year":"2018","journal-title":"J. Parallel Distrib. Comput."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Luo, Y., Zhang, Q., Haas, R., Etienne, Z.B., and Allen, G. (2023). HPC-driven computational reproducibility in numerical relativity codes. arXiv.","DOI":"10.1088\/1361-6382\/ad13c5"},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Tolmachev, D., Chertovskih, R., and Zheligovsky, V. (2023). Algorithmic Aspects of Simulation of Magnetic Field Generation by Thermal Convection in a Plane Layer of Fluid. Mathematics, 11.","DOI":"10.3390\/math11040808"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Steuwer, M., Remmelg, T., and Kelly, P.H. (2017). LIFT: A functional data-parallel IR for high-performance GPU code generation. Proceedings of the 2017 IEEE\/ACM International Symposium on Code Generation and Optimization (CGO), IEEE.","DOI":"10.1109\/CGO.2017.7863730"},{"key":"ref_9","unstructured":"Rasch, A., and Gorlatch, S. (2019). MDH: A language and compiler for optimizing multi-dimensional homomorphisms. Proceedings of the 28th International Conference on Compiler Construction, ACM."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Steuwer, M., Kegel, P., and Gorlatch, S. (2011). SkelCL-A portable skeleton library for high-level GPU programming. Proceedings of the 2011 IEEE International Symposium on Parallel and Distributed Processing Workshops, IEEE.","DOI":"10.1109\/IPDPS.2011.269"},{"key":"ref_11","unstructured":"Hagedorn, J., Steuwer, M., and Gorlatch, S. (2017). PACXX: Towards a unified programming model for programming accelerators using C++ 14. Proceedings of the 4th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming, ACM."},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Rasch, A., Haastregt, S.V., and Gorlatch, S. (2017). ATF: A generic auto-tuning framework. Proceedings of the 2017 IEEE International Conference on High Performance Computing and Communications (HPCC), IEEE.","DOI":"10.1109\/HPCC-SmartCity-DSS.2017.9"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Lenfers, J., L\u00fccke, M., Spehr, S., Dieckmann, J., Jansen, J., and Gorlatch, S. (2026). Schedgehammer: Auto-Tuning Compiler Optimizations Beyond Numerical Parameters. Proceedings of the 35th ACM SIGPLAN International Conference on Compiler Construction (CC), ACM.","DOI":"10.1145\/3771775.3786282"},{"key":"ref_14","unstructured":"Hagedorn, J., Steuwer, M., and Gorlatch, S. (2020). High-performance GPU code generation with Elevate. Proceedings of the 13th Annual Global Spaces Workshop, ACM."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Rasch, A., Bigge, J., Wrodarczyk, M., Schulze, R., and Gorlatch, S. (2019). OCAL: An Abstraction for Host-Code Programming with OpenCL and CUDA. Proceedings of the 2018 IEEE 24th International Conference on Parallel and Distributed Systems (ICPADS), IEEE.","DOI":"10.1109\/PADSW.2018.8644541"},{"key":"ref_16","first-page":"2525","article-title":"dOCAL: High-Level Distributed Programming with OpenCL and CUDA","volume":"75","author":"Rasch","year":"2019","journal-title":"J. Supercomput."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"414","DOI":"10.1016\/j.cpc.2012.08.021","article-title":"Using Python for scientific computing: Efficient and flexible evaluation of probability density functions","volume":"184","author":"Chudoba","year":"2013","journal-title":"Comput. Phys. Commun."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"043201","DOI":"10.1103\/PhysRevE.97.043201","article-title":"Magnetic field generation by pointwise zero-helicity three-dimensional steady flow of incompressible electrically conducting fluid","volume":"97","author":"Rasskazov","year":"2018","journal-title":"Phys. Rev. E"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"1188","DOI":"10.1016\/j.physd.2010.03.008","article-title":"Dependence of magnetic field generation by thermal convection on the rotation rate: A case study","volume":"239","author":"Chertovskih","year":"2010","journal-title":"Phys. D"},{"key":"ref_20","first-page":"ES4004","article-title":"Linear perturbations of the Bloch type of space-periodic magnetohydrodynamic steady states. II. Numerical results","volume":"23","author":"Chertovskih","year":"2023","journal-title":"Russ. J. Earth Sci."},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Tolmachev, D., Chertovskih, R., Jeyabalan, S.R., and Zheligovsky, V. (2024). Predictability of magnetic field reversals. Mathematics, 12.","DOI":"10.3390\/math12030490"},{"key":"ref_22","unstructured":"Kim, M., Kang, S., Kim, J., and Yoo, J. (2025). Evaluating LLM Performance on Real-World Class-Level Code Generation. arXiv."},{"key":"ref_23","unstructured":"Yang, B., Cai, Z., Liu, F., Le, B., Zhang, L., Bissyand\u00e9, T.F., Liu, Y., and Tian, H. (2025). A Survey of LLM-based Automated Program Repair: Taxonomies, Design Paradigms, and Applications. arXiv."},{"key":"ref_24","unstructured":"Govande, S., Kang, T., and Shi, A. (2024). Fine-tuning CodeLlama-7B on Synthetic Training Data for Fortran Code Generation using PEFT. Proceedings of the Stanford CS224N Custom Project, Stanford University."},{"key":"ref_25","doi-asserted-by":"crossref","unstructured":"Diehl, P., Nader, N., Brandt, S., and Kaiser, H. (2024). Evaluating AI-generated code for C++, Fortran, Go, Java, Julia, Matlab, PHP, Python, R, and Rust. arXiv.","DOI":"10.1007\/978-3-031-90200-0_20"},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Phung, T., P\u0103durean, V.A., Cambronero, J., Gulwani, S., Kohn, T., Majumdar, R., Singla, A., and Soares, G. (2023). Benchmarking ChatGPT, GPT-4, and Human Tutors. Proceedings of the ICER 2023 Poster, ACM.","DOI":"10.1145\/3568812.3603476"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Ovi, M.S.I., Anjum, N., Bithe, T.H., Rahman, M.M., and Smrity, M.S.A. (2024). Benchmarking ChatGPT, Codeium, and GitHub Copilot: A Comparative Study of AI-Driven Programming Tools. 2024 27th International Conference on Computer and Information Technology (ICCIT), IEEE.","DOI":"10.1109\/ICCIT64611.2024.11021727"}],"container-title":["Computation"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2079-3197\/14\/4\/86\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,4,8]],"date-time":"2026-04-08T04:34:17Z","timestamp":1775622857000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2079-3197\/14\/4\/86"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,4,6]]},"references-count":27,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2026,4]]}},"alternative-id":["computation14040086"],"URL":"https:\/\/doi.org\/10.3390\/computation14040086","relation":{},"ISSN":["2079-3197"],"issn-type":[{"value":"2079-3197","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,4,6]]}}}