Re: [Valgrind-users] New User. Probably a Simple User Error...

2016-07-16 Thread Trey Boudreau
> On Jul 15, 2016, at 12:38 , James Orr wrote: > > Hi all. > > I'm a relatively novice Valgrind user. I've used it in the past to ensure > that my code has no memory leaks, but that's about it. Now I suspect that > there is a memory stomp on an environment variable somewhere in my fairly > c

Re: [Valgrind-users] New User. Probably a Simple User Error...

2016-07-15 Thread John Reiser
To see if the environment is correct at the beginning of each process: strace -f -o strace.out -e trace=execve -v -s 500 my_executable my_args... You might also look at "ltrace" and filter to select only getenv() and putenv(). https://en.wikipedia.org/wiki/Ltrace To provide some additio

Re: [Valgrind-users] New User. Probably a Simple User Error...

2016-07-15 Thread James Orr
Thanks for the response Trey. What I'm really wanting to do is monitor the environment variable OMP_NUM_THREADS. One of the third-party libraries calls it to see how many threads it should spawn, but on any given run it may return the correct number or 1. We're suspecting one of the programs is som

[Valgrind-users] New User. Probably a Simple User Error...

2016-07-15 Thread James Orr
Hi all. I'm a relatively novice Valgrind user. I've used it in the past to ensure that my code has no memory leaks, but that's about it. Now I suspect that there is a memory stomp on an environment variable somewhere in my fairly complex multi-threaded program that spawns different processes and m