https://github.com/e3sm-project/ekea
E3SM Kernel Extraction and Analysis Toolkit
https://github.com/e3sm-project/ekea
Last synced: 11 months ago
JSON representation
E3SM Kernel Extraction and Analysis Toolkit
- Host: GitHub
- URL: https://github.com/e3sm-project/ekea
- Owner: E3SM-Project
- License: mit
- Created: 2021-03-17T15:37:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T17:53:03.000Z (almost 3 years ago)
- Last Synced: 2025-03-27T02:46:01.325Z (about 1 year ago)
- Language: Python
- Homepage: https://ekea.readthedocs.io
- Size: 529 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
===========================================
ekea : E3SM Kernel Extractor and Analyser
===========================================
**ekea** automates the process of kernel extraction from a large Fortran applicatin. Especially, it is customized for E3SM so that, in many kernel extraction cases from E3SM, user only needs to specify a E3SM case directory and a code region for kernel extraction.
To use ekea, **ekea** needs be installed on the system where E3SM case directory and E3SM source files exist.
-------------
Installation
-------------
The easiest way to install **ekea** is to use the pip python package manager.
.. code-block:: bash
>>> pip install ekea
You can install **ekea** from github code repository if you want to try the latest version.
.. code-block:: bash
>>> git clone https://github.com/grnydawn/ekea.git
>>> cd ekea
>>> python setup.py install
Once installed, you can test the installation by running the following command.
.. code-block:: bash
>>> ekea --version
ekea 1.1.2
------------
Requirements
------------
- Linux OS
- Python 3.5+
- Make building tool(make)
- C Preprocessor(cpp)
- System Call Tracer(strace)
-------------------------
E3SM Kernel Extraction
-------------------------
Once **ekea** is installed correctly and a E3SM case is created successfully, you can extract a kernel as explained below.
The syntax of **ekea** command for simple usage is following:
.. code-block:: bash
>>> ekea $CASEDIR $CALLSITEFILE
, where $CASEDIR is a directory path to E3SM case directory and $CALLSITEFILE is a file path to a E3SM source file containing **ekea** kernel region directives(explained below).
Next to "ekea" command, user chooses one of two subcommands(**ocn** or **eam**) for MPAS Ocean Model and E3SM Atmospheric Model each.
Kernel region directives
-------------------------
As shown below, a pair of "begin_callsite" and "end_callsite" directives defines an ekea kernel region in source code. The kernel region is where to be extracted as a kernel. Following example shows a **ekea** kernel region that encompasses a DO loop.
.. code-block:: fortran
! file path : /my/E3SM/components/eam/src/file.F90
!$kgen begin_callsite vecadd
DO i=1
C(i) = A(i) + B(i)
END DO
!$kgen end_callsite
Kernel extraction command
-------------------------
Assuming that the E3SM case directory is "/e3smcases/mycase" and the above ekea kernel region directives are specified in "/my/E3SM/components/eam/src/file.F90" under EAM source directory, the full ekea command is below:
.. code-block:: bash
>>> ekea eam /e3smcases/mycase /my/E3SM/components/eam/src/file.F90
ekea documentation: `https://ekea.readthedocs.io `_