Verified Commit fe50f47c authored by Marc Vef's avatar Marc Vef
Browse files

Adding gfind to examples when MPI was found

parent d6b34b43
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -27,10 +27,27 @@
################################################################################

set (CMAKE_CXX_STANDARD 17)
add_executable(sfind sfind.cpp)

add_executable(sfind sfind.cpp)
set_property(TARGET sfind PROPERTY POSITION_INDEPENDENT_CODE ON)
if(GKFS_INSTALL_TESTS)
    install(TARGETS sfind
        DESTINATION ${CMAKE_INSTALL_BINDIR}
    )
endif()

find_package(MPI)
if (MPI_FOUND)
    message(STATUS "[gekkofs] MPI was found. Building gfind example")
    add_executable(gfind gfind.cpp)
    set_property(TARGET gfind PROPERTY POSITION_INDEPENDENT_CODE ON)
    target_link_libraries(gfind
        PUBLIC
        MPI::MPI_CXX
    )
    if(GKFS_INSTALL_TESTS)
        install(TARGETS gfind
            DESTINATION ${CMAKE_INSTALL_BINDIR}
        )
    endif()
endif()
+0 −2
Original line number Diff line number Diff line
@@ -378,7 +378,6 @@ int process(char *processor_name, int world_rank, int world_size,

  // INIT PFIND
  memset(&runtime, 0, sizeof(pfind_runtime_options_t));
  int ret;
  /* Get timestamp file */
  if (opt->timestamp_file) {
    if (pfind_rank == 0) {
@@ -393,7 +392,6 @@ int process(char *processor_name, int world_rank, int world_size,
    MPI_Bcast(&runtime.ctime_min, 1, MPI_INT, 0, pfind_com);
  }

  auto iterations = 0;
  if (world_rank == 0) {
    queue<string> dirs;
    string workdir = opt->workdir;