KGEN: Fortran Kernel Generator

Date and Time: 
2015 April 14 @ 2:00pm
FL2-1022 Large Auditorium
Youngsung Kim

There are cases that we want to extract a part of Fortran codes from a software application as a stand-alone executable. For example, when a programmer debugs a large software application such as CESM of NCAR, he/she needs to run whole CESM program up to the source line to debug. If we can take the part of codes that are only relevant to the debugging, it would remove time to run CESM and time to wait in queuing system. There are plenty of other potential use-cases such as collecting kernels from its own applications to setup a private benchmark test suite, or allowing multiple developer to work on each separate of code of a large application parallelly and so on.

However, extracting a kernel from an application has been a laborious manual work. To extract a kernel manually, a programmer looks through all relevant source codes to collect codes that provides required specification. Furthermore, it is trickier to generate data to drive generated kernel execution and to verify the output from the kernel execution. It is time-consuming work to figure out which variables are used in subroutines that are called by the kernel directly or indirectly. What's more, if a variable is a derived type having a pointer member that is another derive type, it is getting more difficult to trace correctly.

KGEN, Fortran Kernel Generator, extracts a Fortran subprogram as a stand-alone software out of a large software application such as CESM. In addition, it generates instrumented files that save input and output data for the generated kernel. For convenience, it also adds codes for correctness check and timing measurement in the generated kernel. Through using KGEN, it will save considerable amount of time that previously spent for manual kernel extraction and enables the potential use-cases mentioned in this abstract that was practically not feasible through manual kernel extraction.

KGEN is written in Python as an extension of F2PY package. During this talk, modest level of introduction to the tool and practical demo that extracts a kernel from CESM would be presented if time permits.

Speaker Description: 

After an undergraduate degree in Electronic Engineering at Dankook University of South Korea, Youngsung Kim has worked in mobile telecommunication industry for 13 years mostly as a software developer. In 2010, he returned back to school at University of Utah and majored in Scientific Computing. During the study, he participated WRF climate simulation project and brain image matching project along with taking core courses including numerical methods and parallel computing. After graduation with master's degree from Univ. of Utah, he joined NCAR and has been working on accelerator technologies until now.

PDF icon Slides172.58 KB
Video recorded: 

If you use a non-flash enabled device, you may download the video here

Event Category: