Support for single precision wp
What is the new feature
Support for single-precision as working-precision in libfortran-support. Related to icon-mpim MR (https://gitlab.dkrz.de/icon/icon-mpim/-/merge_requests/558), and libiconmath MR (libiconmath!13 (merged)).
How is it implemented
- New CMake argument
FS_ENABLE_SINGLE_PRECISION
, disabled by default - Precision handling: Introduction of
src/mo_iconlib_kind.f90
shared by fortran-support and iconmath:- Precision (dp+sp): Using iso_fortran_env variables
dp=>real64
andsp=>real32
- Working precision (wp):
FS_ENABLE_SINGLE_PRECISION==TRUE
->wp=real32
, elsewp=real64
- Variable precision (vp):
FS_ENABLE_MIXED_PRECISION==TRUE
->vp=real32
, elsevp=wp
- Precision (dp+sp): Using iso_fortran_env variables
- Extensions of some functions to include sp and dp interfaces
- Kind for
t_ptr
types iswp
by default, with wp or dp or sp versions specified by suffix.
Mandatory steps before review
-
Gitlab CI passes (Hint: use make format
for linting) -
New feature is covered by additional unit tests -
Mark the merge request as ready by removing Draft:
Mandatory steps before merge
-
Test coverage does not decrease -
Reviewed by a maintainer -
Incorporate review suggestions -
Prior to merging, please remove any boilerplate from the MR description, retaining only the Please describe your feature in a couple of words and describe important implementation details of the feature section to maintain -
Remember to edit the commit message and select the proper changelog category (feature/bugfix/other)
You are not supposed to merge this request by yourself, the maintainers of fortan-support take care of this action!
Edited by Dylan Kierans