SCOREC / core

parallel finite element unstructured meshes
Other
179 stars 63 forks source link

fixes for memory leaks mentioned in #344 #350

Closed mortezah closed 3 years ago

mortezah commented 3 years ago

This PR addresses the memory leaks mentioned in https://github.com/SCOREC/core/pull/344 , using gcc10 and address-sanitizer

The following tests are not fixed yet

     24 - chef-BL_query (Failed)
     26 - rm_extrusion (Failed)
     27 - cut_interface_sim (Failed)
     31 - ph_adapt (Failed)
     59 - collapse_2 (Failed)
     62 - pipe_condense (Failed)
     84 - ptnParma_cube (Failed)
    112 - parallel_meshgen (Failed)
    113 - parallel_meshgen_surf (Failed)
    114 - parallel_meshgen_vol (Failed)
    115 - parallel_meshgen_para (Failed)
    122 - degen_shpere_full (Failed)
    126 - chefStream (Failed)
mortezah commented 3 years ago

Looks good to me.

@cwsmith I am working on fixing at least one more of these failing ones degen_sphere-full before this can be merged. I will let you know when I am done with that.

mortezah commented 3 years ago

latest commit fixes the leak in test 122 - degen_shpere_full

mortezah commented 3 years ago

@cwsmith

After my latest commits, now only the following tests have memory leaks

     24 - chef-BL_query (Failed)
     27 - cut_interface_sim (Failed)
     31 - ph_adapt (Failed)
     84 - ptnParma_cube (Failed)
    112 - parallel_meshgen (Failed)
    113 - parallel_meshgen_surf (Failed)
    114 - parallel_meshgen_vol (Failed)
    115 - parallel_meshgen_para (Failed)
    126 - chefStream (Failed)
cwsmith commented 3 years ago

@mortezah This looks good. Thank you. I assume this is ready to merge?

mortezah commented 3 years ago

@cwsmith yes.

I haven't had the chance to look at the remaining leaks. For almost all of the ones that I was able to fix, the problem was mostly the mesh/model not being cleaned at the end of main. I am suspecting something similar might be going on for the rest.