Skip to content

Commit

Permalink
Added tests for 2 threads
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfgc committed Feb 2, 2018
1 parent 1242abc commit e2f7f7e
Show file tree
Hide file tree
Showing 3 changed files with 1,559 additions and 6 deletions.
5 changes: 5 additions & 0 deletions testing/adios2/engine/bp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@ target_link_libraries(TestBPWriteReadADIOS2 adios2 gtest gtest_main)
add_executable(TestBPWriteReadAsStreamADIOS2 TestBPWriteReadAsStreamADIOS2.cpp)
target_link_libraries(TestBPWriteReadAsStreamADIOS2 adios2 gtest gtest_main)

add_executable(TestBPWriteReadAsStreamADIOS2_Threads TestBPWriteReadAsStreamADIOS2_Threads.cpp)
target_link_libraries(TestBPWriteReadAsStreamADIOS2_Threads adios2 gtest gtest_main)

add_executable(TestBPWriteReadAttributesADIOS2 TestBPWriteReadAttributesADIOS2.cpp)
target_link_libraries(TestBPWriteReadAttributesADIOS2 adios2 gtest gtest_main)


if(ADIOS2_HAVE_MPI)
target_link_libraries(TestBPWriteReadADIOS2 MPI::MPI_C)
target_link_libraries(TestBPWriteReadAsStreamADIOS2 MPI::MPI_C)
target_link_libraries(TestBPWriteReadAsStreamADIOS2_Threads MPI::MPI_C)
target_link_libraries(TestBPWriteReadAttributesADIOS2 MPI::MPI_C)

set(extra_test_args EXEC_WRAPPER ${MPIEXEC_COMMAND})
endif()

gtest_add_tests(TARGET TestBPWriteReadADIOS2 ${extra_test_args})
gtest_add_tests(TARGET TestBPWriteReadAsStreamADIOS2 ${extra_test_args})
gtest_add_tests(TARGET TestBPWriteReadAsStreamADIOS2_Threads ${extra_test_args})
gtest_add_tests(TARGET TestBPWriteReadAttributesADIOS2 ${extra_test_args})

if (ADIOS2_HAVE_ADIOS1)
Expand Down
10 changes: 4 additions & 6 deletions testing/adios2/engine/bp/TestBPWriteReadAsStreamADIOS2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ TEST_F(BPWriteReadAsStreamTestADIOS2, ADIOS2BPWriteRead1D8)

// Create the BP Engine
io.SetEngine("BPFile");
io.SetParameter("Threads", "2");

io.AddTransport("file");

adios2::Engine &bpWriter = io.Open(fname, adios2::Mode::Write);
Expand Down Expand Up @@ -346,7 +346,6 @@ TEST_F(BPWriteReadAsStreamTestADIOS2, ADIOS2BPWriteRead2D2x4)

// Create the BP Engine
io.SetEngine("BPFile");
io.SetParameter("Threads", "2");
io.AddTransport("file");

adios2::Engine &bpWriter = io.Open(fname, adios2::Mode::Write);
Expand Down Expand Up @@ -600,7 +599,7 @@ TEST_F(BPWriteReadAsStreamTestADIOS2, ADIOS2BPWriteRead2D4x2)

// Create the BP Engine
io.SetEngine("BPFile");
io.SetParameter("Threads", "2");

io.AddTransport("file");

adios2::Engine &bpWriter = io.Open(fname, adios2::Mode::Write);
Expand Down Expand Up @@ -850,7 +849,7 @@ TEST_F(BPWriteReadAsStreamTestADIOS2, ADIOS2BPWriteRead1D8MissingPerformGets)

// Create the BP Engine
io.SetEngine("BPFile");
io.SetParameter("Threads", "2");

io.AddTransport("file");

// QUESTION: It seems that BPFilterWriter cannot overwrite existing
Expand Down Expand Up @@ -1100,7 +1099,6 @@ TEST_F(BPWriteReadAsStreamTestADIOS2, ADIOS2BPWriteRead2D2x4MissingPerformGets)

// Create the BP Engine
io.SetEngine("BPFile");
io.SetParameter("Threads", "2");
io.AddTransport("file");

adios2::Engine &bpWriter = io.Open(fname, adios2::Mode::Write);
Expand Down Expand Up @@ -1354,7 +1352,7 @@ TEST_F(BPWriteReadAsStreamTestADIOS2, ADIOS2BPWriteRead2D4x2MissingPerformGets)

// Create the BP Engine
io.SetEngine("BPFile");
io.SetParameter("Threads", "2");

io.AddTransport("file");

adios2::Engine &bpWriter = io.Open(fname, adios2::Mode::Write);
Expand Down
Loading

0 comments on commit e2f7f7e

Please sign in to comment.