1 // Copyright (C) 2007-2008 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
19 #ifndef _MPIACCESSDECTEST_HXX_
20 #define _MPIACCESSDECTEST_HXX_
22 #include <cppunit/extensions/HelperMacros.h>
30 class MPIAccessDECTest : public CppUnit::TestFixture
32 CPPUNIT_TEST_SUITE( MPIAccessDECTest );
33 // CPPUNIT_TEST( test_AllToAllDECSynchronousPointToPoint ) ;
34 CPPUNIT_TEST( test_AllToAllDECAsynchronousPointToPoint ) ;
35 //CPPUNIT_TEST( test_AllToAllvDECSynchronousPointToPoint ) ;
36 CPPUNIT_TEST( test_AllToAllvDECAsynchronousPointToPoint ) ;
37 //CPPUNIT_TEST( test_AllToAllTimeDECSynchronousPointToPoint ) ;
38 CPPUNIT_TEST( test_AllToAllTimeDECAsynchronousPointToPoint ) ;
39 CPPUNIT_TEST( test_AllToAllvTimeDECSynchronousNative ) ;
40 //CPPUNIT_TEST( test_AllToAllvTimeDECSynchronousPointToPoint ) ;
41 CPPUNIT_TEST( test_AllToAllvTimeDECAsynchronousPointToPoint ) ;
42 //CPPUNIT_TEST( test_AllToAllvTimeDoubleDECSynchronousPointToPoint ) ;
43 CPPUNIT_TEST( test_AllToAllvTimeDoubleDECAsynchronousPointToPoint ) ;
44 CPPUNIT_TEST_SUITE_END();
49 MPIAccessDECTest():CppUnit::TestFixture(){}
53 void test_AllToAllDECSynchronousPointToPoint() ;
54 void test_AllToAllDECAsynchronousPointToPoint() ;
55 void test_AllToAllvDECSynchronousPointToPoint() ;
56 void test_AllToAllvDECAsynchronousPointToPoint() ;
57 void test_AllToAllTimeDECSynchronousPointToPoint() ;
58 void test_AllToAllTimeDECAsynchronousPointToPoint() ;
59 void test_AllToAllvTimeDECSynchronousNative() ;
60 void test_AllToAllvTimeDECSynchronousPointToPoint() ;
61 void test_AllToAllvTimeDECAsynchronousPointToPoint() ;
62 void test_AllToAllvTimeDoubleDECSynchronousPointToPoint() ;
63 void test_AllToAllvTimeDoubleDECAsynchronousPointToPoint() ;
66 void test_AllToAllDEC( bool Asynchronous ) ;
67 void test_AllToAllvDEC( bool Asynchronous ) ;
68 void test_AllToAllTimeDEC( bool Asynchronous ) ;
69 void test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINative ) ;
70 void test_AllToAllvTimeDoubleDEC( bool Asynchronous ) ;
73 // to automatically remove temporary files from disk
74 class MPIAccessDECTest_TmpFilesRemover
77 MPIAccessDECTest_TmpFilesRemover() {}
78 ~MPIAccessDECTest_TmpFilesRemover();
79 bool Register(const std::string theTmpFile);
82 std::set<std::string> myTmpFiles;
86 * Tool to print array to stream.
89 void MPIAccessDECTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text)
91 stream << text << ": {";
94 for (int i = 1; i < length; i++) {
95 stream << ", " << array[i];
98 stream << "}" << std::endl;