Valgrind complains prolifically
I ran Valgrind on my wedge_metis
branch to track down a memory corruption issue I encountered (now fixed). In doing so I found a myriad of complaints (from the start) from Valgrid along the lines of:
==92633== Conditional jump or move depends on uninitialised value(s)
==92633== at 0x4A951B: parser_set_param (parser.c:229)
==92633== by 0x4A951B: save_param_double (parser.c:618)
==92633== by 0x4A951B: parser_get_opt_param_double (parser.c:778)
==92633== by 0x4DC14A: cosmology_init (cosmology.c:840)
==92633== by 0x41EEB5: main (swift.c:1028)
==92633==
==92633== Conditional jump or move depends on uninitialised value(s)
==92633== at 0x4A7CD2: parser_set_param (parser.c:229)
==92633== by 0x4A7CD2: save_param_int (parser.c:616)
==92633== by 0x4A7CD2: parser_get_opt_param_int (parser.c:727)
==92633== by 0x4DC162: cosmology_init (cosmology.c:841)
==92633== by 0x41EEB5: main (swift.c:1028)
==92633==
==92633== Conditional jump or move depends on uninitialised value(s)
==92633== at 0x5F49B2: __intel_sse4_strcpy (in /snap8/scratch/dp004/dc-rope1/SWIFT/swiftsim/swift_mpi)
==92633== by 0x4A7FDB: parser_set_param (parser.c:262)
==92633== by 0x4A7FDB: save_param_int (parser.c:616)
==92633== by 0x4A7FDB: parser_get_opt_param_int (parser.c:727)
==92633== by 0x4DC162: cosmology_init (cosmology.c:841)
==92633== by 0x41EEB5: main (swift.c:1028)
These appear in essentially every corner of the code. To the point Valgrind eventually gives up and simply states:
==11216== More than 10000000 total errors detected. I'm not reporting any more.
==11216== Final error counts will be inaccurate. Go fix your program!
==11216== Rerun with --error-limit=no to disable this cutoff. Note
==11216== that errors may occur in your program without prior warning from
==11216== Valgrind, because errors are no longer being displayed.
I don't think the specifics of the run matter but this was a FLARES region run over 4 ranks with 32 threads per rank and --interleave -v 1 --pin --cosmology --self-gravity
.
I configured with: --with-parmetis --enable-zoom-region --enable-task-debugging --enable-threadpool-debugging --enable-debug
Note that it also complained about the internals of Parmetis.