> std::cout <<"Some string" << std::endl;
> in the region where the computation is written, my code does not work.
Then you have an actual bug (a fairly nasty one).
Adding a cout like that should not cause a change of behaviour in the rest of the program.
TBH, you need to take that line out and try to find the problem(s).
Not leave it in and cross your fingers.
You also need to define "does not work".
- fails completely - ie crashes
- just produces the wrong answers.
> but how does one go about parsing through all of this information?
Start at the top and work your way down.
This is your first problem.
vex amd64->IR: unhandled instruction bytes: 0x62 0xF1 0xFD 0x8 0x6F 0x55 0x0 0x62 0xF1 0xFD
vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
==992550== valgrind: Unrecognised instruction at address 0x40834e.
==992550== Either way, Valgrind will now raise a SIGILL signal which will
==992550== probably kill your program.
==992550== Process terminating with default action of signal 4 (SIGILL)
==992550== Illegal opcode at address 0x40834E
==992550== at 0x40834E: construct<std::pair<int const, std::array<double, 3> >, const std::pair<int const, std::array<double, 3> >&> (new:169)
==992550== by 0x40834E: _M_insert_unique<const std::pair<int const, std::array<double, 3> >*> (stl_tree.h:2475)
==992550== by 0x40834E: map (stl_map.h:230)
==992550== by 0x40834E: __static_initialization_and_destruction_0(int, int) [clone .constprop.1147] (misc.cpp:40)
==992550== by 0x4473EC: __libc_csu_init (in /scratch/gpfs/satyend/MC_POLYMER/polymer_lattice/lattice_md/current/Explicit_Solvation/src/vanilla_hamiltonian/appropriately_biased_cosolvent/src/serial/cosolv_ani)
==992550== by 0x5E33C7D: (below main) (in /usr/lib64/libc-2.28.so)
It's still in the phase of initialising your global objects (that's the static_initialization_and_destruction part). It hasn't reached the beginning of main() yet.
That it died due to illegal instructions is a problem. Mostly you would see this by trying to call via an uninitialised function pointer. But the stack trace to the SIGILL is deep inside the ctor for STL map.
I would definitely take '-march=native' out of the compilation command line, because of this.
> ==992550== 2. The instruction is legitimate but Valgrind doesn't handle it,
Then try a valgrind again, to see if the program runs to completion and produces the output you expect, in addition to the valgrind report.
NB for later readers.
Expires in: 17 hours, 12 minutes
So if you're reading this after today (22/09/2022), the link is likely dead.