Dear scalapack developers,
we regularly run our code under valgrind's tool 'memcheck' to find uninitialized variables and other coding issues. A number of the errors flagged by valgrind trace back to scalapack, and also happen running just examples from scalapack's test directories. An example would be:
scalapack_installer_0.9/build/scalapack-1.8.0/TESTING> mpirun -np 4 valgrind --tool=memcheck ./xzevc
==25001== Conditional jump or move depends on uninitialised value(s)
==25001== at 0x4841BD: dgamx2d_ (dgamx2d_.c:134)
==25001== by 0x4132E4: pdlamch_ (pdlamch.f:71)
==25001== by 0x408E2E: pzevcinfo_ (pzevcinfo.f:321)
==25001== by 0x4030AF: MAIN_ (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25001== by 0x510AED: main (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25000== Conditional jump or move depends on uninitialised value(s)
==25000== at 0x4841BD: dgamx2d_ (dgamx2d_.c:134)
==25000== by 0x4132E4: pdlamch_ (pdlamch.f:71)
==25000== ==25002== Conditional jump or move depends on uninitialised value(s)
by 0x408E2E: pzevcinfo_ (pzevcinfo.f:321)
==25000== by 0x4030AF: MAIN_ (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25000== by 0x510AED: main (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25002== at 0x4841BD: dgamx2d_ (dgamx2d_.c:134)
==25002== by 0x4132E4: pdlamch_ (pdlamch.f:71)
==25002== by 0x4077C6: pzevcinfo_ (pzevcinfo.f:221)
==25002== by 0x4030AF: MAIN_ (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25002== by 0x510AED: main (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25003== Conditional jump or move depends on uninitialised value(s)
==25003== at 0x4841BD: dgamx2d_ (dgamx2d_.c:134)
==25003== by 0x4132E4: pdlamch_ (pdlamch.f:71)
==25003== by 0x408E2E: pzevcinfo_ (pzevcinfo.f:321)
==25003== by 0x4030AF: MAIN_ (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
==25003== by 0x510AED: main (in /data03/vondele/scalapack/scalapack_installer_0.9/build/scalapack-1.8.0/TESTING/xzevc)
using a scalapack build as (the installer is great btw!) using a g95 based mpif90:
./setup.py --downblas --downblacs --downlapack --fcflags='-g' --noopt='-g' --ccflags='-g'
While some of the issues might be not so important, others maybe are. I'm wondering if there are any fixes for these errors in SVN scalapack, or if there is an interest in patches? As you can see it is quite straightforward to reproduce.
For example for the first error, valgrind points out that :
if (Mpval(cdest) == -1) trdest = -1;
else trdest = Mpval(rdest);
uses an undefined variable, and indeed the 'cdest' seems to be passed as an uninitialized 'idumm' from PDLAMCH (which I guess could lead to an out of bounds error).

