mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
re-enable mpi
This commit is contained in:
parent
ccbbbb95d3
commit
845063b342
@ -58,12 +58,12 @@ else(Tcmalloc_FOUND)
|
||||
message(WARNING "Cannot find TCMalloc library. Continuing.")
|
||||
endif(Tcmalloc_FOUND)
|
||||
|
||||
#find_package(MPI)
|
||||
#if(MPI_FOUND)
|
||||
# include_directories(${MPI_INCLUDE_PATH})
|
||||
# set(EXT_LIBS ${EXT_LIBS} ${MPI_LIBRARIES})
|
||||
# add_definitions(-DMPI_FOUND=1)
|
||||
#endif(MPI_FOUND)
|
||||
find_package(MPI)
|
||||
if(MPI_FOUND)
|
||||
include_directories(${MPI_INCLUDE_PATH})
|
||||
set(EXT_LIBS ${EXT_LIBS} ${MPI_LIBRARIES})
|
||||
add_definitions(-DMPI_FOUND=1)
|
||||
endif(MPI_FOUND)
|
||||
|
||||
find_package(MKL)
|
||||
if(MKL_FOUND)
|
||||
@ -124,6 +124,9 @@ if(COMPILE_TESTS)
|
||||
enable_testing()
|
||||
endif(COMPILE_TESTS)
|
||||
|
||||
if(COMPILE_EXAMPLES)
|
||||
add_definitions(-DCOMPILE_EXAMPLES=1)
|
||||
endif(COMPILE_EXAMPLES)
|
||||
|
||||
# Compile source files
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/common/version.h.in
|
||||
|
@ -34,7 +34,7 @@ int main(int argc, char** argv) {
|
||||
if(options->get<std::string>("type") != "mnist-lenet")
|
||||
options->set("type", "mnist-ffnn");
|
||||
|
||||
auto devices = options->get<std::vector<size_t>>("devices");
|
||||
auto devices = options->getDevices();
|
||||
|
||||
if(devices.size() > 1) {
|
||||
if(options->get<bool>("sync-sgd"))
|
||||
|
@ -190,7 +190,7 @@ Ptr<ModelBase> by_type(std::string type, Ptr<Options> options) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_CUDNN
|
||||
#ifdef CUDNN
|
||||
#ifdef COMPILE_EXAMPLES
|
||||
if(type == "mnist-lenet") {
|
||||
return New<MnistLeNet>(options);
|
||||
|
Loading…
Reference in New Issue
Block a user