-
Notifications
You must be signed in to change notification settings - Fork 64
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
Capgen to adopt/improve on DDT metadata from prebuild #377
Comments
I am confused on some of the usage. In CCPP_data.meta, I see:
which I would interpret as a scalar DDT (no dimensions). That seems to be true in the code. However, later in the file, I see:
which I intrepret as an element of an array of type,
|
These are two different DDTs - one is GFS_interstitial is an array of length (omp_threads). In order to call a scheme, one needs to pass the correct element = scalar to the MPI task/OpenMP thread. The scalar is therefore defined as
|
I do not see a problem with |
I don't know if it is a quirk. But when you call the physics, you need pass certain variables that belong to a specific OpenMP thread to the physics. How does capgen know which element of the GFS_Interstitial array to pass to the call for OpenMP thread 0, 1, .. ? If it has a way to do this, then we don't need the extra logic anymore. |
I would advocate using a host-model variable for the 'chunk' of data to pass in a particular call to ccpp_physics_run. If you really want to use OMP and are calling from within a threaded region, you can assign the variable to |
I guess I need to see this in action to fully understand. |
Is this resolved by #383? |
@mkavulich @gold2718 @dustinswales I believe that #383 and the work that was done on capgen since then are sufficient to close this issue as resolved. |
I agree. |
Description
ccpp_prebuild.py
defines DDTs and instances of it as shown here:Typedefs:
https://github.com/NOAA-EMC/fv3atm/blob/develop/ccpp/data/CCPP_typedefs.meta
https://github.com/NOAA-EMC/fv3atm/blob/develop/ccpp/data/CCPP_typedefs.F90
Instance:
https://github.com/NOAA-EMC/fv3atm/blob/develop/ccpp/data/CCPP_data.meta
https://github.com/NOAA-EMC/fv3atm/blob/develop/ccpp/data/CCPP_data.F90
Solution
capgen should use the same or a similar/better approach.
The text was updated successfully, but these errors were encountered: