Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed Precision tracer_manager #1212

Merged
merged 67 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
96dc58e
allocatable r4_type and r8_type
Apr 19, 2023
dcef131
change pointers to allocatables
Apr 19, 2023
09b93f4
field_manager mixed mode update I
Apr 19, 2023
a2747fd
edit cmakelist for field_manager
Apr 19, 2023
9b9ece2
cleanup field_manager; add fm_util_get_real_array_r4/r8_kind
Apr 20, 2023
4fd3963
edit coupler and libFMS to reflect field_manager
Apr 20, 2023
af0bc5a
add missing real()
Apr 20, 2023
a63f233
first round of edits in test
Apr 20, 2023
65b5551
add small test for fm_util
Apr 20, 2023
a6b39ac
change string r4/8_kind to r4/8
Apr 20, 2023
837f7df
remove lines longer than 121
Apr 20, 2023
35f1f04
lint again
Apr 20, 2023
84dfa54
changes to coupler to compile
Apr 20, 2023
0085ad3
fix makefile.am hopefully
Apr 20, 2023
b52b4d3
makefile.am fix for ci
Apr 20, 2023
d5b59c3
temporary workaround for coupler
Apr 20, 2023
7c53dcc
undo changes to coupler
Apr 26, 2023
5e65b8a
add more testsw
Apr 27, 2023
79bcf8c
lint
Apr 27, 2023
2c8fa45
updated tracer manager
Apr 27, 2023
1709ee0
add unit test
Apr 28, 2023
b55a56a
add tests
Apr 28, 2023
65de1c4
fix commits
Apr 28, 2023
aee69e6
funky stuff
Apr 28, 2023
41006b8
delete accidentally commited files
Apr 28, 2023
4a28c5d
update cmakelist
Apr 28, 2023
be8cebe
update cmakelist
Apr 28, 2023
55bc366
fix tests
Apr 28, 2023
14ec802
make surf_value, bottom, top r8_kind
Apr 28, 2023
b426550
make field_def%r_value r8_kind
Apr 28, 2023
ef42bc6
update field_manager.inc
Apr 28, 2023
6b74810
fix compile issues
Apr 28, 2023
666ce45
bring in new field_manager
Apr 28, 2023
053dc33
add a bit more comment
May 3, 2023
109f7b5
bring in mixedmode field_manager
May 3, 2023
d3085cd
fix cmake
May 3, 2023
cc56300
fix lint
May 3, 2023
32b8acb
update tests
May 3, 2023
7ad8dc3
update to use r4 and r8
May 3, 2023
47431c6
change fm_get_real*_r8 to fm_get_real*; add r4 versions
May 24, 2023
83fd99d
remove extra line
May 24, 2023
7bbe54f
remove r4 versions in fm_util*.F90
May 24, 2023
ce211ae
fix libFMS.F90
May 24, 2023
22aea10
fix unit test
May 24, 2023
796165c
update field_manager
May 31, 2023
e3fb1c8
forgot to bring in additional changes due to field_manager update
May 31, 2023
ff10bdf
unit tests fixes
May 31, 2023
6a91868
remove continue statement in parse.inc
Jun 2, 2023
03f47c8
add 99 continue back in
Jun 2, 2023
1dd7219
remove tabs in test_fms/field_manager/Makefile.am
Jun 2, 2023
3019ea6
change number of pes to 2
Jun 2, 2023
59eda1a
remove extraneous tabs
Jun 2, 2023
3017194
add $ back in to makefile.am. accidentally deleted
Jun 2, 2023
0077ef0
cleanup interfaces
Jun 5, 2023
09afcca
Revert "cleanup interfaces"
Jun 5, 2023
21f5566
remove real_r4, real_r8 in fm_util_mod in libfms.f90
Jun 5, 2023
1ba31af
Revert "remove real_r4, real_r8 in fm_util_mod in libfms.f90"
Jun 5, 2023
0668eff
Merge remote-tracking branch 'mkl/mixedmode-fm' into mixedmode-tracer
Jun 6, 2023
dab2159
make fm_util_set_value_real and fm_util_set_value_real_array interfaces
Jun 7, 2023
806455c
fix libFMS to agree exactly with the original one
Jun 7, 2023
0f18148
Merge remote-tracking branch 'mkl/mixedmode-fm' into mixedmode-tracer
Jun 7, 2023
f86eecf
increase np to 2
Jun 7, 2023
6b2d25a
ci test
Jun 7, 2023
e0ae875
ci test2
Jun 7, 2023
aac685a
ci again
Jun 7, 2023
6725e13
Merge branch 'mixedmode' into mixedmode-tracer
rem1776 Jun 7, 2023
36abf9a
Merge branch 'mixedmode' into mixedmode-tracer
rem1776 Jun 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,13 @@ foreach(kind ${kinds})
mpp/include
sat_vapor_pres/include
horiz_interp/include
field_manager/include
diag_manager/include
constants4
constants
axis_utils/include)
axis_utils/include
field_manager/include
tracer_manager/include)
target_compile_definitions(${libTgt}_f PRIVATE "${fms_defs}")
target_compile_definitions(${libTgt}_f PRIVATE "${${kind}_defs}")

