From b0d2bd24f48ba74ff411a6f933e2abd885120e9e Mon Sep 17 00:00:00 2001 From: Carl William Pearson Date: Wed, 2 Jun 2021 11:08:25 -0600 Subject: [PATCH] . --- CMakeLists.txt | 14 +++++++------- Makefile | 19 ------------------- README.md | 16 ++++++++++------ main.cpp => hello_world.cpp | 0 4 files changed, 17 insertions(+), 32 deletions(-) delete mode 100644 Makefile rename main.cpp => hello_world.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb8eca8..c1238f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,13 +90,13 @@ endfunction() configure_file(${CMAKE_CURRENT_LIST_DIR}/run-all.sh ${CMAKE_CURRENT_BINARY_DIR}/run-all.sh COPYONLY) if (MPI_FOUND) - add_executable(main main.cpp) - target_link_libraries(main MPI::MPI_CXX) - # target_include_directories(main PRIVATE ${MPI_CXX_INCLUDE_PATH}) - # target_compile_options(main PRIVATE ${MPI_CXX_COMPILE_FLAGS}) - # target_link_libraries(main ${MPI_CXX_LIBRARIES} ${MPI_CXX_LINK_FLAGS}) - set_cxx_options(main) - set_cxx_standard(main) + add_executable(hello-world hello_world.cpp) + target_link_libraries(hello-world MPI::MPI_CXX) + # target_include_directories(hello-world PRIVATE ${MPI_CXX_INCLUDE_PATH}) + # target_compile_options(hello-world PRIVATE ${MPI_CXX_COMPILE_FLAGS}) + # target_link_libraries(hello-world ${MPI_CXX_LIBRARIES} ${MPI_CXX_LINK_FLAGS}) + set_cxx_options(hello-world) + set_cxx_standard(hello-world) endif() if (MPI_FOUND) diff --git a/Makefile b/Makefile deleted file mode 100644 index 11f9cdb..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -TARGETS = main one-sided persistent - -all: ${TARGETS} - -.PHONY: clean -clean: - rm -f ${TARGETS} *.o - -MPICXX := mpicxx -CXXFLAGS := -std=c++11 -Wall -Wextra -Wshadow -pedantic -O2 - -main: main.cpp Makefile - $(MPICXX) $(CXXFLAGS) $< -o $@ - -one-sided: one_sided.cpp Makefile - $(MPICXX) $(CXXFLAGS) $< -o $@ - -persistent: persistent.cpp Makefile - $(MPICXX) $(CXXFLAGS) $< -o $@ \ No newline at end of file diff --git a/README.md b/README.md index 7919634..f17c896 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # mpi_test -Various standalone MPI binaries, either tests or examples depending on your perspective. +Various standalone C++ MPI tests/examples/benchmarks. + +If CUDA is detected, additional binaries can be built. + +| name | Kind | Reqs. | Ranks | Description | +|---------------|-----------|----------|-------|-------------| +|`hello-world` | Test | MPI | 1+ | an MPI hello-world | +|`one-sided` | Test | MPI | 2 | one-sided communication | +|`one-sided-gpu`| Test | MPI+CUDA | 2 | one-sided communication on GPU buffer | +|`persistent` | Benchmark | MPI | 2 | ping-pong time for persistent Send/Recv | ## Build ``` @@ -24,11 +33,6 @@ If any tests fails, you can re-run them individually. Execute any binary you want using `mpirun`, or whatever is appropriate for your platform. -## Run Microbenchmarks - -- `persistent` (`persistent.cpp`) ping-pong time for persistent communication. - - ## Notes on specific platforms Some Open MPIs use `long long` for their datatypes, which means we can't support ANSI C++ (`-ansi`). \ No newline at end of file diff --git a/main.cpp b/hello_world.cpp similarity index 100% rename from main.cpp rename to hello_world.cpp