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

Update to data type amip_interp_type #1106

Merged
merged 4 commits into from
Feb 9, 2023
Merged

Conversation

ganganoaa
Copy link
Contributor

Description
This is a minor update to avoid possible memory leaks in the future. The pointer members, 'data1', and 'data2', were upgraded to allocatables since pointers are prone to cause memory leaks if not properly handled. A missing assignment statement related to data member, 'Hintrp2', was inserted to follow the principle of object-to-object copy.

Fixes #1099

How Has This Been Tested?
'make check' and 'make distcheck' were ran without any issues. 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.8.0
  • mpi v2021.6.0
  • 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

Copy link
Contributor

@rem1776 rem1776 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! For future reference you shouldn't need to put a 'added by' comment, we can see who added each line with git blame.

@rem1776 rem1776 merged commit 15df841 into NOAA-GFDL:main Feb 9, 2023
thomas-robinson added a commit that referenced this pull request Feb 22, 2023
* fix: pointer to allocatable in amip_interp_type (#1106)

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

---------

Co-authored-by: ganganoaa <121043264+ganganoaa@users.noreply.github.com>
Co-authored-by: Ryan Mulhall <35538242+rem1776@users.noreply.github.com>
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
2 participants