paboyle / Grid

Data parallel C++ mathematical object library
GNU General Public License v2.0
155 stars 111 forks source link

FlightRecorder.cc breaks compilation for --enable-comms=none #460

Closed leonhostetler closed 6 months ago

leonhostetler commented 8 months ago

Trying to compile with --enable-comms=none fails with an error like:

      CXX      util/FlightRecorder.o
    ../../Grid/util/FlightRecorder.cc: In static member function ‘static void Grid::FlightRecorder::xmitLog(void*, uint64_t)’:
    ../../Grid/util/FlightRecorder.cc:293:17: error: ‘MPI_COMM_WORLD’ was not declared in this scope
      293 |     MPI_Barrier(MPI_COMM_WORLD);
          |                 ^~~~~~~~~~~~~~
    ../../Grid/util/FlightRecorder.cc:293:5: error: ‘MPI_Barrier’ was not declared in this scope
      293 |     MPI_Barrier(MPI_COMM_WORLD);
          |     ^~~~~~~~~~~

Replacing the line

MPI_Barrier(MPI_COMM_WORLD);

in Grid/util/FlightRecorder.cc with

    #if defined (GRID_COMMS_MPI) || defined (GRID_COMMS_MPI3) || defined (GRID_COMMS_MPIT)
    MPI_Barrier(MPI_COMM_WORLD);
    #endif

lets it compile, but I don't know if that would break something else or not.

leonhostetler commented 6 months ago

Fixed by commit 8a098889fccb9916d30f95706c4af896e401b21f