1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _MPIACCESSTEST_HXX_
21 #define _MPIACCESSTEST_HXX_
23 #include <cppunit/extensions/HelperMacros.h>
31 class MPIAccessTest : public CppUnit::TestFixture
33 CPPUNIT_TEST_SUITE( MPIAccessTest );
34 CPPUNIT_TEST( test_MPI_Access_Send_Recv ) ;
35 CPPUNIT_TEST( test_MPI_Access_Cyclic_Send_Recv ) ;
36 CPPUNIT_TEST( test_MPI_Access_SendRecv ) ;
37 CPPUNIT_TEST( test_MPI_Access_ISend_IRecv ) ;
38 CPPUNIT_TEST( test_MPI_Access_Cyclic_ISend_IRecv ) ;
39 CPPUNIT_TEST( test_MPI_Access_ISendRecv ) ;
40 CPPUNIT_TEST( test_MPI_Access_Probe ) ;
41 CPPUNIT_TEST( test_MPI_Access_IProbe ) ;
42 CPPUNIT_TEST( test_MPI_Access_Cancel ) ;
43 CPPUNIT_TEST( test_MPI_Access_Send_Recv_Length ) ;
44 CPPUNIT_TEST( test_MPI_Access_ISend_IRecv_Length ) ;
45 CPPUNIT_TEST( test_MPI_Access_ISend_IRecv_Length_1 ) ;
46 CPPUNIT_TEST( test_MPI_Access_Time ) ;
47 CPPUNIT_TEST( test_MPI_Access_Time_0 ) ;
48 CPPUNIT_TEST( test_MPI_Access_ISend_IRecv_BottleNeck ) ;
49 CPPUNIT_TEST_SUITE_END();
54 MPIAccessTest():CppUnit::TestFixture(){}
58 void test_MPI_Access_Send_Recv() ;
59 void test_MPI_Access_Cyclic_Send_Recv() ;
60 void test_MPI_Access_SendRecv() ;
61 void test_MPI_Access_ISend_IRecv() ;
62 void test_MPI_Access_Cyclic_ISend_IRecv() ;
63 void test_MPI_Access_ISendRecv() ;
64 void test_MPI_Access_Probe() ;
65 void test_MPI_Access_IProbe() ;
66 void test_MPI_Access_Cancel() ;
67 void test_MPI_Access_Send_Recv_Length() ;
68 void test_MPI_Access_ISend_IRecv_Length() ;
69 void test_MPI_Access_ISend_IRecv_Length_1() ;
70 void test_MPI_Access_Time() ;
71 void test_MPI_Access_Time_0() ;
72 void test_MPI_Access_ISend_IRecv_BottleNeck() ;
77 // to automatically remove temporary files from disk
78 class MPIAccessTest_TmpFilesRemover
81 MPIAccessTest_TmpFilesRemover() {}
82 ~MPIAccessTest_TmpFilesRemover();
83 bool Register(const std::string theTmpFile);
86 std::set<std::string> myTmpFiles;
90 * Tool to print array to stream.
93 void MPIAccessTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text)
95 stream << text << ": {";
98 for (int i = 1; i < length; i++) {
99 stream << ", " << array[i];
102 stream << "}" << std::endl;