X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParaMEDMEMTest%2Ftest_AllToAllDEC.cxx;h=e6bf3a254cc0dcd78e4c4c4a81667fdf6798e87d;hb=4c22ba01f2901896d1ec9ca302640f4d7e50d147;hp=61b93e62132ccf3a25b23bd9882bed5d62396bce;hpb=f1a947b32a36d8dc8e3079b25305bb50e8cb59a0;p=tools%2Fmedcoupling.git diff --git a/src/ParaMEDMEMTest/test_AllToAllDEC.cxx b/src/ParaMEDMEMTest/test_AllToAllDEC.cxx index 61b93e621..e6bf3a254 100644 --- a/src/ParaMEDMEMTest/test_AllToAllDEC.cxx +++ b/src/ParaMEDMEMTest/test_AllToAllDEC.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,7 +34,7 @@ #define ENABLE_FORCED_FAILURES using namespace std; -using namespace ParaMEDMEM; +using namespace MEDCoupling; void MPIAccessDECTest::test_AllToAllDECSynchronousPointToPoint() { test_AllToAllDEC( false ) ; @@ -43,19 +43,19 @@ void MPIAccessDECTest::test_AllToAllDECAsynchronousPointToPoint() { test_AllToAllDEC( true ) ; } -static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess mpi_access ) { +static void chksts( int sts , int myrank , MEDCoupling::MPIAccess mpi_access ) { char msgerr[MPI_MAX_ERROR_STRING] ; int lenerr ; if ( sts != MPI_SUCCESS ) { mpi_access.errorString(sts, msgerr, &lenerr) ; - cout << "test" << myrank << " lenerr " << lenerr << " " + debugStream << "test" << myrank << " lenerr " << lenerr << " " << msgerr << endl ; ostringstream strstream ; strstream << "===========================================================" << endl << "test_AllToAllDEC" << myrank << " KO" << endl << "===========================================================" << endl ; - cout << strstream.str() << endl ; + debugStream << strstream.str() << endl ; CPPUNIT_FAIL( strstream.str() ) ; } return ; @@ -63,7 +63,7 @@ static void chksts( int sts , int myrank , ParaMEDMEM::MPIAccess mpi_access ) { void MPIAccessDECTest::test_AllToAllDEC( bool Asynchronous ) { - cout << "test_AllToAllDEC" << endl ; + debugStream << "test_AllToAllDEC" << endl ; // MPI_Init(&argc, &argv) ; @@ -77,15 +77,15 @@ void MPIAccessDECTest::test_AllToAllDEC( bool Asynchronous ) { strstream << "usage :" << endl << "mpirun -np test_AllToAllDEC" << endl << " (nbprocs >=2)" << endl - << "test must be runned with more than 1 proc and less than 12 procs" + << "test must be run with more than 1 proc and less than 12 procs" << endl ; - cout << strstream.str() << endl ; + cerr << strstream.str() << endl ; CPPUNIT_FAIL( strstream.str() ) ; } - cout << "test_AllToAllDEC" << myrank << endl ; + debugStream << "test_AllToAllDEC" << myrank << endl ; - ParaMEDMEM::CommInterface interface ; + MEDCoupling::CommInterface interface ; std::set sourceprocs; std::set targetprocs; int i ; @@ -96,8 +96,8 @@ void MPIAccessDECTest::test_AllToAllDEC( bool Asynchronous ) { targetprocs.insert(i); } - ParaMEDMEM::MPIProcessorGroup* sourcegroup = new ParaMEDMEM::MPIProcessorGroup(interface,sourceprocs) ; - ParaMEDMEM::MPIProcessorGroup* targetgroup = new ParaMEDMEM::MPIProcessorGroup(interface,targetprocs) ; + MEDCoupling::MPIProcessorGroup* sourcegroup = new MEDCoupling::MPIProcessorGroup(interface,sourceprocs) ; + MEDCoupling::MPIProcessorGroup* targetgroup = new MEDCoupling::MPIProcessorGroup(interface,targetprocs) ; MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup , Asynchronous ) ; @@ -133,7 +133,7 @@ void MPIAccessDECTest::test_AllToAllDEC( bool Asynchronous ) { } int nSendReq = mpi_access->sendRequestIdsSize() ; - cout << "test_AllToAllDEC" << myrank << " final SendRequestIds " << nSendReq << " SendRequests" + debugStream << "test_AllToAllDEC" << myrank << " final SendRequestIds " << nSendReq << " SendRequests" << endl ; if ( nSendReq ) { int *ArrayOfSendRequests = new int[nSendReq] ; @@ -147,11 +147,11 @@ void MPIAccessDECTest::test_AllToAllDEC( bool Asynchronous ) { ostringstream strstream ; strstream << "test_AllToAllDEC" << myrank << " final RecvRequestIds " << nRecvReq << " RecvRequests # 0 Error" << endl ; - cout << strstream.str() << endl ; + debugStream << strstream.str() << endl ; CPPUNIT_FAIL( strstream.str() ) ; } else { - cout << "test_AllToAllDEC" << myrank << " final RecvRequestIds " << nRecvReq + debugStream << "test_AllToAllDEC" << myrank << " final RecvRequestIds " << nRecvReq << " RecvRequests = 0 OK" << endl ; } @@ -164,7 +164,7 @@ void MPIAccessDECTest::test_AllToAllDEC( bool Asynchronous ) { // MPI_Finalize(); - cout << "test_AllToAllDEC" << myrank << " OK" << endl ; + debugStream << "test_AllToAllDEC" << myrank << " OK" << endl ; return ; }