From 6fb12d50eeda3e2ba2303f655f7efacfe292e8fc Mon Sep 17 00:00:00 2001 From: Kyle Klenk <kyle.c.klenk@gmail.com> Date: Thu, 18 Aug 2022 03:19:32 +0000 Subject: [PATCH] making commit from container --- .../gru_actor/gru_actor_subroutine_wrappers.hpp | 2 +- build/source/actors/gru_actor/gru_actor.cpp | 7 +++++++ build/source/actors/gru_actor/gru_actor.f90 | 14 ++++++++++++-- utils/laugh_tests/celia1990/output/runinfo.txt | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/build/includes/gru_actor/gru_actor_subroutine_wrappers.hpp b/build/includes/gru_actor/gru_actor_subroutine_wrappers.hpp index fea4861..61fd5aa 100644 --- a/build/includes/gru_actor/gru_actor_subroutine_wrappers.hpp +++ b/build/includes/gru_actor/gru_actor_subroutine_wrappers.hpp @@ -2,6 +2,6 @@ extern "C" { - void getVarSize(); + void getVarSizes(int* num_bpar_vars, int* num_bvar_vars); } \ No newline at end of file diff --git a/build/source/actors/gru_actor/gru_actor.cpp b/build/source/actors/gru_actor/gru_actor.cpp index 5c19f18..19d7c6a 100644 --- a/build/source/actors/gru_actor/gru_actor.cpp +++ b/build/source/actors/gru_actor/gru_actor.cpp @@ -19,6 +19,13 @@ behavior gru_actor(stateful_actor<gru_state>* self, int refGRU, int indxGRU, [=](init_gru) { // Get the variable data length, we also need the type information aout(self) << "init GRU"; + + getVarSizes(&self->state.num_bpar_vars, + &self->state.num_bvar_vars); + + aout(self) << "NUM BPAR = " << self->state.num_bpar_vars << "\n"; + aout(self) << "NUM BVAR = " << self->state.num_bvar_vars << "\n"; + } diff --git a/build/source/actors/gru_actor/gru_actor.f90 b/build/source/actors/gru_actor/gru_actor.f90 index 98d8fb4..791cdaa 100644 --- a/build/source/actors/gru_actor/gru_actor.f90 +++ b/build/source/actors/gru_actor/gru_actor.f90 @@ -1,6 +1,8 @@ !!! Lets try and build this for only the lateral flows case. !!! If lateral flows exits use the code module gru_actor +USE,intrinsic :: iso_c_binding + implicit none ! public::run_gru @@ -9,10 +11,18 @@ public::getVarSizes contains -subroutine getVarSizes() bind(C,name="getVarSizes") - USE globalData,only:bpar_meta,bvar_meta +subroutine getVarSizes(num_bpar_vars, & + num_bvar_vars) bind(C,name="getVarSizes") + USE var_lookup,only:maxvarBpar, maxvarBvar implicit none + integer(c_int), intent(out) :: num_bpar_vars + integer(c_int), intent(out) :: num_bvar_vars + + + num_bpar_vars = maxvarBpar + num_bvar_vars = maxvarBvar + end subroutine getVarSizes diff --git a/utils/laugh_tests/celia1990/output/runinfo.txt b/utils/laugh_tests/celia1990/output/runinfo.txt index 61332a3..345b15b 100644 --- a/utils/laugh_tests/celia1990/output/runinfo.txt +++ b/utils/laugh_tests/celia1990/output/runinfo.txt @@ -1 +1 @@ - Run start time on system: ccyy=2022 - mm=08 - dd=17 - hh=22 - mi=42 - ss=53.312 + Run start time on system: ccyy=2022 - mm=08 - dd=17 - hh=22 - mi=54 - ss=02.427 -- GitLab