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 placed before allocating pointers passed into routines #1152

Merged
merged 6 commits into from
Jun 20, 2023

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

Copy link
Member

@thomas-robinson thomas-robinson left a comment

Choose a reason for hiding this comment

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

We may have discussed this but I forget. Why are these pointers not changed to allocatables?

@ganganoaa
Copy link
Contributor Author

There are many functions and subroutines that have pointer return types and arguments.

@rem1776 rem1776 merged commit 783019f into NOAA-GFDL:main Jun 20, 2023
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
3 participants