Skip to content

Commit

Permalink
Merge branch 'framework/missing-deallocate-nEdgesOnCellField-bootstra…
Browse files Browse the repository at this point in the history
…pping' into develop

This merge deallocates the 'nEdgesOnCellField' variable to correct a memory leak
in the boostrapping code. The field 'nEdgesOnCellField' was not deallocated at
the end of mpas_bootstrap_framework_phase1, though it should be deallocated like
all other fields (cellsOnCellField, etc.). The deallocate statements have been
slightly regrouped following the logic of the code.

* framework/missing-deallocate-nEdgesOnCellField-bootstrapping:
  Added missing deallocate statement for nEdgesOnCellField at end of mpas_bootstrap_framework_phase1
  • Loading branch information
mgduda committed Aug 7, 2017
2 parents 70b953b + caca599 commit 8b60591
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/framework/mpas_bootstrapping.F
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,9 @@ subroutine mpas_bootstrap_framework_phase1(domain, mesh_filename, mesh_iotype) !
call mpas_deallocate_field(indexToCellIDField)
call mpas_deallocate_field(indexToEdgeIDField)
call mpas_deallocate_field(indexToVertexIDField)
call mpas_deallocate_field(cellsOnCellField)

call mpas_deallocate_field(nEdgesOnCellField)
call mpas_deallocate_field(cellsOnCellField)
call mpas_deallocate_field(edgesOnCellField)
call mpas_deallocate_field(verticesOnCellField)
call mpas_deallocate_field(cellsOnEdgeField)
Expand Down

0 comments on commit 8b60591

Please sign in to comment.