//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
void MPIAccessDECTest::test_AllToAllTimeDECSynchronousPointToPoint() {
test_AllToAllTimeDEC( false ) ;
void MPIAccessDECTest::test_AllToAllTimeDECSynchronousPointToPoint() {
test_AllToAllTimeDEC( false ) ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
mpi_access->errorString(sts, msgerr, &lenerr) ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
if ( sts != MPI_SUCCESS ) {
mpi_access->errorString(sts, msgerr, &lenerr) ;
<< msgerr << endl ;
ostringstream strstream ;
strstream << "==========================================================="
<< "test_AllToAllTimeDEC" << myrank << " KO"
<< "==========================================================="
<< endl ;
<< msgerr << endl ;
ostringstream strstream ;
strstream << "==========================================================="
<< "test_AllToAllTimeDEC" << myrank << " KO"
<< "==========================================================="
<< endl ;
- 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) ;
// LinearTimeInterpolator * aLinearInterpDEC = new LinearTimeInterpolator( 0.5 ) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
// LinearTimeInterpolator * aLinearInterpDEC = new LinearTimeInterpolator( 0.5 ) ;
MPIAccessDEC * MyMPIAccessDEC = new MPIAccessDEC( *sourcegroup , *targetgroup ,
MyMPIAccessDEC->setTimeInterpolator( LinearTimeInterp ) ;
MPIAccess * mpi_access = MyMPIAccessDEC->getMPIAccess() ;
MyMPIAccessDEC->setTimeInterpolator( LinearTimeInterp ) ;
MPIAccess * mpi_access = MyMPIAccessDEC->getMPIAccess() ;
// MyMPIAccessDEC->NextTime( nextdeltatime ) ;
}
MyMPIAccessDEC->setTime( time , nextdeltatime ) ;
// MyMPIAccessDEC->NextTime( nextdeltatime ) ;
}
MyMPIAccessDEC->setTime( time , nextdeltatime ) ;
<< nextdeltatime << "=====MAXTIME " << maxtime << " ======" << endl ;
int * sendbuf = new int[datamsglength*size] ;
// int * sendbuf = (int *) malloc(sizeof(int)*datamsglength*size) ;
<< nextdeltatime << "=====MAXTIME " << maxtime << " ======" << endl ;
int * sendbuf = new int[datamsglength*size] ;
// int * sendbuf = (int *) malloc(sizeof(int)*datamsglength*size) ;
recvbuf, recvcount , MPI_INT ) ;
chksts( sts , myrank , mpi_access ) ;
recvbuf, recvcount , MPI_INT ) ;
chksts( sts , myrank , mpi_access ) ;
int nReq = mpi_access->recvRequestIds( nRecvReq, ArrayOfRecvRequests ) ;
mpi_access->waitAll( nReq , ArrayOfRecvRequests ) ;
delete [] ArrayOfRecvRequests ;
int nReq = mpi_access->recvRequestIds( nRecvReq, ArrayOfRecvRequests ) ;
mpi_access->waitAll( nReq , ArrayOfRecvRequests ) ;
delete [] ArrayOfRecvRequests ;
bool badrecvbuf = false ;
for ( i = 0 ; i < datamsglength*size ; i++ ) {
if ( recvbuf[i] != (i/datamsglength)*1000000 + myrank*1000 +
myrank*datamsglength+(i%datamsglength) ) {
badrecvbuf = true ;
bool badrecvbuf = false ;
for ( i = 0 ; i < datamsglength*size ; i++ ) {
if ( recvbuf[i] != (i/datamsglength)*1000000 + myrank*1000 +
myrank*datamsglength+(i%datamsglength) ) {
badrecvbuf = true ;
<< recvbuf[i] << " # " << (i/datamsglength)*1000000 + myrank*1000 +
myrank*datamsglength+(i%datamsglength) << endl ;
}
else if ( badrecvbuf ) {
<< recvbuf[i] << " # " << (i/datamsglength)*1000000 + myrank*1000 +
myrank*datamsglength+(i%datamsglength) << endl ;
}
else if ( badrecvbuf ) {
<< recvbuf[i] << " == " << (i/datamsglength)*1000000 + myrank*1000 +
myrank*datamsglength+(i%datamsglength) << endl ;
}
<< recvbuf[i] << " == " << (i/datamsglength)*1000000 + myrank*1000 +
myrank*datamsglength+(i%datamsglength) << endl ;
}
<< "test_AllToAllTimeDEC" << myrank << " badrecvbuf"
<< endl << "============================================================="
<< endl ;
<< "test_AllToAllTimeDEC" << myrank << " badrecvbuf"
<< endl << "============================================================="
<< endl ;
sts = MyMPIAccessDEC->checkSent() ;
if ( sts != MPI_SUCCESS ) {
ostringstream strstream ;
sts = MyMPIAccessDEC->checkSent() ;
if ( sts != MPI_SUCCESS ) {
ostringstream strstream ;
<< "test_AllToAllTimeDEC" << myrank << " final CheckSent ERROR"
<< endl << "================================================================"
<< endl ;
<< "test_AllToAllTimeDEC" << myrank << " final CheckSent ERROR"
<< endl << "================================================================"
<< endl ;
<< " RecvRequests # 0 Error"
<< endl << "==============================================================="
<< endl ;
<< " RecvRequests # 0 Error"
<< endl << "==============================================================="
<< endl ;