The programming languages Fortran, C, C++, and Python each have their strengths and weaknesses and their own fan base. This workshop is for people who would like to be able to combine these languages within one code project:
To appreciate the material it helps to have some previous exposure to Python and a compiled language (such as C, C++, or Fortran).
To traverse the material you will need a C++ compiler which is C++11 compliant, a Fortran compiler, CMake, Make, Git and a couple of Python packages.
|13:00||Motivation||Why is one programming language often not enough?|
|13:10||Overview over different approaches||Which tools are out there?|
|13:20||Hands-on example using PyBind11||What tool do you recommend to interface Python and C++?|
|14:10||Fortran, C and C++ talking to each other||
How can we couple Fortran with C/C++?
What is name mangling?
How can we avoid worrying about it?
How can we safely pass data types across languages?
|14:30||Using the C Foreign Function Interface for Python||
Is there a non-intrusive way to couple C/C++/Fortran and Python?
Can I test my Fortran code with Python?
|15:10||Memory allocation for arrays that pass the API||Where and how should we allocate memory?|
How can we create composable code units?
How can we improve the API to make it easier to understand and use?
|15:40||Roadmap for migrating and modularizing legacy code||Big untested legacy monolith code in front of you - what now?|