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

Fix potential memory leak #8

Merged
merged 1 commit into from
Mar 31, 2014
Merged

Fix potential memory leak #8

merged 1 commit into from
Mar 31, 2014

Conversation

Zhi-Liang
Copy link
Contributor

Memory leak during initialization associated with the temporary domain used to read the super-grid data. A call to mpp_deallocate_domain should be used before actually de-allocating a domain.

Problem detected while trying to debug openmp implementation.

@adcroft adcroft changed the title fix potentail memroy leak Fix potential memory leak Mar 27, 2014
nikizadehgfdl added a commit that referenced this pull request Mar 31, 2014
Fix potential memory leak
No answer change for solo and SIS/SIS2 examples.
@nikizadehgfdl nikizadehgfdl merged commit dfaa803 into dev/master Mar 31, 2014
adcroft pushed a commit that referenced this pull request Jul 1, 2016
nikizadehgfdl pushed a commit to nikizadehgfdl/MOM6 that referenced this pull request Oct 9, 2017
- Brings in a major refactor of open boundary code from branch
  user/ksh/open_bc on the ESMG fork.
- Updates MOM_parameter_doc files.
- No answer changes.

- NOAA-GFDL/MOM6@c2799bc Merge branch 'ESMG-user/ksh/open_bc' into dev/master
- NOAA-GFDL/MOM6@be8080a Added description for log_version in MOM_open_boundary
- NOAA-GFDL/MOM6@cff9f0e Fixed uninitialized logical in MOM_continuity_PPM
- NOAA-GFDL/MOM6@d4fe7f7 Merge branch 'user/ksh/open_bc' of https://github.com/ESMG/MOM6 into ESMG-user/ksh/open_bc
- NOAA-GFDL/MOM6@fd8cf8a Merge branch 'gustavo-marques-ICE_SHELF' into dev/master
- NOAA-GFDL/MOM6@299bdab Merge branch 'user/mjh/dye_tracers_restart_fix' into dev/master
- NOAA-GFDL/MOM6@30bc60b Chaged allocation of water/heat fluxes
- NOAA-GFDL/MOM6@da43065 Merge branch 'dev/master' into ICE_SHELF
- NOAA-GFDL/MOM6@12b8cc5 Put back OBC_SIMPLE tests.
- NOAA-GFDL/MOM6@ca7313e Merge branch 'dev/master' into user/ksh/open_bc
- NOAA-GFDL/MOM6@ad3219b Merge branch 'dev/master' of github.com:NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@8cb5593 Changed do_i test for Flather OBC
- NOAA-GFDL/MOM6@1bd381b Allocated fluxes%buoy in MOM_ice_shelf
- NOAA-GFDL/MOM6@6ee04ef Backing out unstable change to OBC
- NOAA-GFDL/MOM6@fbc1297 Merge branch 'dev/master' into user/ksh/open_bc
- NOAA-GFDL/MOM6@7ee3e4d Merge branch 'dev/master' of github.com:NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@0c103bb Merge branch 'user/ksh/open_bc' into user/ksh/open_bc_uv
- NOAA-GFDL/MOM6@3fa6245  Fix for cases without OBC
- NOAA-GFDL/MOM6@5edb9c9 Merge of dev/master
- NOAA-GFDL/MOM6@080e159 Merge branch 'dev/master' into user/ksh/open_bc
- NOAA-GFDL/MOM6@c4ff34d Merge branch 'dev/master' of github.com:NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@0cf8497 CCS1 runs with six cores.
- NOAA-GFDL/MOM6@bd59a04 Don't deallocate OBC on pes without boundary
- NOAA-GFDL/MOM6@ffb4aea  Fix OBC after merge.
- NOAA-GFDL/MOM6@9862707 Update to ISOMIP_tracer for OBC
- NOAA-GFDL/MOM6@2861388 Merge branch 'dev/master' into user/ksh/open_bc
- NOAA-GFDL/MOM6@f9613a8 Merge branch 'dev/master' of github.com:NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@5f222f0 Added OBC for flow parallel to boundary.
- NOAA-GFDL/MOM6@8e10ec5 Merge pull request mom-ocean#8 from adcroft/user/aja/obc_split_kind_and_direction
- NOAA-GFDL/MOM6@f182829 Unified deallocation of OBC on PE without OBs
- NOAA-GFDL/MOM6@c3c1106 Split OBC_kind_u into OBC_kind_u and OBC_direction_u
- NOAA-GFDL/MOM6@983ce84 Adjust OBC mask to be consistent with land mask.
- NOAA-GFDL/MOM6@c421b4b ISOMIP_tracer fix for OBC reorg.
- NOAA-GFDL/MOM6@ada7e63 Merge branch 'dev/master' into user/ksh/open_bc
- NOAA-GFDL/MOM6@75a8557 Merge branch 'dev/master' of github.com:NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@f1795fc Merge branch 'dev/master' into user/ksh/open_bc
- NOAA-GFDL/MOM6@97f0ecc Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@3119c76 Merge branch 'dev/master' of github.com:NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@be8e34d Merge branch 'dev/master' of https://github.com/NOAA-GFDL/MOM6 into dev/master
- NOAA-GFDL/MOM6@ae0a293 Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@4f4952d Merge pull request #2 from adcroft/user/aja/obc_refactor
- NOAA-GFDL/MOM6@5e86623 Merge from aja/obc_refactor
- NOAA-GFDL/MOM6@ee365bd Loop bound fix in set_Flather_Bdry_data()
- NOAA-GFDL/MOM6@4f5a51f Merge branch 'ESMG-user/ksh/open_bc' into user/aja/obc_refactor
- NOAA-GFDL/MOM6@2558954 Moved call to open_boundary_init from MOM to MOM_state_initialize
- NOAA-GFDL/MOM6@2074943  License line and loop bounds fix.
- NOAA-GFDL/MOM6@643063c Added license line to MOM_open_boundary.F90
- NOAA-GFDL/MOM6@0b8dc7b New function open_boundary_impose_normal_slope()
- NOAA-GFDL/MOM6@c6d6b76 Merge branch 'user/ksh/open_bc' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@ead182e Merge pull request #1 from adcroft/user/aja/move_obctype_to_open_boundary_module
- NOAA-GFDL/MOM6@0248eb2 Separated set_Flather_... into fixed and state parts
- NOAA-GFDL/MOM6@59c5676 Moved set_Flather_Bdry_Conds() into MOM_open_boundary
- NOAA-GFDL/MOM6@c90bec4 Moved allocation of OBC type to MOM_open_boundary
- NOAA-GFDL/MOM6@d5efae2 Moved calls that set OBC masks into MOM_fixed_initialization
- NOAA-GFDL/MOM6@2d3856f Split out OBC positions in USER_initialization
- NOAA-GFDL/MOM6@83e50eb Split out DOME OBC positions
- NOAA-GFDL/MOM6@89b858f Re-ordered s/r in MOM_open_boundary.F90
- NOAA-GFDL/MOM6@98c4918 Moved calls to open_boundary_init() from MOM_dynamics_* to MOM.F90
- NOAA-GFDL/MOM6@ec8ba6f Moved open_boundary_CS parameters into ocean_OBC_type
- NOAA-GFDL/MOM6@2db5e11 Doxygenized MOM_open_boundary.F90
- NOAA-GFDL/MOM6@0a42b83 Moved ocean_OBC_type from MOM_variables to MOM_open_boundary
- NOAA-GFDL/MOM6@5baded0  Fix dye tracer restarts
- NOAA-GFDL/MOM6@b0dfd01 Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@6a61e89 Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@8cc50a1 Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@4d5d490 Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
- NOAA-GFDL/MOM6@f6ca193 Merge remote-tracking branch 'gfdl/dev/master' into dev/master
gustavo-marques referenced this pull request in gustavo-marques/MOM6 Dec 20, 2019
gustavo-marques referenced this pull request in gustavo-marques/MOM6 May 19, 2021
SMoorthi-emc pushed a commit to SMoorthi-emc/MOM6 that referenced this pull request Sep 30, 2021
marshallward referenced this pull request in Hallberg-NOAA/MOM6 Nov 27, 2021
+Add G%Rad_Earth_L and related code simplification
gustavo-marques referenced this pull request in gustavo-marques/MOM6 May 6, 2022
Shrink halos for SGS T var parameterization
Hallberg-NOAA referenced this pull request in Hallberg-NOAA/MOM6 May 7, 2022
Note that most of these commits are from previously squashed pull
requests, and this PR is restoring them.

