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

Checks put in place before allocating pointers passed into routines #1146

Closed
wants to merge 131 commits into from

Conversation

ganganoaa
Copy link
Contributor

Description
Checks are inserted mostly for member pointers of DDTs, which are passed as arguments to functions and subroutines, before allocation.

Fixes #1099

How Has This Been Tested?
The update was tested with 'make check' and 'make distcheck' without any issues on OS, 'CentOS Stream 8'. The following setup was used for compiler, MPI wrapper, and required packages:
oneapi v2022.2
hdf5 v1.12.0
tbb v2021.6.0
oclfpga v2022.1.0
netcdf v4.9.0
mpich v4.0.3
compiler-rt v2022.1.0
compiler v2022.1.0

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

thomas-robinson and others added 30 commits October 6, 2021 13:53
Adds dependency of fms_diag_object_mod to diag_manager_mod
Calls the diag_object register from the regular diag array register if modern is turned on.
…elist

Adds  namelist variable use_modern_diag
Fixes inquiry for diag_id

Sets up diag_yaml_object
Memory clean up in string conversion function
Updates get functions in the diag yaml objects
thomas-robinson and others added 23 commits October 31, 2022 09:32
* Adds fms_diag_time_utils.F90 and copies get_time_string and diag_time_inc

* Use diag_time_inc in the fileobj

* finish setting up the io to open the file

* Adds documentation, non-domain decomposed files now only get written by the root PE

* set up the time for the next open and some bug fixes

* Adds code to setups the subaxis

* Fix bugs in the code that get the starting and ending index of the subregion

* fixes bugs in the code that sets up the subaxis object, updates the io for the axis, adds subroutines that dumps the contents of each of the objects

Co-authored-by: Uriel Ramirez <[email protected]>
* Add the io for the time_axis, properly close the file, bug fixes for the axis writes, set up time related variables in the file object

* removes get_date_diff from diag_utils and cleans up get_global_io_domain

* replaces error_mesg with mpp_error, and fixes error messages
* Add the io for the time_axis, properly close the file, bug fixes for the axis writes, set up time related variables in the file object

* removes get_date_diff from diag_utils and cleans up get_global_io_domain

* replaces error_mesg with mpp_error, and fixes error messages

* Add the use_clock_average namelist flag for flexible timings

* implement flexible output timings

* Allow frequency to be an array

* believe in magic you muggle
*Adds accept data function skeleton

* Adds logic for implementing math functions is modern accept_data and diag_send_complete

* Clean up memory in diag_send_complete

* Uses a pointer-rank remapping to send field to accept_data instead of a copy

* Makes the field contiguous in send_data_3d for remaping
 Add some of the io for the field's metadata
* adds the compress attribute and axis data to the netcdf file

* Fix some typos, change axis_length to a required argument, change the structured_axis to allocatables
diag_table.yaml documentation
fixes merge conflict with main and dmUpdate.
* write the time data based on how FMS is compiled

* Implement capability to specifiy which time in a time average period to use when setting filename
* fix: pointer to allocatable in amip_interp_type (NOAA-GFDL#1106)

* feat: log_diag_field_info updates from diag rewrite (NOAA-GFDL#1117)

---------

Co-authored-by: ganganoaa <[email protected]>
Co-authored-by: Ryan Mulhall <[email protected]>
@thomas-robinson
Copy link
Member

@ganganoaa this has the dmUpdate branch in it. Did you want to merge this into dmUpdate? If you want this to go into main, you will have to redo this on main.

@rem1776 rem1776 closed this Mar 28, 2023
@rem1776
Copy link
Contributor

rem1776 commented Mar 28, 2023

Replaced by #1152

@ganganoaa ganganoaa deleted the xgrid_pointers branch April 6, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allocated Pointers: Potential Memory Leak Issue
5 participants