InstallPetscAndMpi: mpi.patch

File mpi.patch, 4.9 KB (added by jonathan.cooper@…, 15 years ago)

Patch to remove compiler warnings from MPI C++ interface

  • include/mpi2c++/comm.h

    diff -urN mpi-orig/include/mpi2c++/comm.h mpi/include/mpi2c++/comm.h
    old new  
    126126  // copy
    127127  Comm(const Comm_Null& data) : Comm_Null(data) { }
    128128
     129  //CHASTE: we added this virtual destructor to remove warnings
     130  virtual ~Comm() { }
     131
     132
     133
    129134#if _MPIPP_PROFILING_
    130135  // WDG - The base constructure should come first (g++ complains)
    131136  Comm(const Comm& data) : Comm_Null(data), pmpi_comm((const PMPI::Comm&) data)  { }
  • include/mpi2c++/intercomm.h

    diff -urN mpi-orig/include/mpi2c++/intercomm.h mpi/include/mpi2c++/intercomm.h
    old new  
    4141  // inter-language operability
    4242  Intercomm(const MPI_Comm& data) : Comm(data) { }
    4343
     44  //CHASTE: we added this virtual destructor to remove warnings
     45  virtual ~Intercomm() { }
     46
     47
    4448#if _MPIPP_PROFILING_
    4549  // copy
    4650  Intercomm(const Intercomm& data) : Comm(data), pmpi_comm(data.pmpi_comm) { }
  • include/mpi2c++/intracomm.h

    diff -urN mpi-orig/include/mpi2c++/intracomm.h mpi/include/mpi2c++/intracomm.h
    old new  
    8787
    8888#endif
    8989
     90  //CHASTE: we added this virtual destructor to remove warnings
     91  virtual ~Intracomm() { }
     92
     93
    9094  //
    9195  // Collective Communication
    9296  //
  • include/mpi2c++/pcomm.h

    diff -urN mpi-orig/include/mpi2c++/pcomm.h mpi/include/mpi2c++/pcomm.h
    old new  
    8282  Comm(const Comm_Null& data) : Comm_Null(data) { }
    8383  // inter-language operability 
    8484  Comm(const MPI_Comm& data) : Comm_Null(data) { }
    85 
     85 
     86  //CHASTE: we added this virtual destructor to remove warnings
     87  virtual ~Comm() { }
     88 
    8689  //
    8790  // Point-to-Point
    8891  //
  • include/mpi2c++/pintercomm.h

    diff -urN mpi-orig/include/mpi2c++/pintercomm.h mpi/include/mpi2c++/pintercomm.h
    old new  
    3838  // inter-language operability
    3939  Intercomm(const MPI_Comm& data) : Comm(data) { }
    4040
     41  //CHASTE: we added this virtual destructor to remove warnings
     42  virtual ~Intercomm() { }
     43
     44
    4145  //
    4246  // Groups, Contexts, and Communicators
    4347  //
  • include/mpi2c++/pintracomm.h

    diff -urN mpi-orig/include/mpi2c++/pintracomm.h mpi/include/mpi2c++/pintracomm.h
    old new  
    3333  Intracomm() { }
    3434  // copy
    3535  Intracomm(const Intracomm& data) : Comm(data) { }
     36
     37  //CHASTE: we added this virtual destructor to remove warnings
     38  virtual ~Intracomm() { }
     39
    3640 
    3741  // inter-language operability
    3842  inline Intracomm(const MPI_Comm& data);
  • include/mpi2c++/ptopology.h

    diff -urN mpi-orig/include/mpi2c++/ptopology.h mpi/include/mpi2c++/ptopology.h
    old new  
    3434  Cartcomm() : Intracomm(MPI_COMM_NULL) { }
    3535  // copy
    3636  Cartcomm(const Cartcomm& data) : Intracomm(data) { }
     37 
     38   //CHASTE: we added this virtual destructor to remove warnings
     39  virtual ~Cartcomm() { }
     40 
     41 
     42 
    3743  // inter-language operability
    3844  inline Cartcomm(const MPI_Comm& data);
    3945
     
    8389  Graphcomm() : Intracomm(MPI_COMM_NULL) { }
    8490  // copy
    8591  Graphcomm(const Graphcomm& data) : Intracomm(data) { }
     92 
     93  //CHASTE: we added this virtual destructor to remove warnings
     94  virtual ~Graphcomm() { }
     95
     96 
    8697  // inter-language operability
    8798  inline Graphcomm(const MPI_Comm& data);
    8899
  • include/mpi2c++/topology.h

    diff -urN mpi-orig/include/mpi2c++/topology.h mpi/include/mpi2c++/topology.h
    old new  
    3737  Cartcomm(const Comm_Null& data) : Intracomm(data) { }
    3838  // inter-language operability
    3939  inline Cartcomm(const MPI_Comm& data);
     40 
     41  //CHASTE: we added this virtual destructor to remove warnings
     42  virtual ~Cartcomm() { }
     43 
    4044#if _MPIPP_PROFILING_
    4145  Cartcomm(const Cartcomm& data) : Intracomm(data), pmpi_comm(data) { }
    4246  Cartcomm(const PMPI::Cartcomm& d) : Intracomm((const PMPI::Intracomm&)d), pmpi_comm(d) { }
     
    118122  Graphcomm(const Comm_Null& data) : Intracomm(data) { }
    119123  // inter-language operability
    120124  inline Graphcomm(const MPI_Comm& data);
     125
     126  //CHASTE: we added this virtual destructor to remove warnings
     127  virtual ~Graphcomm() { }
     128
     129
    121130#if _MPIPP_PROFILING_
    122131  Graphcomm(const Graphcomm& data) : Intracomm(data), pmpi_comm(data)  { }
    123132  Graphcomm(const PMPI::Graphcomm& d) : Intracomm((const PMPI::Intracomm&)d), pmpi_comm(d) { }