LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Geoffrey Irving (irving_at_[hidden])
Date: 2005-11-21 11:29:52


Hello,

Compiling a program using the LAM C++ wrapper classes with gcc 4.0.1 -Wall
produces a ton of warnings like this:

/solver/adm/lam/include/mpi2cxx/pcomm.h:53: warning: ‘class PMPI::Comm’ has virtual functions but non-virtual destructor
/solver/adm/lam/include/mpi2cxx/ptopology.h:64: warning: ‘class PMPI::Graphcomm’ has virtual functions but non-virtual destructor
/solver/adm/lam/include/mpi2cxx/intercomm.h:20: warning: ‘class MPI::Intercomm’ has virtual functions but non-virtual destructor
...

The MPI-2 standard appears to specify that destructors should be virtual:

  10.1.4: Except where indicated, all non-static member functions (except
          for constructors and the assignment operator) of MPI member
          classes are virtual functions.

The C++ wrapper classes all have commented out virtual destructors. Is
there a particular reason these were all commented out?

I'll go ahead and remove these warnings and any other ones I come across,
and would be happy to submit a patch if you'd like.

Thanks,
Geoffrey