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 _MPIACCESSDECTEST_HXX_
21 #define _MPIACCESSDECTEST_HXX_
23 #include <cppunit/extensions/HelperMacros.h>
31 class MPIAccessDECTest : public CppUnit::TestFixture
33 CPPUNIT_TEST_SUITE( MPIAccessDECTest );
34 // CPPUNIT_TEST( test_AllToAllDECSynchronousPointToPoint ) ;
35 CPPUNIT_TEST( test_AllToAllDECAsynchronousPointToPoint ) ;
36 //CPPUNIT_TEST( test_AllToAllvDECSynchronousPointToPoint ) ;
37 CPPUNIT_TEST( test_AllToAllvDECAsynchronousPointToPoint ) ;
38 //CPPUNIT_TEST( test_AllToAllTimeDECSynchronousPointToPoint ) ;
39 CPPUNIT_TEST( test_AllToAllTimeDECAsynchronousPointToPoint ) ;
40 CPPUNIT_TEST( test_AllToAllvTimeDECSynchronousNative ) ;
41 //CPPUNIT_TEST( test_AllToAllvTimeDECSynchronousPointToPoint ) ;
42 CPPUNIT_TEST( test_AllToAllvTimeDECAsynchronousPointToPoint ) ;
43 //CPPUNIT_TEST( test_AllToAllvTimeDoubleDECSynchronousPointToPoint ) ;
44 CPPUNIT_TEST( test_AllToAllvTimeDoubleDECAsynchronousPointToPoint ) ;
45 CPPUNIT_TEST_SUITE_END();
50 MPIAccessDECTest():CppUnit::TestFixture(){}
54 void test_AllToAllDECSynchronousPointToPoint() ;
55 void test_AllToAllDECAsynchronousPointToPoint() ;
56 void test_AllToAllvDECSynchronousPointToPoint() ;
57 void test_AllToAllvDECAsynchronousPointToPoint() ;
58 void test_AllToAllTimeDECSynchronousPointToPoint() ;
59 void test_AllToAllTimeDECAsynchronousPointToPoint() ;
60 void test_AllToAllvTimeDECSynchronousNative() ;
61 void test_AllToAllvTimeDECSynchronousPointToPoint() ;
62 void test_AllToAllvTimeDECAsynchronousPointToPoint() ;
63 void test_AllToAllvTimeDoubleDECSynchronousPointToPoint() ;
64 void test_AllToAllvTimeDoubleDECAsynchronousPointToPoint() ;
67 void test_AllToAllDEC( bool Asynchronous ) ;
68 void test_AllToAllvDEC( bool Asynchronous ) ;
69 void test_AllToAllTimeDEC( bool Asynchronous ) ;
70 void test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINative ) ;
71 void test_AllToAllvTimeDoubleDEC( bool Asynchronous ) ;
74 // to automatically remove temporary files from disk
75 class MPIAccessDECTest_TmpFilesRemover
78 MPIAccessDECTest_TmpFilesRemover() {}
79 ~MPIAccessDECTest_TmpFilesRemover();
80 bool Register(const std::string theTmpFile);
83 std::set<std::string> myTmpFiles;
87 * Tool to print array to stream.
90 void MPIAccessDECTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text)
92 stream << text << ": {";
95 for (int i = 1; i < length; i++) {
96 stream << ", " << array[i];
99 stream << "}" << std::endl;