Expand Down Expand Up @@ -339,10 +342,13 @@ foreach(kind ${kinds})
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fms/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fms2_io/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sat_vapor_pres/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/field_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/horiz_interp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/string_utils/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mpp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/diag_manager/include>)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/diag_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/field_manager/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/tracer_manager/include>)

target_include_directories(${libTgt} INTERFACE
$<BUILD_INTERFACE:${moduleDir}>
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ AC_CONFIG_FILES([
test_fms/parser/Makefile
test_fms/string_utils/Makefile
test_fms/sat_vapor_pres/Makefile
test_fms/tracer_manager/Makefile
FMS.pc
])

Expand Down
14 changes: 11 additions & 3 deletions coupler/coupler_types.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module coupler_types_mod
use data_override_mod, only: data_override
use mpp_domains_mod, only: domain2D, mpp_redistribute
use mpp_mod, only: mpp_error, FATAL, mpp_chksum
use platform_mod, only: r4_kind, r8_kind

use iso_fortran_env, only : int32, int64 !To get mpp_chksum value

Expand Down Expand Up @@ -193,16 +194,23 @@ module coupler_types_mod
type(coupler_1d_values_type), pointer, dimension(:) :: field => NULL() !< field
character(len=128) :: flux_type = ' ' !< flux_type
character(len=128) :: implementation = ' ' !< implementation
real, pointer, dimension(:) :: param => NULL() !< param
!> precision has been explicitly defined
!! to be r8_kind during mixedmode update to field_manager
!! this explicit definition can be removed during the coupler update and be made into FMS_CP_KIND_
real(r8_kind), pointer, dimension(:) :: param => NULL() !< param
logical, pointer, dimension(:) :: flag => NULL() !< flag
integer :: atm_tr_index = 0 !< atm_tr_index
character(len=128) :: ice_restart_file = ' ' !< ice_restart_file
character(len=128) :: ocean_restart_file = ' ' !< ocean_restart_file
logical :: use_atm_pressure !< use_atm_pressure
logical :: use_10m_wind_speed !< use_10m_wind_speed
logical :: pass_through_ice !< pass_through_ice
real :: mol_wt = 0.0 !< mol_wt
end type coupler_1d_field_type
!> precision has been explicitly defined
!! to be r8_kind during mixedmode update to field_manager
!! this explicit definition can be removed during the coupler update and be made into FMS_CP_KIND_
real(r8_kind) :: mol_wt = 0.0 !< mol_wt

end type coupler_1d_field_type

!> Coupler data for 1D boundary conditions
!> @ingroup coupler_types_mod
Expand Down
30 changes: 19 additions & 11 deletions field_manager/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,35 @@
# Ed Hartnett 2/22/19

# Include .h and .mod files.
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/field_manager/include
AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)

# Build these uninstalled convenience libraries.
noinst_LTLIBRARIES = libfield_manager.la

# Each convenience library depends on its source.
libfield_manager_la_SOURCES = \
field_manager.F90 \
fm_yaml.F90 \
fm_util.F90 \
parse.inc

field_manager_mod.$(FC_MODEXT): parse.inc fm_yaml_mod.$(FC_MODEXT)
fm_util_mod.$(FC_MODEXT): field_manager_mod.$(FC_MODEXT)
field_manager.F90 \
fm_yaml.F90 \
fm_util.F90 \
parse.inc \
include/field_manager.inc \
include/field_manager_r4.fh \
include/field_manager_r8.fh \
include/fm_util.inc \
include/fm_util_r4.fh \
include/fm_util_r8.fh

field_manager_mod.$(FC_MODEXT): parse.inc fm_yaml_mod.$(FC_MODEXT) \
include/field_manager.inc include/field_manager_r4.fh include/field_manager_r8.fh
fm_util_mod.$(FC_MODEXT): field_manager_mod.$(FC_MODEXT) \
include/fm_util.inc include/fm_util_r4.fh include/fm_util_r8.fh

# Mod files are built and then installed as headers.
MODFILES = \
field_manager_mod.$(FC_MODEXT) \
fm_util_mod.$(FC_MODEXT) \
fm_yaml_mod.$(FC_MODEXT)
field_manager_mod.$(FC_MODEXT) \
fm_util_mod.$(FC_MODEXT) \
fm_yaml_mod.$(FC_MODEXT)
BUILT_SOURCES = $(MODFILES)
nodist_include_HEADERS = $(MODFILES)

Expand Down
Loading