Thanks in advance for any help.
I am running a fairly good-sized MPI-C++ code, and I am getting a frustratingly unreproducible segfault. I am also having trouble with gdb (I think because of my MPI implementation), but I think the problem may have something to do with the fact that my argc variable (I have three command-line arguments) is constantly changing, according to gdb, at different places in the code. It is sometimes a huge number, sometimes negative, and sometimes I get 'argc=Cannot access . . . .'
This is wrong, isn't it? argc should be constant as the code runs, and should be equal to the number of arguments I'm passing over the command line, correct? If so, any idea about what is changing it?
Just a 'yes' or 'no' answer to the first of those two questions will do for now. I appreciate the help.