E3SM-Project / E3SM-Project/E3SM

Potential memory leaks in CAM

Open
#1,990 7 comments 0 reactions 1 assignee Assigned to @singhbalwinder View on GitHub
Dominant language
Fortran
Stars
440
Forks
481
Avg merge
4d 6h
Merged PRs (30d)
36

Description

Running `~/ACME/cime/scripts/create_newcase --case f_ompi_sanitize_test --compset F1850C5AV1C-04P2 --res ne4_ne4 --pecount S --compiler gnu --mach anvil --mpilib openmpi` with CAM with the address sanitizer, address sanitizer reports a superset ([f_ompi_sanitize.acme.log.171218-132430.txt](https://github.com/ACME-Climate/ACME/files/1569386/f_ompi_sanitize.acme.log.171218-132430.txt)) of the leaks below:

```
Direct leak of 110592 byte(s) in 1 object(s) allocated from:
#0 0x2b87bd89c05a in __interceptor_malloc /blues/gpfs/home/software/spack/var/spack/stage/gcc-5.3.0-fygfl7rvyuiteto27dlhmilp5cstw2o2/gcc-5.3.0/libsanitizer/asan/asan_malloc_linux.cc:38
#1 0xc3bb48 in __tracer_data_MOD_trcdata_init /blues/gpfs/home/mdeakin/ACME/components/cam/src/chemistry/utils/tracer_data.F90:310

Direct leak of 9344 byte(s) in 1 object(s) allocated from:
#0 0x2b87bd89c05a in __interceptor_malloc /blues/gpfs/home/software/spack/var/spack/stage/gcc-5.3.0-fygfl7rvyuiteto27dlhmilp5cstw2o2/gcc-5.3.0/libsanitizer/asan/asan_malloc_linux.cc:38
#1 0x143ec35 in __physics_types_MOD_physics_state_alloc /blues/gpfs/home/mdeakin/ACME/components/cam/src/physics/cam/physics_types.F90:1578

Direct leak of 9344 byte(s) in 1 object(s) allocated from:
#0 0x2b87bd89c05a in __interceptor_malloc /blues/gpfs/home/software/spack/var/spack/stage/gcc-5.3.0-fygfl7rvyuiteto27dlhmilp5cstw2o2/gcc-5.3.0/libsanitizer/asan/asan_malloc_linux.cc:38
#1 0x143e4f1 in __physics_types_MOD_physics_state_alloc /blues/gpfs/home/mdeakin/ACME/components/cam/src/physics/cam/physics_types.F90:1569

Direct leak of 9344 byte(s) in 1 object(s) allocated from:
#0 0x2b87bd89c05a in __interceptor_malloc /blues/gpfs/home/software/spack/var/spack/stage/gcc-5.3.0-fygfl7rvyuiteto27dlhmilp5cstw2o2/gcc-5.3.0/libsanitizer/asan/asan_malloc_linux.cc:38
#1 0x143e9c9 in __physics_typ
```
EDIT: Remove duplicates

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.