diff --git a/include/lsgrmHeader.h b/include/lsgrmHeader.h
index b6bd04c0c3e140db6a81ed03bd065b8178195e3d..95dad7adcf94f1dd5edd9663ca6da20b4e7b10fc 100644
--- a/include/lsgrmHeader.h
+++ b/include/lsgrmHeader.h
@@ -38,6 +38,7 @@ bool MyTurn(int div = 0)
  * This function gather the given value in other process, and update it
  * TODO: MPI implementation using OTB MPI Wrapper
  */
+#ifdef OTB_USE_MPI
 template<typename T>
 void GatherMe(T& x, MPI_Datatype dataType)
 {
@@ -63,6 +64,7 @@ void GatherMe(T& x, MPI_Datatype dataType)
     MPI_Recv(&x, 1, dataType, 0, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
     }
 }
+#endif
 
 
 /*
@@ -71,6 +73,7 @@ void GatherMe(T& x, MPI_Datatype dataType)
  */
 void GatherUsefulVariables(unsigned long long int& accumulatedMemory, bool& isFusion)
 {
+#ifdef OTB_USE_MPI
   otb::MPIConfig::Instance()->barrier();
   int isFusionInteger = 0;
   long long int accumulatedMemoryLLI = static_cast<long long int>(accumulatedMemory);
@@ -81,6 +84,7 @@ void GatherUsefulVariables(unsigned long long int& accumulatedMemory, bool& isFu
   accumulatedMemory = static_cast<long long unsigned int>(accumulatedMemoryLLI);
   if (isFusionInteger>0)
     isFusion = true;
+#endif
 }
 
 /*