mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
Fix MPI build
This commit is contained in:
parent
05aafdc3b6
commit
b848bdc237
@ -287,13 +287,20 @@ if (USE_PYTHON)
|
||||
endif (USE_PYTHON)
|
||||
|
||||
#######################################################################
|
||||
add_library(netgen_mpi INTERFACE)
|
||||
add_library(netgen_metis INTERFACE)
|
||||
if (USE_MPI)
|
||||
find_package(MPI REQUIRED)
|
||||
target_include_directories(netgen_mpi INTERFACE ${MPI_CXX_INCLUDE_PATH})
|
||||
target_link_libraries(netgen_mpi INTERFACE ${MPI_mpi_LIBRARY} ${MPI_CXX_LIBRARIES} )
|
||||
target_compile_definitions(netgen_mpi INTERFACE PARALLEL )
|
||||
|
||||
find_package(METIS REQUIRED)
|
||||
add_definitions(-DPARALLEL -DMETIS)
|
||||
include_directories(${MPI_CXX_INCLUDE_PATH})
|
||||
include_directories(${METIS_INCLUDE_DIR})
|
||||
target_include_directories(netgen_metis INTERFACE ${METIS_INCLUDE_DIR})
|
||||
target_link_libraries(netgen_metis INTERFACE ${METIS_LIBRARY} )
|
||||
target_compile_definitions(netgen_metis INTERFACE METIS )
|
||||
endif (USE_MPI)
|
||||
install(TARGETS netgen_mpi netgen_metis ${NG_INSTALL_DIR})
|
||||
|
||||
#######################################################################
|
||||
if (USE_OCC)
|
||||
|
@ -39,6 +39,7 @@ if(USE_PYTHON)
|
||||
target_include_directories(ngcore PRIVATE ${PYTHON_INCLUDE_DIRS})
|
||||
target_link_libraries(ngcore PRIVATE ${PYTHON_LIBRARIES})
|
||||
endif(USE_PYTHON)
|
||||
target_link_libraries(ngcore PUBLIC netgen_mpi)
|
||||
|
||||
install(FILES ngcore.hpp archive.hpp type_traits.hpp version.hpp ngcore_api.hpp logging.hpp
|
||||
exception.hpp symboltable.hpp paje_trace.hpp utils.hpp profiler.hpp mpi_wrapper.hpp
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <mpi.h>
|
||||
#endif
|
||||
|
||||
#include "exception.hpp"
|
||||
|
||||
namespace ngcore
|
||||
{
|
||||
@ -191,7 +192,7 @@ namespace ngcore
|
||||
};
|
||||
|
||||
|
||||
#else
|
||||
#else // PARALLEL
|
||||
class MPI_Comm {
|
||||
int nr;
|
||||
public:
|
||||
@ -240,7 +241,7 @@ namespace ngcore
|
||||
void Bcast (T & s, int root = 0) const { ; }
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // PARALLEL
|
||||
|
||||
|
||||
|
||||
@ -252,5 +253,5 @@ namespace ngcore
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // NGCORE_MPIWRAPPER_HPP
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <chrono>
|
||||
|
||||
#include "concurrentqueue.h"
|
||||
#include "mpi_wrapper.hpp"
|
||||
#include "paje_trace.hpp"
|
||||
#include "profiler.hpp"
|
||||
#include "taskmanager.hpp"
|
||||
|
@ -23,7 +23,7 @@ endif(APPLE)
|
||||
|
||||
target_link_libraries( mesh PUBLIC ngcore PRIVATE gprim la gen )
|
||||
|
||||
target_link_libraries( mesh PRIVATE ${ZLIB_LIBRARIES} ${MPI_CXX_LIBRARIES} ${PYTHON_LIBRARIES} ${METIS_LIBRARY})
|
||||
target_link_libraries( mesh PRIVATE netgen_metis ${ZLIB_LIBRARIES} ${PYTHON_LIBRARIES} )
|
||||
if(NOT WIN32)
|
||||
install( TARGETS mesh ${NG_INSTALL_DIR})
|
||||
endif(NOT WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user