BlueBrain / CoreNeuron

Simulator optimized for large scale neural network simulations.
BSD 3-Clause "New" or "Revised" License
135 stars 39 forks source link

Fix memory leaks reported by valgrind #309

Open pramodk opened 4 years ago

pramodk commented 4 years ago

While running valgrind memory checks, I see following possible leaks:

mpirun -n 1 /gpfs/bbp.cscs.ch/ssd/apps/hpc/jenkins/deploy/tools/2020-02-01/linux-rhel7-x86_64/gcc-8.3.0/valgrind-3.15.0-wnjdwmga6k/bin/valgrind --leak-check=full bin/x86_64/special-core -e 100 -d ../tests/integration/ring --mpi --ms-phases 2 --ms-subintervals 2 --cell-permute 2
==185751== Memcheck, a memory error detector
==185751== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==185751== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==185751== Command: bin/x86_64/special-core -e 100 -d ../tests/integration/ring --mpi --ms-phases 2 --ms-subintervals 2 --cell-permute 2
==185751==
==185751== Warning: set address range perms: large range [0x93f1000, 0x1b8ea000) (defined)
==185751== Warning: set address range perms: large range [0x1b8ea000, 0x2dde3000) (defined)
 num_mpi=1
 num_omp_thread=1

....

 Simulation Statistics
 Number of cells: 20
 Number of compartments: 804
 Number of presyns: 21
 Number of input presyns: 0
 Number of synapses: 21
 Number of point processes: 41
 Number of transfer (gap) targets: 0
 Number of spikes: 37
 Number of spikes with non negative gid-s: 37

==185751== Warning: set address range perms: large range [0x1b8ea000, 0x2dde3000) (noaccess)
==185751== Warning: set address range perms: large range [0x93f1000, 0x1b8ea000) (noaccess)
==185751==
==185751== HEAP SUMMARY:
==185751==     in use at exit: 62,170 bytes in 132 blocks
==185751==   total heap usage: 25,772 allocs, 25,640 frees, 6,588,192 bytes allocated
==185751==
==185751== 8 bytes in 1 blocks are definitely lost in loss record 18 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x52AA9FA: coreneuron::_stim_reg() (stim.cpp:260)
==185751==    by 0x5229216: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:192)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 8 bytes in 1 blocks are definitely lost in loss record 19 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x52A32EE: coreneuron::_expsyn_reg() (expsyn.cpp:277)
==185751==    by 0x5229216: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:192)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 8 bytes in 1 blocks are definitely lost in loss record 20 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x52A44BA: coreneuron::_exp2syn_reg() (exp2syn.cpp:292)
==185751==    by 0x5229216: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:192)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 8 bytes in 1 blocks are definitely lost in loss record 21 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x4E67B4A: coreneuron::_halfgap_reg() (halfgap.cpp:254)
==185751==    by 0x4E6782F: coreneuron::modl_reg() (_mod_func.cpp:14)
==185751==    by 0x4E676B9: solve_core (enginemech.cpp:39)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 8 bytes in 2 blocks are definitely lost in loss record 22 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x525D211: coreneuron::ion_reg(char const*, double) (eion.cpp:140)
==185751==    by 0x52290EA: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:175)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 16 bytes in 1 blocks are definitely lost in loss record 28 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x52A7E9C: coreneuron::_netstim_reg() (netstim.cpp:300)
==185751==    by 0x5229216: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:192)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 24 bytes in 1 blocks are definitely lost in loss record 30 of 77
==185751==    at 0x4C3FA52: calloc (vg_replace_malloc.c:762)
==185751==    by 0x529FC26: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==185751==    by 0x5263A0C: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==185751==    by 0x52A5D82: coreneuron::_hh_reg() (hh.cpp:312)
==185751==    by 0x5229216: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:192)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==

