diff --git a/build/includes/gru_actor/gru_actor_subroutine_wrappers.hpp b/build/includes/gru_actor/gru_actor_subroutine_wrappers.hpp index fea4861fa1ff1389fe9828f4b9d6c760ca6abdbb..61fd5aa29d5fb3ba02cadfe9e248d91bd6fe5bf2 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 5c19f1895a5909d9365e63953bdc18e0c1978981..19d7c6a8d904be4a6b1c4dbc909a3ab5098f2ae4 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 98d8fb4cf7d5c02396b216971527cbad9974af0d..791cdaa4ae141ed9fc1b9056f3550b51443def48 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 61332a3ae36c8c0bc08fed05630c3e216ac1c2f5..345b15be47ef3c522e858c498dd07179b80b0e64 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