Commit e30b3c61 authored by Sevin F. Varoglu's avatar Sevin F. Varoglu Committed by Robert Kimball

Minor changes for AllReduce (#944)

* Minor changes for AllReduce
parent 682f7b04
......@@ -71,6 +71,7 @@ if (NGRAPH_NNP_ENABLE)
-DEXTERNAL_NGRAPH_INCLUDE_DIR=${NGRAPH_INCLUDE_PATH}
-DINSTALLED_HEADERS_PATH=${CMAKE_INSTALL_PREFIX}/include
-DMKLDNN_INCLUDE_DIR=${MKLDNN_INCLUDE_DIR}
-DNGRAPH_DISTRIBUTED_ENABLE=${NGRAPH_DISTRIBUTED_ENABLE}
BUILD_ALWAYS 1
)
else()
......@@ -89,6 +90,7 @@ if (NGRAPH_NNP_ENABLE)
-DEXTERNAL_NGRAPH_INCLUDE_DIR=${NGRAPH_INCLUDE_PATH}
-DINSTALLED_HEADERS_PATH=${CMAKE_INSTALL_PREFIX}/include
-DMKLDNN_INCLUDE_DIR=${MKLDNN_INCLUDE_DIR}
-DNGRAPH_DISTRIBUTED_ENABLE=${NGRAPH_DISTRIBUTED_ENABLE}
BUILD_ALWAYS 1
)
endif()
......@@ -108,6 +110,7 @@ if (NGRAPH_NNP_ENABLE)
-DEXTERNAL_NGRAPH_INCLUDE_DIR=${NGRAPH_INCLUDE_PATH}
-DINSTALLED_HEADERS_PATH=${CMAKE_INSTALL_PREFIX}/include
-DMKLDNN_INCLUDE_DIR=${MKLDNN_INCLUDE_DIR}
-DNGRAPH_DISTRIBUTED_ENABLE=${NGRAPH_DISTRIBUTED_ENABLE}
BUILD_BYPRODUCTS ${NNP_TRANSFORMER_PREFIX}
BUILD_ALWAYS 1
)
......@@ -127,6 +130,7 @@ if (NGRAPH_NNP_ENABLE)
-DEXTERNAL_NGRAPH_INCLUDE_DIR=${NGRAPH_INCLUDE_PATH}
-DINSTALLED_HEADERS_PATH=${CMAKE_INSTALL_PREFIX}/include
-DMKLDNN_INCLUDE_DIR=${MKLDNN_INCLUDE_DIR}
-DNGRAPH_DISTRIBUTED_ENABLE=${NGRAPH_DISTRIBUTED_ENABLE}
BUILD_BYPRODUCTS ${NNP_TRANSFORMER_PREFIX}
BUILD_ALWAYS 1
)
......
......@@ -28,7 +28,15 @@ using namespace std;
class MpiEnvironment : public ::testing::Environment
{
protected:
virtual void SetUp() { MPI::Init(); }
virtual void SetUp()
{
int flag = 0;
MPI_Initialized(&flag);
if (!flag)
{
MPI::Init();
}
}
virtual void TearDown() { MPI::Finalize(); }
virtual ~MpiEnvironment() {}
};
......
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