Commit c70c53d6 authored by remicres's avatar remicres

FIX: pragmas for non-mpi case fallback

parent b0b0c442
......@@ -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
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment