-// Copyright (C) 2007-2015 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
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
void MPIAccessDECTest::test_AllToAllvTimeDoubleDECSynchronousPointToPoint() {
test_AllToAllvTimeDoubleDEC( false ) ;
test_AllToAllvTimeDoubleDEC( 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 ) {
strstream << "usage :" << endl
<< "mpirun -np <nbprocs> test_AllToAllTimeDEC" << 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 ;
cerr << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
debugStream << "test_AllToAllvTimeDoubleDEC" << myrank << " Asynchronous " << Asynchronous << endl ;
- ParaMEDMEM::CommInterface interface ;
+ MEDCoupling::CommInterface interface ;
std::set<int> sourceprocs;
std::set<int> targetprocs;
int i ;
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) ;
// TimeInterpolator * aLinearInterpDEC = new LinearTimeInterpolator( 0 ) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
//debugStream << endl ;
}
- int sts = MyMPIAccessDEC->allToAllvTime( sendbuf, sendcounts , sdispls , MPI_DOUBLE ,
+ sts = MyMPIAccessDEC->allToAllvTime( sendbuf, sendcounts , sdispls , MPI_DOUBLE ,
recvbuf, recvcounts , rdispls , MPI_DOUBLE ) ;
chksts( sts , myrank , mpi_access ) ;
// debugStream << "test_AllToAllvTimeDoubleDEC" << myrank << " check of recvbuf" << endl ;
bool badrecvbuf = false ;
for ( target = 0 ; target < size ; target++ ) {
- int j ;
- for ( j = 0 ; j < datamsglength ; j++ ) {
- int index = target*datamsglength+j ;
- if ( j < recvcounts[target] ) {
+ for ( int jj = 0 ; jj < datamsglength ; jj++ ) {
+ int index = target*datamsglength+jj ;
+ if ( jj < recvcounts[target] ) {
if ( fabs(recvbuf[index] - (target*1000000 + myrank*10000 +
- (timeLoc[target]/deltatime[target])*100 + j)) > 101) {
+ (timeLoc[target]/deltatime[target])*100 + jj)) > 101) {
badrecvbuf = true ;
debugStream << "test_AllToAllvTimeDoubleDEC" << myrank << " target " << target << " timeLoc[target] "
<< timeLoc[target] << " recvbuf[" << index << "] " << (int ) recvbuf[index]
<< " # " << (int ) (target*1000000 +
- myrank*10000 + (timeLoc[target]/deltatime[target])*100 + j)
+ myrank*10000 + (timeLoc[target]/deltatime[target])*100 + jj)
<< endl ;
}
else if ( badrecvbuf ) {
debugStream << "test_AllToAllvTimeDoubleDEC" << myrank << " recvbuf[" << index << "] "
<< recvbuf[index] << " ~= " << (int ) (target*1000000 +
- myrank*10000 + (timeLoc[target]/deltatime[target])*100 + j) << endl ;
+ myrank*10000 + (timeLoc[target]/deltatime[target])*100 + jj) << endl ;
}
}
else if ( recvbuf[index] != -1 ) {