- 6360dbb Merge branch 'main' into main_to_dev
- bac8031 Merge pull request mom-ocean#1566 from jiandewang/EMC-FMS-mixed-mode-20220411
- e532d86 Merge pull request mom-ocean#88 from marshallward/missing_attrib_with_class_bugfix
- d380f1d An alternate fix to class(*) issues with FMS 2022-01
- 8ecf333 Merge pull request mom-ocean#87 from jiandewang/feature/update-to-main-20220317
- ba37f94 Merge remote-tracking branch 'FSU/main' into feature/update-to-main-20220317 this is corresponding to MOM6 main 20220317 commit (hash # 399a7db)
- 44313d9 Merge pull request mom-ocean#85 from jiandewang/feature/update-to-main-20220217
- 966707f Merge remote-tracking branch 'GFDL/main' into feature/update-to-main-20220217 this is corresponding to MOM6 main branch 20220217 commit (hash # 6f6d4d6), which originally based on GFDL-candidate-20220129
- 32c0e1e Merge pull request mom-ocean#81 from jiandewang/feature/update-to-main-20211220
- 9642b1d delete external/OCEAN_stochastic_phyiscs directory as Phil re-coded in external/stochastic_physics directory
- e7c9ada solve minor conflict in mom_cap.F90 mom_ocean_model_nuopc.F90 and MOM_energetic_PBL.F90, add two new files: src/parameterizations/stochastic/MOM_stochastics.F90 and config_src/external/stochastic_physics/stochastic_physics.F90
- 90d5961 Merge pull request mom-ocean#78 from jiandewang/feature/update-to-GFDL-20211019
- fd02017 Merge remote-tracking branch 'GFDL/main' into feature/update-to-GFDL-20211019
- 36f17eb Merge pull request mom-ocean#72 from pjpegion/ocn_stoch_july2021
- a9a957e return a more accurate error message in MOM_stochasics
- 56bb41e Merge branch 'ocn_stoch_july2021' of https://github.com/pjpegion/MOM6 into ocn_stoch_july2021
- ca2ae1c update to dev/emc
- 14ca4a1 Merge pull request mom-ocean#76 from jiandewang/feature/update-to-GFDL-20210914
- 29016c2 Merge remote-tracking branch 'GFDL/main' into feature/update-to-GFDL-20210914 merge GFDL main 20210914 commit (hash # c09e199)
- a8577df Merge branch 'NOAA-EMC:dev/emc' into ocn_stoch_july2021
- f8a8e4c update to gfdl 20210806 (mom-ocean#74)
- 16e6af0 update to dev/emc
- 237a510 add comments
- 1b4273d revert logic wrt increments
- 5b2040e add logic to remove incrments from restart if outside IAU window
- c5f2b72 add write_stoch_restart_ocn to MOM_stochastics
- bdf2dc7 doxygen cleanup
- 8bc4acc move stochastics to external directory
- a3fa3a1 Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch_july2021
- e4bc007 stochastic physics re-write
- 202cbd4 update to dev/emc
- 61717ee Merge remote-tracking branch 'origin/dev/emc' into ocn_stoch
- 565e0bb remove debug statements
- a4c0411 Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch
- 689a73f remove PE_here from mom_ocean_model_nuopc.F90
- 8afe969 clean up of mom_ocean_model_nuopc.F90
- 25ed4fc revert MOM_domains.F90
- b8d9888 place stochastic array in fluxes container and make SPPT specific arrays allocatable
- d984a7e remove stochastics container
- eb88219 clean up of code for MOM6 coding standards
- 6e3ea1b correct coupled_driver/ocean_model_MOM.F90 and other cleanup
- 0b99c1f make stochastics optional
- 85023f8 Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch
- 80f9f44 clean up MOM_domains
- 5443f8e remove blank link in MOM_diagnostics
- 1727d9a re-write of stochastic code to remove CPP directives
- 600ebf9 Merge remote-tracking branch 'upstream/dev/emc' into ocn_stoch
- 6bb9d0b fix non stochastic ePBL calculation
- 1d7ffa3 clean up code
- 040e1f1 Merge pull request #13 from NOAA-EMC/dev/emc
- 2cba995 Merge branch 'dev/emc' into ocn_stoch
- 1dc0f4f Merge remote-tracking branch 'upstream/dev/emc' into dev/emc
- 4bd9b9e clean up debug statements
- 25ed5ef additions for stochy restarts
- a2a374b add stochy_restart writing to mom_cap
- 0c15f4c Update MOM_diabatic_driver.F90
- 167a62e Merge pull request #12 from pjpegion/dev/emc
- bd477a9 Update MOM_diabatic_driver.F90
- 7212400 Update MOM_diabatic_driver.F90
- 7de295c cleanup of code and enhancement of ePBL perts
- cd06356 Merge pull request #11 from NOAA-EMC/dev/emc
- 9896d61 Merge pull request #9 from pjpegion/dev/emc_merge
- 0a62737 Merge branch 'ocn_stoch' into dev/emc_merge
- 3cad1ba Merge pull request #8 from NOAA-EMC/dev/emc
- c2aa2a8 updates from dev/emc
- 182ef34 additions for stochastic physics and ePBL perts
- 671c714 Merge pull request #1 from NOAA-EMC/dev/emc
raphaeldussin pushed a commit to raphaeldussin/MOM6 that referenced this pull request Mar 14, 2023
This patch addresses some of the proposed changes to `get_field_nc`.

* `WARNING` is removed from `use MOM_error_handler` since it is unused.

* Zero initialization of `values_c` by `source=` has been removed.

  This initialization serves no purpose, since every value will be
  filled by the netCDF read statement.

* `values_c` indexing is now 1-based

  `values` has ambiguous shape, so it can follow no natural indexing.
  Although `values_c` always resides on the compute domain, the transfer
  to `values` may feel unintuitive.  Allocating from the 1 index
  identifies this as an explicit transfer of 1-based indices.

* Computation of the data domain indices were moved to the actual
  transfer of `values_c` to `values`.

* A comment was added to explain the initial "magic value" of
  `unlim_index`.

(It has also been suggested that the zero initialization of the intent(out)
`values` array should be removed, even when it has halos that would not be set
here.  However, this was deemed beyond the scope of this bug-fix PR, so this
commit was edited during merging to restore the initialization of `values` to
exactly what was there on the dev/gfdl branch before this PR, leaving this
particular change to be addressed with a later PR as necessary. - R. Hallberg)

Stylistic changes consistent with the existing file have also been
imposed:

* `values_nc` renamed to `values_c`

  Previous suffix indicated some special netCDF property of this field,
  when it's just the compute subdomain of the field's values.

* Comments have been truncated for readability

* Column width is restricted to 80

* Composite statements (semicolons) have been removed
marshallward pushed a commit that referenced this pull request Oct 25, 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.

2 participants