|
From: Matthew B. <ma...@ma...> - 2004-01-15 14:26:57
|
I have a problem I am trying to debug via valgrind and I am seeing something really odd. I am getting a read from uninit error. ==11800== Use of uninitialised value of size 4 ==11800== at 0x80A6931: AddTemperature (c_part.c:2518) Looking at that line u->x += v_thermal*nu1*sqrt(-log(R2)/R2); I thought I would figure out which var is causing the problem, so I did this fubar = v_thermal; fubar *= nu1; fubar *=R2; fubar = u->x; fubar = v_thermal*nu1*sqrt(-log(R2)/R2); None of these report uninited vars. so I am guessing there is something odd happening with valgrind. I have compiled the code as follows mpicc -I/usr/local/mpich/include -I../mp -DLINUX -DMPICH -DBITFLAGS -g -Wimplicit -Wall -pedantic -Wno-long-long -c -o VT.o VT.c So, the compiler shouldn't be cutting out the useless code. I have tried this with both the 2.0.0 and 2.1.0 versions and get the same result. Any ideas would be helpful.. Thanks matt |