1 // Copyright (C) 2007-2015 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, or (at your option) any later version.
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>
30 // (ABN]: too many text output in the MPIAccesTest - this renders
31 // the analysis complicated:
32 #define MPI_ACCESS_VERBOSE 0
34 if (!MPI_ACCESS_VERBOSE) {} \
37 class MPIAccessDECTest : public CppUnit::TestFixture
39 CPPUNIT_TEST_SUITE( MPIAccessDECTest );
40 // CPPUNIT_TEST( test_AllToAllDECSynchronousPointToPoint ) ;
41 CPPUNIT_TEST( test_AllToAllDECAsynchronousPointToPoint ) ;
42 //CPPUNIT_TEST( test_AllToAllvDECSynchronousPointToPoint ) ;
43 CPPUNIT_TEST( test_AllToAllvDECAsynchronousPointToPoint ) ;
44 //CPPUNIT_TEST( test_AllToAllTimeDECSynchronousPointToPoint ) ;
45 CPPUNIT_TEST( test_AllToAllTimeDECAsynchronousPointToPoint ) ;
46 CPPUNIT_TEST( test_AllToAllvTimeDECSynchronousNative ) ;
47 //CPPUNIT_TEST( test_AllToAllvTimeDECSynchronousPointToPoint ) ;
48 CPPUNIT_TEST( test_AllToAllvTimeDECAsynchronousPointToPoint ) ;
49 //CPPUNIT_TEST( test_AllToAllvTimeDoubleDECSynchronousPointToPoint ) ;
50 CPPUNIT_TEST( test_AllToAllvTimeDoubleDECAsynchronousPointToPoint ) ;
51 CPPUNIT_TEST_SUITE_END();
56 MPIAccessDECTest():CppUnit::TestFixture(){}
60 void test_AllToAllDECSynchronousPointToPoint() ;
61 void test_AllToAllDECAsynchronousPointToPoint() ;
62 void test_AllToAllvDECSynchronousPointToPoint() ;
63 void test_AllToAllvDECAsynchronousPointToPoint() ;
64 void test_AllToAllTimeDECSynchronousPointToPoint() ;
65 void test_AllToAllTimeDECAsynchronousPointToPoint() ;
66 void test_AllToAllvTimeDECSynchronousNative() ;
67 void test_AllToAllvTimeDECSynchronousPointToPoint() ;
68 void test_AllToAllvTimeDECAsynchronousPointToPoint() ;
69 void test_AllToAllvTimeDoubleDECSynchronousPointToPoint() ;
70 void test_AllToAllvTimeDoubleDECAsynchronousPointToPoint() ;
73 void test_AllToAllDEC( bool Asynchronous ) ;
74 void test_AllToAllvDEC( bool Asynchronous ) ;
75 void test_AllToAllTimeDEC( bool Asynchronous ) ;
76 void test_AllToAllvTimeDEC( bool Asynchronous , bool UseMPINative ) ;
77 void test_AllToAllvTimeDoubleDEC( bool Asynchronous ) ;
80 // to automatically remove temporary files from disk
81 class MPIAccessDECTest_TmpFilesRemover
84 MPIAccessDECTest_TmpFilesRemover() {}
85 ~MPIAccessDECTest_TmpFilesRemover();
86 bool Register(const std::string theTmpFile);
89 std::set<std::string> myTmpFiles;
93 * Tool to print array to stream.
96 void MPIAccessDECTest_DumpArray (std::ostream & stream, const T* array, const int length, const std::string text)
98 stream << text << ": {";
101 for (int i = 1; i < length; i++) {
102 stream << ", " << array[i];
105 stream << "}" << std::endl;