ForestClaw / forestclaw

Quadtree/octree adaptive PDE solver based based on p4est.
http://www.forestclaw.org
BSD 2-Clause "Simplified" License
58 stars 21 forks source link

Possible memory leak #178

Closed cburstedde closed 2 years ago

cburstedde commented 2 years ago

I'm on the current develop branch configured

--enable-debug --enable-mpi --disable-shared --enable-clawpack

When I run from the build directory:

valgrind --leak-check=full --show-reachable=yes ./applications/clawpack/advection/2d/swirl/swirl --tfinal=0

(no configuration file loaded), I get the following error summary.

==343772== HEAP SUMMARY:
==343772==     in use at exit: 4 bytes in 1 blocks
==343772==   total heap usage: 2,020 allocs, 2,019 frees, 9,314,318 bytes allocated
==343772==
==343772== 4 bytes in 1 blocks are still reachable in loss record 1 of 1
==343772==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==343772==    by 0x11BDB9: clawpack5_set_amr_module_ (clawpack5_set_amr_module.f90:15)
==343772==    by 0x118C02: clawpack5_check (fc2d_clawpack5_options.c:107)
==343772==    by 0x118E4F: options_check (fc2d_clawpack5_options.c:177)
==343772==    by 0x139737: fclaw_app_options_parse (fclaw_base.c:530)
==343772==    by 0x10CC89: main (swirl.cpp:170)
donnaaboise commented 2 years ago

Very interesting. So there is something the claw5 options. I'll check.

cburstedde commented 2 years ago

Very interesting. Do you see the same thing with --user:claw-version=4 ?

Yes, it's still related to clawpack5

by 0x11BCF9: clawpack5_set_amr_module_ (clawpack5_set_amr_module.f90:15)
by 0x118B42: clawpack5_check (fc2d_clawpack5_options.c:107)
by 0x118D8F: options_check (fc2d_clawpack5_options.c:177)
cburstedde commented 2 years ago

Seems fixed!