==185751==
==185751== 202 bytes in 23 blocks are definitely lost in loss record 59 of 77
==185751==    at 0x4C3D803: malloc (vg_replace_malloc.c:309)
==185751==    by 0x699E249: strdup (in /usr/lib64/libc-2.17.so)
==185751==    by 0x5228F31: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:161)
==185751==    by 0x5228892: coreneuron::mk_mech(char const*) (mk_mech.cpp:99)
==185751==    by 0x5222960: mk_mech_init (main1.cpp:430)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 644 (288 direct, 356 indirect) bytes in 1 blocks are definitely lost in loss record 65 of 77
==185751==    at 0x4C3D803: malloc (vg_replace_malloc.c:309)
==185751==    by 0x57C48C6: ompi_datatype_create (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57C5157: ompi_datatype_create_struct (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57F4442: PMPI_Type_create_struct (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x526C8E7: coreneuron::make_spike_type() (mpispike.cpp:72)
==185751==    by 0x526C917: coreneuron::nrnmpi_spike_initialize() (mpispike.cpp:79)
==185751==    by 0x526E2AF: coreneuron::nrnmpi_init(int, int*, char***) (nrnmpi.cpp:119)
==185751==    by 0x522287A: mk_mech_init (main1.cpp:411)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 1,344 bytes in 1 blocks are definitely lost in loss record 70 of 77
==185751==    at 0x4C3D803: malloc (vg_replace_malloc.c:309)
==185751==    by 0x57B133F: ompi_op_create_user (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57E8728: PMPI_Op_create (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x526C90B: coreneuron::make_spike_type() (mpispike.cpp:75)
==185751==    by 0x526C917: coreneuron::nrnmpi_spike_initialize() (mpispike.cpp:79)
==185751==    by 0x526E2AF: coreneuron::nrnmpi_init(int, int*, char***) (nrnmpi.cpp:119)
==185751==    by 0x522287A: mk_mech_init (main1.cpp:411)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 1,448 (72 direct, 1,376 indirect) bytes in 1 blocks are definitely lost in loss record 71 of 77
==185751==    at 0x4C3D803: malloc (vg_replace_malloc.c:309)
==185751==    by 0x57973A3: ompi_comm_set_nb (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57975F6: ompi_comm_set (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57976A7: ompi_comm_dup_with_info (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57D083F: PMPI_Comm_dup (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x526E12A: coreneuron::nrnmpi_init(int, int*, char***) (nrnmpi.cpp:112)
==185751==    by 0x522287A: mk_mech_init (main1.cpp:411)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 1,448 (72 direct, 1,376 indirect) bytes in 1 blocks are definitely lost in loss record 72 of 77
==185751==    at 0x4C3D803: malloc (vg_replace_malloc.c:309)
==185751==    by 0x57973A3: ompi_comm_set_nb (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57975F6: ompi_comm_set (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57976A7: ompi_comm_dup_with_info (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57D083F: PMPI_Comm_dup (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x526E16E: coreneuron::nrnmpi_init(int, int*, char***) (nrnmpi.cpp:113)
==185751==    by 0x522287A: mk_mech_init (main1.cpp:411)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== 1,448 (72 direct, 1,376 indirect) bytes in 1 blocks are definitely lost in loss record 73 of 77
==185751==    at 0x4C3D803: malloc (vg_replace_malloc.c:309)
==185751==    by 0x57973A3: ompi_comm_set_nb (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57975F6: ompi_comm_set (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57976A7: ompi_comm_dup_with_info (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x57D083F: PMPI_Comm_dup (in /gpfs/bbp.cscs.ch/project/proj16/kumbhar/pramod_scratch/soft/install/linux-rhel7-x86_64/gcc-8.3.0/openmpi-4.0.0-voln3w/lib/libmpi.so.40.20.0)
==185751==    by 0x526E1B2: coreneuron::nrnmpi_init(int, int*, char***) (nrnmpi.cpp:114)
==185751==    by 0x522287A: mk_mech_init (main1.cpp:411)
==185751==    by 0x4E676B4: solve_core (enginemech.cpp:38)
==185751==    by 0x4007BE: main (coreneuron.cpp:34)
==185751==
==185751== LEAK SUMMARY:
==185751==    definitely lost: 2,514 bytes in 42 blocks
==185751==    indirectly lost: 4,484 bytes in 24 blocks
==185751==      possibly lost: 0 bytes in 0 blocks
==185751==    still reachable: 55,172 bytes in 66 blocks
==185751==                       of which reachable via heuristic:
==185751==                         newarray           : 392 bytes in 3 blocks
==185751==         suppressed: 0 bytes in 0 blocks
==185751== Reachable blocks (those to which a pointer was found) are not shown.
==185751== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==185751==
==185751== For lists of detected and suppressed errors, rerun with: -s
==185751== ERROR SUMMARY: 19 errors from 19 contexts (suppressed: 0 from 0)
alkino commented 4 years ago

Updated on master today.

==162852== HEAP SUMMARY:
==162852==     in use at exit: 63,128 bytes in 140 blocks
==162852==   total heap usage: 25,817 allocs, 25,677 frees, 6,647,505 bytes allocated
==162852==
==162852== 1 bytes in 1 blocks are definitely lost in loss record 1 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x4EBFB4E: strdup (in /usr/lib/libc-2.32.so)
==162852==    by 0x9389E06: ???
==162852==    by 0x9383190: ???
==162852==    by 0x5106ABF: mca_base_framework_components_register (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x5106EA1: mca_base_framework_register (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x5106EE0: mca_base_framework_open (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x4A40AA0: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x48E736C: coreneuron::nrnmpi_init(int*, char***) (nrnmpi.cpp:69)
==162852==    by 0x48BA85E: mk_mech_init (main1.cpp:437)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 17 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10ECB6: coreneuron::_stim_reg() (stim.cpp:260)
==162852==    by 0x48BF679: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:152)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 18 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10C60A: coreneuron::_expsyn_reg() (expsyn.cpp:277)
==162852==    by 0x48BF679: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:152)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 19 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10BFE8: coreneuron::_exp2syn_reg() (exp2syn.cpp:292)
==162852==    by 0x48BF679: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:152)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 20 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10F2E6: coreneuron::_svclmp_reg() (svclmp.cpp:292)
==162852==    by 0x48BF679: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:152)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 21 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10BFE8: coreneuron::_exp2syn_reg() (exp2syn.cpp:292)
==162852==    by 0x10B6CF: coreneuron::modl_reg() (_mod_func.cpp:30)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 22 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10C60A: coreneuron::_expsyn_reg() (expsyn.cpp:277)
==162852==    by 0x10B6D4: coreneuron::modl_reg() (_mod_func.cpp:31)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 23 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10C8B6: coreneuron::_halfgap_reg() (halfgap.cpp:254)
==162852==    by 0x10B6D9: coreneuron::modl_reg() (_mod_func.cpp:32)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 24 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10ECB6: coreneuron::_stim_reg() (stim.cpp:260)
==162852==    by 0x10B6F2: coreneuron::modl_reg() (_mod_func.cpp:37)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 1 blocks are definitely lost in loss record 25 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10F2E6: coreneuron::_svclmp_reg() (svclmp.cpp:292)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 8 bytes in 2 blocks are definitely lost in loss record 26 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x48E121F: coreneuron::ion_reg(char const*, double) (eion.cpp:140)
==162852==    by 0x48BF61E: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:135)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 16 bytes in 1 blocks are definitely lost in loss record 34 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10E1C1: coreneuron::_netstim_reg() (netstim.cpp:300)
==162852==    by 0x48BF679: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:152)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 16 bytes in 1 blocks are definitely lost in loss record 35 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10E1C1: coreneuron::_netstim_reg() (netstim.cpp:300)
==162852==    by 0x10B6E3: coreneuron::modl_reg() (_mod_func.cpp:34)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 16 bytes in 1 blocks are definitely lost in loss record 36 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10E7F1: coreneuron::_pattern_reg() (pattern.cpp:268)
==162852==    by 0x10B6ED: coreneuron::modl_reg() (_mod_func.cpp:36)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 24 bytes in 1 blocks are definitely lost in loss record 38 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10D5B8: coreneuron::_hh_reg() (hh.cpp:312)
==162852==    by 0x48BF679: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:152)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 24 bytes in 1 blocks are definitely lost in loss record 39 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x4901B3D: coreneuron::ecalloc(unsigned long, unsigned long) (nrnoc_aux.cpp:107)
==162852==    by 0x48E3DD3: coreneuron::hoc_register_prop_size(int, int, int) (register_mech.cpp:233)
==162852==    by 0x10D5B8: coreneuron::_hh_reg() (hh.cpp:312)
==162852==    by 0x10B6DE: coreneuron::modl_reg() (_mod_func.cpp:33)
==162852==    by 0x10B5A5: solve_core (enginemech.cpp:41)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 32 bytes in 1 blocks are definitely lost in loss record 42 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x6042CF6: ???
==162852==    by 0x604490F: ???
==162852==    by 0x6063289: ???
==162852==    by 0x5F5A5CE: ???
==162852==    by 0x5F5C559: ???
==162852==    by 0x5F5D3C6: ???
==162852==    by 0x5F2339D: ???
==162852==    by 0x4959720: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x4A40664: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==
==162852== 32 bytes in 1 blocks are definitely lost in loss record 43 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x6042CF6: ???
==162852==    by 0x604490F: ???
==162852==    by 0x6063289: ???
==162852==    by 0x5F5A5CE: ???
==162852==    by 0x5F5C559: ???
==162852==    by 0x5F5D3C6: ???
==162852==    by 0x5F2339D: ???
==162852==    by 0x4959887: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x4A40664: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==
==162852== 32 bytes in 1 blocks are definitely lost in loss record 44 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x6042CF6: ???
==162852==    by 0x604490F: ???
==162852==    by 0x6063289: ???
==162852==    by 0x5F5A5CE: ???
==162852==    by 0x5F5C559: ???
==162852==    by 0x5F5D3C6: ???
==162852==    by 0x5F2339D: ???
==162852==    by 0x4959913: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x4A40664: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==
==162852== 34 (32 direct, 2 indirect) bytes in 1 blocks are definitely lost in loss record 45 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x604FBBA: ???
==162852==    by 0x605B91F: ???
==162852==    by 0x5F58FE0: ???
==162852==    by 0x5FCE1A2: ???
==162852==    by 0x5121371: opal_libevent2022_event_base_loop (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x5F91FEE: ???
==162852==    by 0x4E173E8: start_thread (in /usr/lib/libpthread-2.32.so)
==162852==    by 0x4F30292: clone (in /usr/lib/libc-2.32.so)
==162852==
==162852== 40 bytes in 1 blocks are definitely lost in loss record 49 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x718425C: ???
==162852==    by 0x7183438: ???
==162852==    by 0x71166C9: ???
==162852==    by 0x7111A7A: ???
==162852==    by 0x70A8022: ???
==162852==    by 0x51C5940: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51B8D74: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51310CC: opal_hwloc_base_get_topology (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x504B675: orte_ess_base_proc_binding (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x495A86B: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==
==162852== 40 bytes in 1 blocks are definitely lost in loss record 50 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x718425C: ???
==162852==    by 0x7140CEC: ???
==162852==    by 0x71166EA: ???
==162852==    by 0x7111A7A: ???
==162852==    by 0x70A8022: ???
==162852==    by 0x51C5940: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51B8D74: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51310CC: opal_hwloc_base_get_topology (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x504B675: orte_ess_base_proc_binding (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x495A86B: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==
==162852== 40 (32 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record 51 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x6042CF6: ???
==162852==    by 0x604490F: ???
==162852==    by 0x6063289: ???
==162852==    by 0x5F5A5CE: ???
==162852==    by 0x5F5C559: ???
==162852==    by 0x5F5D3C6: ???
==162852==    by 0x5F23532: ???
==162852==    by 0x4993CA8: ompi_comm_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x4A40CCB: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x48E736C: coreneuron::nrnmpi_init(int*, char***) (nrnmpi.cpp:69)
==162852==
==162852== 79 (64 direct, 15 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x70BEC91: ???
==162852==    by 0x50FD309: mca_base_framework_components_open (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x5134292: ??? (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x5106F36: mca_base_framework_open (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x4A40A3E: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x48E736C: coreneuron::nrnmpi_init(int*, char***) (nrnmpi.cpp:69)
==162852==    by 0x48BA85E: mk_mech_init (main1.cpp:437)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 88 (24 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 73 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x51BA89C: hwloc_bitmap_alloc (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x504B95C: orte_ess_base_proc_binding (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x495A86B: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x4A40664: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x49E1678: PMPI_Init_thread (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==    by 0x48E736C: coreneuron::nrnmpi_init(int*, char***) (nrnmpi.cpp:69)
==162852==    by 0x48BA85E: mk_mech_init (main1.cpp:437)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 104 bytes in 1 blocks are definitely lost in loss record 77 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x718432C: ???
==162852==    by 0x71D48F4: ???
==162852==    by 0x4E1F18E: __pthread_once_slow (in /usr/lib/libpthread-2.32.so)
==162852==    by 0x7184580: ???
==162852==    by 0x7183B48: ???
==162852==    by 0x71166CE: ???
==162852==    by 0x7111A7A: ???
==162852==    by 0x70A8022: ???
==162852==    by 0x51C5940: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51B8D74: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51310CC: opal_hwloc_base_get_topology (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==
==162852== 202 bytes in 23 blocks are definitely lost in loss record 87 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x4EBFB4E: strdup (in /usr/lib/libc-2.32.so)
==162852==    by 0x48BF374: coreneuron::mk_mech(std::istream&) (mk_mech.cpp:121)
==162852==    by 0x48BFC59: coreneuron::mk_mech(char const*) (mk_mech.cpp:81)
==162852==    by 0x48BA7ED: mk_mech_init (main1.cpp:455)
==162852==    by 0x10B5A0: solve_core (enginemech.cpp:40)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
==162852==
==162852== 708 (64 direct, 644 indirect) bytes in 1 blocks are definitely lost in loss record 90 of 99
==162852==    at 0x483CEB8: memalign (vg_replace_malloc.c:906)
==162852==    by 0x483CFEE: posix_memalign (vg_replace_malloc.c:1070)
==162852==    by 0x48D30A0: alloc_memory (memory.h:109)
==162852==    by 0x48D30A0: calloc_memory (memory.h:114)
==162852==    by 0x48D30A0: ecalloc_align (memory.h:163)
==162852==    by 0x48D30A0: coreneuron::Phase2::set_net_send_buffer(coreneuron::Memb_list**, std::vector<int, std::allocator<int> > const&) (phase2.cpp:442)
==162852==    by 0x48D5826: coreneuron::Phase2::populate(coreneuron::NrnThread&, coreneuron::UserParams const&) (phase2.cpp:1185)
==162852==    by 0x48C9A9A: coreneuron::read_phase2(coreneuron::NrnThread&, coreneuron::UserParams&) (nrn_setup.cpp:883)
==162852==    by 0x48CC772: read_phase_aux<(coreneuron::coreneuron::phase)2> (nrn_setup.hpp:95)
==162852==    by 0x48CC772: void* coreneuron::coreneuron::phase_wrapper_w<(coreneuron::coreneuron::phase)2>(coreneuron::NrnThread*, coreneuron::UserParams&, bool) (nrn_setup.hpp:133)
==162852==    by 0x48C71C8: void coreneuron::nrn_multithread_job<void* (&)(coreneuron::NrnThread*, coreneuron::UserParams&, bool), coreneuron::UserParams&, bool>(void* (&)(coreneuron::NrnThread*, coreneuron::UserParams&, bool), coreneuron::UserParams&, bool&&) [clone ._omp_fn.0] (multicore.hpp:170)
==162852==    by 0x4DC36B5: GOMP_parallel (parallel.c:171)
==162852==    by 0x48CAFC8: nrn_multithread_job<void* (&)(coreneuron::NrnThread*, coreneuron::UserParams&, bool), coreneuron::UserParams&, bool> (multicore.hpp:167)
==162852==    by 0x48CAFC8: phase_wrapper<(coreneuron::coreneuron::phase)2> (nrn_setup.hpp:147)
==162852==    by 0x48CAFC8: coreneuron::nrn_setup(char const*, bool, bool, char const*, char const*, double*) (nrn_setup.cpp:519)
==162852==    by 0x48B8D37: coreneuron::nrn_init_and_load_data(int, char**, bool, bool) (main1.cpp:253)
==162852==    by 0x48BA9DD: run_solve_core (main1.cpp:485)
==162852==    by 0x10B5AF: solve_core (enginemech.cpp:42)
==162852==
==162852== 708 (64 direct, 644 indirect) bytes in 1 blocks are definitely lost in loss record 91 of 99
==162852==    at 0x483CEB8: memalign (vg_replace_malloc.c:906)
==162852==    by 0x483CFEE: posix_memalign (vg_replace_malloc.c:1070)
==162852==    by 0x48D30A0: alloc_memory (memory.h:109)
==162852==    by 0x48D30A0: calloc_memory (memory.h:114)
==162852==    by 0x48D30A0: ecalloc_align (memory.h:163)
==162852==    by 0x48D30A0: coreneuron::Phase2::set_net_send_buffer(coreneuron::Memb_list**, std::vector<int, std::allocator<int> > const&) (phase2.cpp:442)
==162852==    by 0x48D5826: coreneuron::Phase2::populate(coreneuron::NrnThread&, coreneuron::UserParams const&) (phase2.cpp:1185)
==162852==    by 0x48C9A9A: coreneuron::read_phase2(coreneuron::NrnThread&, coreneuron::UserParams&) (nrn_setup.cpp:883)
==162852==    by 0x48CC772: read_phase_aux<(coreneuron::coreneuron::phase)2> (nrn_setup.hpp:95)
==162852==    by 0x48CC772: void* coreneuron::coreneuron::phase_wrapper_w<(coreneuron::coreneuron::phase)2>(coreneuron::NrnThread*, coreneuron::UserParams&, bool) (nrn_setup.hpp:133)
==162852==    by 0x48C71C8: void coreneuron::nrn_multithread_job<void* (&)(coreneuron::NrnThread*, coreneuron::UserParams&, bool), coreneuron::UserParams&, bool>(void* (&)(coreneuron::NrnThread*, coreneuron::UserParams&, bool), coreneuron::UserParams&, bool&&) [clone ._omp_fn.0] (multicore.hpp:170)
==162852==    by 0x4DCB3ED: gomp_thread_start (team.c:123)
==162852==    by 0x4E173E8: start_thread (in /usr/lib/libpthread-2.32.so)
==162852==    by 0x4F30292: clone (in /usr/lib/libc-2.32.so)
==162852==
==162852== 910 (400 direct, 510 indirect) bytes in 1 blocks are definitely lost in loss record 92 of 99
==162852==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==162852==    by 0x710DDA1: ???
==162852==    by 0x71166F4: ???
==162852==    by 0x7111A7A: ???
==162852==    by 0x70A8022: ???
==162852==    by 0x51C5940: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51B8D74: ??? (in /usr/lib/libhwloc.so.15.2.0)
==162852==    by 0x51310CC: opal_hwloc_base_get_topology (in /usr/lib/openmpi/libopen-pal.so.40.20.5)
==162852==    by 0x504B675: orte_ess_base_proc_binding (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x495A86B: ???
==162852==    by 0x5081BC3: orte_init (in /usr/lib/openmpi/libopen-rte.so.40.20.5)
==162852==    by 0x4A40664: ompi_mpi_init (in /usr/lib/openmpi/libmpi.so.40.20.5)
==162852==
==162852== 2,240 bytes in 7 blocks are possibly lost in loss record 96 of 99
==162852==    at 0x483CB65: calloc (vg_replace_malloc.c:760)
==162852==    by 0x40142EB: _dl_allocate_tls (in /usr/lib/ld-2.32.so)
==162852==    by 0x4E1813C: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==162852==    by 0x4DCBA0B: gomp_team_start (team.c:839)
==162852==    by 0x4DC36B0: GOMP_parallel (parallel.c:169)
==162852==    by 0x48CB21B: nrn_multithread_job<void* (&)(coreneuron::NrnThread*, coreneuron::UserParams&, bool), coreneuron::UserParams&, bool> (multicore.hpp:167)
==162852==    by 0x48CB21B: phase_wrapper<(coreneuron::coreneuron::phase)1> (nrn_setup.hpp:147)
==162852==    by 0x48CB21B: coreneuron::nrn_setup(char const*, bool, bool, char const*, char const*, double*) (nrn_setup.cpp:501)
==162852==    by 0x48B8D37: coreneuron::nrn_init_and_load_data(int, char**, bool, bool) (main1.cpp:253)
==162852==    by 0x48BA9DD: run_solve_core (main1.cpp:485)
==162852==    by 0x10B5AF: solve_core (enginemech.cpp:42)
==162852==    by 0x4E58151: (below main) (in /usr/lib/libc-2.32.so)
alkino commented 4 years ago

Most of them are part of corenrn that is a global structure of type CoreNeuron. We allocate some of the fields, so when at the end of the executable corenrn is destroyed, we lost the allocation.

We can't do nothing on that right now, I guess.

pramodk commented 4 years ago

We can't do nothing on that right now, I guess.

@alkino : coreneuron is launched in two ways : 1. called via neuron 2. launched directly via special-core

In case of 1.), at the moment, it's not straightforward to clean corenrn structure because CoreNEURON is called multiple times and we register mechanism only once. In this case we don't know when is the last call and hence can't free it right away. (NOTE: corenrn_embedded is true when CoreNEURON is executed in this mode).

In case of 2.), we should be able to free whole corenrn struct at the end of execution?

pramodk commented 3 years ago

@alkino : you need anything here? You can identify 1) by checking corenrn_embedded flag. If it's true then CoreNEURON is launched via NEURON.