much less verbose by default.
TARGET_LINK_LIBRARIES(${bintestparamem} ParaMEDMEMTest)
ENDFOREACH(bintestparamem ${TESTSParaMEDMEM})
+# Now add CMake tests - test_perf, ParaMEDMEMTestMPI2_1 and ParaMEDMEMTestMPI2_2
+# are left aside, as they are too specific
+#
+# -- some tests require 2, 3, 4 or 5 procs --
+ADD_TEST(NAME TestParaMEDMEM_Proc2 COMMAND ${MPIEXEC} -np 2 $<TARGET_FILE:TestParaMEDMEM>)
+ADD_TEST(NAME TestParaMEDMEM_Proc3 COMMAND ${MPIEXEC} -np 3 $<TARGET_FILE:TestParaMEDMEM>)
+ADD_TEST(NAME TestParaMEDMEM_Proc4 COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:TestParaMEDMEM>)
+ADD_TEST(NAME TestParaMEDMEM_Proc5 COMMAND ${MPIEXEC} -np 5 $<TARGET_FILE:TestParaMEDMEM>)
+
+ADD_TEST(NAME TestMPIAccess_Proc2 COMMAND ${MPIEXEC} -np 2 $<TARGET_FILE:TestMPIAccess>)
+ADD_TEST(NAME TestMPIAccess_Proc3 COMMAND ${MPIEXEC} -np 3 $<TARGET_FILE:TestMPIAccess>)
+
+ADD_TEST(NAME TestMPIAccessDEC_Proc4 COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:TestMPIAccessDEC>)
+
+# Installation rules
INSTALL(TARGETS ${TESTSParaMEDMEM} DESTINATION ${SALOME_INSTALL_BINS})
SET(COMMON_HEADERS_HXX
MPIMainTest.hxx
#include <iostream>
#include "mpi.h"
+// (ABN]: too many text output in the MPIAccesTest - this renders
+// the analysis complicated:
+#define MPI_ACCESS_VERBOSE 0
+#define debugStream \
+ if (!MPI_ACCESS_VERBOSE) {} \
+ else std::cout
class MPIAccessTest : public CppUnit::TestFixture
{
void MPIAccessTest::test_MPI_Access_Cancel() {
- cout << "test_MPI_Access_Cancel" << endl ;
+ debugStream << "test_MPI_Access_Cancel" << endl ;
// MPI_Init(&argc, &argv) ;
if ( size < 2 ) {
ostringstream strstream ;
strstream << "test_MPI_Access_Cancel must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_Cancel" << myrank << endl ;
+ debugStream << "test_MPI_Access_Cancel" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
int i , j ;
for ( j = 0 ; j < 3 ; j++ ) {
for ( i = 0 ; i < 10 ; i++ ) {
- cout << "test" << myrank << " ============================ i " << i
+ debugStream << "test" << myrank << " ============================ i " << i
<< "============================" << endl ;
if ( myrank == 0 ) {
if ( i < 5 ) {
intsendbuf[i] = i ;
sts = mpi_access.ISend(&intsendbuf[i],1,MPI_INT,target, RequestId[i]) ;
- cout << "test" << myrank << " Send MPI_INT RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send MPI_INT RequestId " << RequestId[i]
<< endl ;
}
else {
doublesendbuf[i] = i ;
sts = mpi_access.ISend(&doublesendbuf[i],1,MPI_DOUBLE,target,
RequestId[i]) ;
- cout << "test" << myrank << " Send MPI_DOUBLE RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send MPI_DOUBLE RequestId " << RequestId[i]
<< endl ;
}
}
sts = mpi_access.IProbe(target, source, tag, datatype, outcount,
flag ) ;
if ( flag ) {
- cout << "test" << myrank << " " << i << " IProbe target " << target
+ debugStream << "test" << myrank << " " << i << " IProbe target " << target
<< " source " << source << " tag " << tag
<< " outcount " << outcount << " flag " << flag << endl ;
}
else {
- cout << "test" << myrank << " flag " << flag << endl ;
+ debugStream << "test" << myrank << " flag " << flag << endl ;
sleep( 1 ) ;
}
if ( flag ) {
<< " recvbuf " << recvbuf << " KO" << endl
<< "======================================================"
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- cout << "========================================================"
+ debugStream << "========================================================"
<< endl << "test" << myrank << " outcount " << outcount
<< " recvbuf " << recvbuf << " OK" << endl
<< "========================================================"
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
ostringstream strstream ;
<< endl << "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
if ( myrank != 0 ) {
int iprobe ;
for ( iprobe = 5 ; iprobe < 10 ; iprobe++ ) {
- cout << "test" << myrank << " ============================ iprobe "
+ debugStream << "test" << myrank << " ============================ iprobe "
<< iprobe << "============================" << endl ;
int source, tag, outcount ;
MPI_Datatype datatype ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " IProbe iprobe " << iprobe
+ debugStream << "test" << myrank << " IProbe iprobe " << iprobe
<< " target " << target << " probeflag " << probeflag
<< " tag " << tag << " outcount " << outcount << " datatype "
<< datatype << " lenerr " << lenerr << " " << msgerr << endl ;
<< endl
<< "=========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
if ( !probeflag ) {
- //cout << "========================================================"
+ //debugStream << "========================================================"
// << endl << "test" << myrank << " IProbe KO(OK) iprobe " << iprobe
// << " probeflag " << probeflag << endl
// << "========================================================"
// << endl ;
}
else {
- cout << "test" << myrank << " " << iprobe << " IProbe target "
+ debugStream << "test" << myrank << " " << iprobe << " IProbe target "
<< target << " source " << source << " tag " << tag
<< " outcount " << outcount << " probeflag " << probeflag
<< endl ;
<< endl << "test" << myrank << " MPI_DOUBLE KO" << endl
<< "========================================================"
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
sts = mpi_access.cancel( source, tag, datatype, outcount, flag ) ;
if ( sts != MPI_SUCCESS || !flag ) {
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "======================================================"
+ debugStream << "======================================================"
<< endl << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl << "test" << myrank
<< " Cancel PendingIrecv KO flag " << flag << " iprobe "
//return 1 ;
}
else {
- cout << "======================================================"
+ debugStream << "======================================================"
<< endl << "test" << myrank
<< " Cancel PendingIrecv OK RequestId " << " flag "
<< flag << " iprobe " << iprobe << endl
int Reqtarget, Reqtag, Reqerror, Reqoutcount ;
mpi_access.status( RequestId[iprobe], Reqtarget, Reqtag, Reqerror,
Reqoutcount, true ) ;
- cout << "test" << myrank << " Status Reqtarget "<< Reqtarget
+ debugStream << "test" << myrank << " Status Reqtarget "<< Reqtarget
<< " Reqtag " << Reqtag << " Reqoutcount " << Reqoutcount
<< endl ;
int Reqflag ;
sts = mpi_access.cancel( RequestId[iprobe] , Reqflag ) ;
- cout << "test" << myrank << " " << iprobe
+ debugStream << "test" << myrank << " " << iprobe
<< " Cancel Irecv done Reqtarget " << Reqtarget
<< " Reqtag " << Reqtag << " Reqoutcount " << Reqoutcount
<< " Reqflag " << Reqflag << endl ;
<< iprobe << endl
<< "========================================================"
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "========================================================"
+ debugStream << "========================================================"
<< endl << "test" << myrank
<< " Cancel Irecv OK RequestId " << RequestId[iprobe]
<< " Reqflag " << Reqflag << " iprobe " << iprobe << endl
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS || flag ) {
ostringstream strstream ;
<< " source " << source << " tag " << tag << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
mpi_access.barrier() ;
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_Cyclic_ISend_IRecv() {
- cout << "test_MPI_Access_Cyclic_ISend_IRecv" << endl ;
+ debugStream << "test_MPI_Access_Cyclic_ISend_IRecv" << endl ;
// MPI_Init(&argc, &argv) ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 3 ) {
- cout << "test_MPI_Access_Cyclic_ISend_IRecv must be runned with 3 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_Cyclic_ISend_IRecv must be runned with 3 procs") ;
+ cerr << "test_MPI_Access_Cyclic_ISend_IRecv must be runned with 3 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_Cyclic_ISend_IRecv must be runned with 3 procs") ;
+ return;
}
- cout << "test_MPI_Access_Cyclic_ISend_IRecv" << myrank << endl ;
+ debugStream << "test_MPI_Access_Cyclic_ISend_IRecv" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
sendbuf[i] = i ;
sts = mpi_access.ISend(&sendbuf[i],1,MPI_INT,alltarget[myrank],
SendRequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(alltarget[myrank]) << endl ;
}
for ( i = 0 ; i < maxsend ; i++ ) {
recvbuf[i] = -1 ;
sts = mpi_access.IRecv(&recvbuf[i],1,MPI_INT,allsource[myrank],
RecvRequestId[i]) ;
- cout << "test" << myrank << " Recv RequestId " << RecvRequestId[i]
+ debugStream << "test" << myrank << " Recv RequestId " << RecvRequestId[i]
<< " tag " << mpi_access.recvMPITag(allsource[myrank]) << endl ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr
+ debugStream << "test" << myrank << " lenerr " << lenerr
<< " " << msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
int j ;
for (j = 0 ; j <= i ; j++) {
int flag ;
if ( j < i ) {
- cout << "test" << myrank << " " << j << " -> Test-Send("<< SendRequestId[j]
+ debugStream << "test" << myrank << " " << j << " -> Test-Send("<< SendRequestId[j]
<< ")" << endl ;
mpi_access.test( SendRequestId[j], flag ) ;
if ( flag ) {
int target, tag, error, outcount ;
mpi_access.status( SendRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Send RequestId " << SendRequestId[j]
+ debugStream << "test" << myrank << " Send RequestId " << SendRequestId[j]
<< " target " << target << " tag " << tag << " error " << error
<< endl ;
mpi_access.deleteRequest( SendRequestId[j] ) ;
}
}
- cout << "test" << myrank << " " << j << " -> Test-Recv("<< SendRequestId[j]
+ debugStream << "test" << myrank << " " << j << " -> Test-Recv("<< SendRequestId[j]
<< ")" << endl ;
mpi_access.test( RecvRequestId[j], flag ) ;
if ( flag ) {
int source, tag, error, outcount ;
mpi_access.status( RecvRequestId[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Recv RequestId" << j << " "
+ debugStream << "test" << myrank << " Recv RequestId" << j << " "
<< RecvRequestId[j] << " source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount << endl ;
if ( (outcount != 1) | (recvbuf[j] != j) ) {
<< outcount << " recvbuf[ " << j << " ] " << recvbuf[j] << " KO"
<< endl << "====================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
sendbuf[i+1] = i + 1 ;
sts = mpi_access.ISend(&sendbuf[i+1],1,MPI_INT,alltarget[myrank],
SendRequestId[i+1]) ;
- cout << "test" << myrank << " Send RequestId " << SendRequestId[i+1]
+ debugStream << "test" << myrank << " Send RequestId " << SendRequestId[i+1]
<< " tag " << mpi_access.sendMPITag(alltarget[myrank]) << endl ;
}
}
sendbuf[i] = i ;
sts = mpi_access.ISend(&sendbuf[i],1,MPI_INT,alltarget[myrank],
SendRequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(alltarget[myrank]) << endl ;
}
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr
+ debugStream << "test" << myrank << " lenerr " << lenerr
<< " " << msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
mpi_access.deleteRequests(maxsend,SendRequestId) ;
mpi_access.waitAll(maxsend,RecvRequestId) ;
mpi_access.deleteRequests(maxsend,RecvRequestId) ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
mpi_access.testAll(maxsend,SendRequestId,flag) ;
if ( !flag ) {
ostringstream strstream ;
strstream << "=========================================================" << endl
<< "test" << myrank << " TestAllSendflag " << flag << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " TestAllSendflag " << flag << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " TestAllRecvflag " << flag << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " TestAllRecvflag " << flag << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
int source, tag, error, outcount ;
mpi_access.status(sendrequests[0], source, tag, error, outcount, true) ;
- cout << "test" << myrank << " RequestId " << sendrequests[0]
+ debugStream << "test" << myrank << " RequestId " << sendrequests[0]
<< " source " << source << " tag " << tag << " error " << error
<< " outcount " << outcount << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_Cyclic_Send_Recv() {
- cout << "test_MPI_Access_Cyclic_Send_Recv" << endl ;
+ debugStream << "test_MPI_Access_Cyclic_Send_Recv" << endl ;
// MPI_Init(&argc, &argv) ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 3 ) {
- cout << "test_MPI_Access_Send_Recv must be runned with 3 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_Send_Recv must be runned with 3 procs") ;
+ cerr << "test_MPI_Access_Send_Recv must be runned with 3 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_Send_Recv must be runned with 3 procs") ;
+ return;
}
- cout << "test_MPI_Access_Cyclic_Send_Recv" << myrank << endl ;
+ debugStream << "test_MPI_Access_Cyclic_Send_Recv" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
int i = 0 ;
if ( myrank == 0 ) {
sts = mpi_access.send(&i,1,MPI_INT,alltarget[myrank], RequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< " tag " << mpi_access.sendMPITag(alltarget[myrank]) << endl ;
}
for ( i = 0 ; i < 10 ; i++ ) {
}
//int source, tag, error, outcount ;
//mpi_access.Status( RequestId[i], source, tag, error, outcount, true) ;
- cout << "test" << myrank << " Recv RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Recv RequestId " << RequestId[i]
<< " tag " << mpi_access.recvMPITag(allsource[myrank])
<< " outcount " << outcount << endl ;
if ( (outcount != 1) | (recvbuf != i) ) {
<< outcount << " recvbuf " << recvbuf << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
if ( myrank == 0 ) {
if ( i != 9 ) {
int ii = i + 1 ;
sts = mpi_access.send(&ii,1,MPI_INT,alltarget[myrank], RequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< " tag " << mpi_access.sendMPITag(alltarget[myrank]) << endl ;
}
}
else {
sts = mpi_access.send(&i,1,MPI_INT,alltarget[myrank], RequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< " tag " << mpi_access.sendMPITag(alltarget[myrank]) << endl ;
}
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr
+ debugStream << "test" << myrank << " lenerr " << lenerr
<< " " << msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
mpi_access.waitAll(10,RequestId) ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
int sendrequests[10] ;
int sendreqsize = mpi_access.sendRequestIds( alltarget[myrank] , 10 ,
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
int recvrequests[10] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_IProbe() {
- cout << "test_MPI_Access_IProbe" << endl ;
+ debugStream << "test_MPI_Access_IProbe" << endl ;
// MPI_Init(&argc, &argv) ;
if ( size < 2 ) {
ostringstream strstream ;
strstream << "test_MPI_Access_IProbe must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_IProbe" << myrank << endl ;
+ debugStream << "test_MPI_Access_IProbe" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
if ( myrank == 0 ) {
sendbuf[i] = i ;
sts = mpi_access.ISend(&sendbuf[i],1,MPI_INT,target, RequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< endl ;
}
else {
MPI_Datatype datatype ;
sts = mpi_access.IProbe(target, source, tag, datatype, outcount, flag ) ;
if ( flag ) {
- cout << "test" << myrank << " " << i << " IProbe target " << target
+ debugStream << "test" << myrank << " " << i << " IProbe target " << target
<< " source " << source << " tag " << tag
<< " outcount " << outcount << " flag " << flag << endl ;
}
else {
- cout << "test" << myrank << " IProbe flag " << flag << endl ;
+ debugStream << "test" << myrank << " IProbe flag " << flag << endl ;
sleep( 1 ) ;
}
if ( flag ) {
<< " recvbuf " << recvbuf << " KO" << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " recvbuf " << recvbuf << " OK" << endl
<< "==========================================================="
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
mpi_access.testAll(10,RequestId,flag) ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
mpi_access.barrier() ;
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_ISendRecv() {
- cout << "test_MPI_Access_ISendRecv" << endl ;
+ debugStream << "test_MPI_Access_ISendRecv" << endl ;
// MPI_Init(&argc, &argv) ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 2 ) {
- cout << "test_MPI_Access_ISendRecv must be runned with 2 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_ISendRecv must be runned with 2 procs") ;
+ cerr << "test_MPI_Access_ISendRecv must be runned with 2 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_ISendRecv must be runned with 2 procs") ;
+ return;
}
- cout << "test_MPI_Access_ISendRecv" << myrank << endl ;
+ debugStream << "test_MPI_Access_ISendRecv" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
sendbuf[i] = i ;
sts = mpi_access.ISendRecv(&sendbuf[i],1,MPI_INT,target, SendRequestId[i],
&recvbuf[i],1,MPI_INT,target, RecvRequestId[i]) ;
- cout << "test" << myrank << " Send sendRequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " Send sendRequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target)
<< " recvRequestId " << RecvRequestId[i]
<< " tag " << mpi_access.recvMPITag(target) << endl ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr
+ debugStream << "test" << myrank << " lenerr " << lenerr
<< " " << msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
int j ;
for (j = 0 ; j <= i ; j++) {
int flag ;
if ( j < i ) {
- cout << "test" << myrank << " " << j << " -> Test-Send("<< SendRequestId[j]
+ debugStream << "test" << myrank << " " << j << " -> Test-Send("<< SendRequestId[j]
<< ")" << endl ;
mpi_access.test( SendRequestId[j], flag ) ;
if ( flag ) {
int target, tag, error, outcount ;
mpi_access.status( SendRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Send RequestId " << SendRequestId[j]
+ debugStream << "test" << myrank << " Send RequestId " << SendRequestId[j]
<< " target " << target << " tag " << tag << " error " << error
<< endl ;
mpi_access.deleteRequest( SendRequestId[j] ) ;
}
}
- cout << "test" << myrank << " " << j << " -> Test-Recv("<< SendRequestId[j]
+ debugStream << "test" << myrank << " " << j << " -> Test-Recv("<< SendRequestId[j]
<< ")" << endl ;
mpi_access.test( RecvRequestId[j], flag ) ;
if ( flag ) {
int source, tag, error, outcount ;
mpi_access.status( RecvRequestId[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Recv RequestId" << j << " "
+ debugStream << "test" << myrank << " Recv RequestId" << j << " "
<< RecvRequestId[j] << " source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount << endl ;
if ( (outcount != 1) | (recvbuf[j] != j) ) {
<< outcount << " recvbuf[ " << j << " ] " << recvbuf[j] << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
}
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
int sendrequests[10] ;
int sendreqsize = mpi_access.sendRequestIds( target , 10 , sendrequests ) ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_ISend_IRecv() {
- cout << "test_MPI_Access_ISend_IRecv" << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv" << endl ;
// MPI_Init(&argc, &argv) ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 2 ) {
- cout << "test_MPI_Access_ISend_IRecv must be runned with 2 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_ISend_IRecv must be runned with 2 procs") ;
+ cerr << "test_MPI_Access_ISend_IRecv must be runned with 2 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_ISend_IRecv must be runned with 2 procs") ;
+ return;
}
- cout << "test_MPI_Access_ISend_IRecv" << myrank << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
if ( myrank == 0 ) {
sendbuf[i] = i ;
sts = mpi_access.ISend(&sendbuf[i],1,MPI_INT,target, SendRequestId[i]) ;
- cout << "test" << myrank << " ISend RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " ISend RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
else {
sts = mpi_access.IRecv(&recvbuf[i],1,MPI_INT,target, RecvRequestId[i]) ;
- cout << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
+ debugStream << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
<< " tag " << mpi_access.recvMPITag(target) << endl ;
}
int j ;
if ( myrank == 0 ) {
mpi_access.status( SendRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
+ debugStream << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
<< ") : target " << target << " tag " << tag << " error " << error
<< " flag " << flag << endl ;
}
else {
mpi_access.status( RecvRequestId[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Recv RequestId "
+ debugStream << "test" << myrank << " Test(Recv RequestId "
<< RecvRequestId[j] << ") : source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount
<< " flag " << flag << endl ;
<< outcount << " recvbuf " << recvbuf[j] << " KO" << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
//else {
- // cout << "==========================================================="
+ // debugStream << "==========================================================="
// << endl << "test" << myrank << " outcount " << outcount
// << " RequestId " << RecvRequestId[j] << " recvbuf "
// << recvbuf[j] << " OK" << endl
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
mpi_access.waitAll(maxreq, SendRequestId) ;
mpi_access.deleteRequests(maxreq, SendRequestId) ;
mpi_access.waitAll(maxreq, RecvRequestId) ;
mpi_access.deleteRequests(maxreq, RecvRequestId) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
int sendrequests[maxreq] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
for ( i = 0 ; i < sendreqsize ; i++ ) {
- cout << "test" << myrank << " sendrequests[ " << i << " ] = "
+ debugStream << "test" << myrank << " sendrequests[ " << i << " ] = "
<< sendrequests[i] << endl ;
}
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_ISend_IRecv_BottleNeck() {
- cout << "test_MPI_Access_ISend_IRecv_BottleNeck" << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv_BottleNeck" << endl ;
// MPI_Init(&argc, &argv) ;
ostringstream strstream ;
strstream << "test_MPI_Access_ISend_IRecv_BottleNeck must be runned with 2 procs"
<< endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_ISend_IRecv_BottleNeck" << myrank << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv_BottleNeck" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
if ( myrank == 0 ) {
sendbuf[i] = i ;
sts = mpi_access.ISend(sendbuf,i,MPI_INT,target, SendRequestId[i]) ;
- cout << "test" << myrank << " ISend RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " ISend RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
else {
//sleep( 1 ) ;
sts = mpi_access.IRecv(recvbuf,i,MPI_INT,target, RecvRequestId[i]) ;
- cout << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
+ debugStream << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
<< " tag " << mpi_access.recvMPITag(target) << endl ;
int recvreqsize = mpi_access.recvRequestIdsSize() ;
int * recvrequests = new int[ recvreqsize ] ;
int source, tag, error, outcount ;
mpi_access.status( recvrequests[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Recv RequestId "
+ debugStream << "test" << myrank << " Test(Recv RequestId "
<< recvrequests[j] << ") : source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount
<< " flag " << flag << " : DeleteRequest" << endl ;
mpi_access.deleteRequest( recvrequests[j] ) ;
}
else {
-// cout << "test" << myrank << " Test(Recv RequestId "
+// debugStream << "test" << myrank << " Test(Recv RequestId "
// << recvrequests[j] << ") flag " << flag << endl ;
}
}
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
}
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
int size = mpi_access.sendRequestIdsSize() ;
- cout << "test" << myrank << " before WaitAll sendreqsize " << size << endl ;
+ debugStream << "test" << myrank << " before WaitAll sendreqsize " << size << endl ;
mpi_access.waitAll(maxreq, SendRequestId) ;
size = mpi_access.sendRequestIdsSize() ;
- cout << "test" << myrank << " after WaitAll sendreqsize " << size << endl ;
+ debugStream << "test" << myrank << " after WaitAll sendreqsize " << size << endl ;
int * ArrayOfSendRequests = new int[ size ] ;
int nSendRequest = mpi_access.sendRequestIds( size , ArrayOfSendRequests ) ;
int i ;
}
else {
int size = mpi_access.recvRequestIdsSize() ;
- cout << "test" << myrank << " before WaitAll recvreqsize " << size << endl ;
+ debugStream << "test" << myrank << " before WaitAll recvreqsize " << size << endl ;
mpi_access.waitAll(maxreq, RecvRequestId) ;
size = mpi_access.recvRequestIdsSize() ;
- cout << "test" << myrank << " after WaitAll recvreqsize " << size << endl ;
+ debugStream << "test" << myrank << " after WaitAll recvreqsize " << size << endl ;
int * ArrayOfRecvRequests = new int[ size ] ;
int nRecvRequest = mpi_access.recvRequestIds( size , ArrayOfRecvRequests ) ;
int i ;
}
delete [] ArrayOfRecvRequests ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
int sendrequests[maxreq] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
for ( i = 0 ; i < sendreqsize ; i++ ) {
- cout << "test" << myrank << " sendrequests[ " << i << " ] = "
+ debugStream << "test" << myrank << " sendrequests[ " << i << " ] = "
<< sendrequests[i] << endl ;
}
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length() {
- cout << "test_MPI_Access_ISend_IRecv_Length" << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv_Length" << endl ;
// MPI_Init(&argc, &argv) ;
if ( size < 2 ) {
ostringstream strstream ;
strstream << "test_MPI_Access_ISend_IRecv_Length must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_ISend_IRecv_Length" << myrank << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv_Length" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
for ( i = 0 ; i < maxreq ; i++ ) {
if ( myrank == 0 ) {
sts = mpi_access.ISend( sendbuf, 1000*i, MPI_INT, target, SendRequestId[i] ) ;
- cout << "test" << myrank << " ISend RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " ISend RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
else {
sts = mpi_access.IRecv( recvbuf[i], 1000*i, MPI_INT, target,
RecvRequestId[i] ) ;
- cout << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
+ debugStream << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
<< " tag " << mpi_access.recvMPITag(target) << endl ;
}
int j ;
if ( myrank == 0 ) {
mpi_access.status( SendRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
+ debugStream << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
<< ") : target " << target << " tag " << tag << " error " << error
<< " flag " << flag << endl ;
}
else {
mpi_access.status( RecvRequestId[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Recv RequestId "
+ debugStream << "test" << myrank << " Test(Recv RequestId "
<< RecvRequestId[j] << ") : source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount
<< " flag " << flag << endl ;
<< endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " RequestId " << RecvRequestId[j] << " recvbuf "
<< recvbuf[j][outcount-1] << " OK" << endl
}
}
else {
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " RequestId " << RecvRequestId[j] << " OK" << endl
<< "==========================================================="
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
- mpi_access.check() ;
- cout << "test" << myrank << " WaitAll" << endl ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
+ debugStream << "test" << myrank << " WaitAll" << endl ;
if ( myrank == 0 ) {
mpi_access.waitAll(maxreq, SendRequestId) ;
mpi_access.deleteRequests(maxreq, SendRequestId) ;
mpi_access.waitAll(maxreq, RecvRequestId) ;
mpi_access.deleteRequests(maxreq, RecvRequestId) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
int sendrequests[maxreq] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
if ( size < 2 ) {
ostringstream strstream ;
strstream << "test_MPI_Access_ISend_IRecv_Length_1 must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_ISend_IRecv_Length_1" << myrank << endl ;
+ debugStream << "test_MPI_Access_ISend_IRecv_Length_1" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
sts = MPI_SUCCESS ;
if ( myrank == 0 ) {
sts = mpi_access.ISend( sendbuf, 1000*i, MPI_INT, target, SendRequestId[i] ) ;
- cout << "test" << myrank << " ISend RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " ISend RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
int j ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " IProbe lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " IProbe lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
ostringstream strstream ;
<< "test" << myrank << " IProbe KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- cout << "test" << myrank << " IProbe i/j " << i << "/" << j
+ debugStream << "test" << myrank << " IProbe i/j " << i << "/" << j
<< " MPITag " << MPITag << " datatype " << datatype
<< " outcount " << outcount << " flag " << flag << endl ;
}
int target, tag, error, outcount ;
mpi_access.status( SendRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
+ debugStream << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
<< ") : target " << target << " tag " << tag << " error " << error
<< " flag " << flag << endl ;
}
else {
sts = mpi_access.IRecv( recvbuf[maxirecv], outcount, datatype, source,
RecvRequestId[maxirecv] ) ;
- cout << "test" << myrank << " maxirecv " << maxirecv << " IRecv RequestId "
+ debugStream << "test" << myrank << " maxirecv " << maxirecv << " IRecv RequestId "
<< RecvRequestId[maxirecv] << " source " << source
<< " outcount " << outcount << " tag "
<< mpi_access.recvMPITag(target) << endl ;
else if ( myrank == 1 && i == maxreq-1 && j >= maxirecv ) {
sts = mpi_access.IRecv( recvbuf[j], 1000*j, MPI_INT, target,
RecvRequestId[j] ) ;
- cout << "test" << myrank << " maxirecv " << maxirecv << " IRecv RequestId "
+ debugStream << "test" << myrank << " maxirecv " << maxirecv << " IRecv RequestId "
<< RecvRequestId[j] << " target " << target << " length " << 1000*j
<< " tag " << mpi_access.recvMPITag(target) << endl ;
maxirecv = maxirecv + 1 ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< endl << "test" << myrank << " KO" << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
int flag ;
if ( myrank == 0 ) {
mpi_access.testAll( maxreq, SendRequestId, flag ) ;
- cout << "test" << myrank << " TestAll SendRequest flag " << flag << endl ;
+ debugStream << "test" << myrank << " TestAll SendRequest flag " << flag << endl ;
}
else {
int i ;
<< " != maxreq " << maxreq << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
while ( maxirecv > 0 ) {
for ( i = 1 ; i < maxreq ; i++ ) {
- cout << "test" << myrank << " IProbe : " << endl ;
+ debugStream << "test" << myrank << " IProbe : " << endl ;
sts = mpi_access.test( RecvRequestId[i] , flag ) ;
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " flag " << flag << " lenerr "
+ debugStream << "test" << myrank << " flag " << flag << " lenerr "
<< lenerr << " " << msgerr << " maxirecv " << maxirecv << endl ;
if ( sts != MPI_SUCCESS ) {
ostringstream strstream ;
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- cout << "test" << myrank << " Test flag " << flag << endl ;
+ debugStream << "test" << myrank << " Test flag " << flag << endl ;
if ( flag ) {
int tag, error ;
mpi_access.status( RecvRequestId[i] , source , tag , error ,
<< " recvbuf " << recvbuf[i][outcount-1] << endl
<< "========================================================"
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
<< " KO" << " i " << i << endl
<< "========================================================"
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
maxirecv = maxirecv - 1 ;
}
}
mpi_access.testAll( maxreq, RecvRequestId, flag ) ;
- cout << "test" << myrank << " TestAll RecvRequest flag " << flag << endl ;
+ debugStream << "test" << myrank << " TestAll RecvRequest flag " << flag << endl ;
}
- mpi_access.check() ;
- cout << "test" << myrank << " WaitAll :" << endl ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
+ debugStream << "test" << myrank << " WaitAll :" << endl ;
if ( myrank == 0 ) {
mpi_access.waitAll( maxreq, SendRequestId ) ;
mpi_access.deleteRequests( maxreq, SendRequestId ) ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_Probe() {
- cout << "test_MPI_Access_Probe" << endl ;
+ debugStream << "test_MPI_Access_Probe" << endl ;
// MPI_Init(&argc, &argv) ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 2 ) {
- cout << "test_MPI_Access_Probe must be runned with 2 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_Probe must be runned with 2 procs") ;
+ cerr << "test_MPI_Access_Probe must be runned with 2 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_Probe must be runned with 2 procs") ;
+ return;
}
- cout << "test_MPI_Access_Probe" << myrank << endl ;
+ debugStream << "test_MPI_Access_Probe" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
for ( i = 0 ; i < 10 ; i++ ) {
if ( myrank == 0 ) {
sts = mpi_access.send(&i,1,MPI_INT,target, RequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< endl ;
}
else {
int source, tag, outcount ;
MPI_Datatype datatype ;
sts = mpi_access.probe(target, source, tag, datatype, outcount ) ;
- cout << "test" << myrank << " Probe target " << target << " source " << source
+ debugStream << "test" << myrank << " Probe target " << target << " source " << source
<< " tag " << tag << " outcount " << outcount << endl ;
int recvbuf ;
sts = mpi_access.recv(&recvbuf,outcount,datatype,source, RequestId[i],
<< " recvbuf " << recvbuf << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
mpi_access.testAll(10,RequestId,flag) ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
mpi_access.waitAll(10,RequestId) ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
mpi_access.barrier() ;
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_SendRecv() {
- cout << "MPIAccessTest::test_MPI_Access_SendRecv" << endl ;
+ debugStream << "MPIAccessTest::test_MPI_Access_SendRecv" << endl ;
// MPI_Init(&argc, &argv) ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 2 ) {
- cout << "MPIAccessTest::test_MPI_Access_SendRecv must be runned with 2 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_SendRecv must be runned with 2 procs") ;
+ cerr << "MPIAccessTest::test_MPI_Access_SendRecv must be runned with 2 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_SendRecv must be runned with 2 procs") ;
+ return;
}
- cout << "MPIAccessTest::test_MPI_Access_SendRecv" << myrank << endl ;
+ debugStream << "MPIAccessTest::test_MPI_Access_SendRecv" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
// outcount = mpi_access.MPIOutCount( recvRequestId[i] ) ;
outcount = 1 ;
}
- cout << "test" << myrank << " Send sendRequestId " << sendRequestId[i]
+ debugStream << "test" << myrank << " Send sendRequestId " << sendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target)
<< " recvRequestId " << recvRequestId[i]
<< " tag " << mpi_access.recvMPITag(target)
<< " recvbuf " << recvbuf << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
mpi_access.waitAll(10,sendRequestId) ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
mpi_access.waitAll(10,recvRequestId) ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
int sendrequests[10] ;
int sendreqsize = mpi_access.sendRequestIds( target , 10 , sendrequests ) ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
int recvrequests[10] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_Send_Recv() {
- cout << "test_MPI_Access_Send_Recv" << endl ;
+ debugStream << "test_MPI_Access_Send_Recv" << endl ;
int size ;
int myrank ;
MPI_Comm_rank(MPI_COMM_WORLD,&myrank) ;
if ( size < 2 ) {
- cout << "test_MPI_Access_Send_Recv must be runned with 2 procs" << endl ;
- CPPUNIT_FAIL("test_MPI_Access_Send_Recv must be runned with 2 procs") ;
+ cerr << "test_MPI_Access_Send_Recv must be runned with 2 procs" << endl ;
+ //CPPUNIT_FAIL("test_MPI_Access_Send_Recv must be runned with 2 procs") ;
+ return;
}
- cout << "test_MPI_Access_Send_Recv" << myrank << endl ;
+ debugStream << "test_MPI_Access_Send_Recv" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
for ( i = 0 ; i < 10 ; i++ ) {
if ( myrank == 0 ) {
sts = mpi_access.send(&i,1,MPI_INT,target, RequestId[i]) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
else {
sts = mpi_access.recv(&recvbuf,1,MPI_INT,target, RequestId[i],&outcount) ;
//int source, tag, error, outcount ;
//mpi_access.Status( RequestId[i], source, tag, error, outcount, true) ;
- cout << "test" << myrank << " Recv RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Recv RequestId " << RequestId[i]
<< " tag " << mpi_access.recvMPITag(target)
<< " outcount " << outcount << endl ;
if ( (outcount != 1) | (recvbuf != i) ) {
<< " recvbuf " << recvbuf << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check();
}
int flag ;
mpi_access.testAll(10,RequestId,flag) ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
mpi_access.waitAll(10,RequestId) ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check();
if ( myrank == 0 ) {
int sendrequests[10] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_Send_Recv_Length() {
- cout << "test_MPI_Access_Send_Recv_Length" << endl ;
+ debugStream << "test_MPI_Access_Send_Recv_Length" << endl ;
// MPI_Init(&argc, &argv) ;
if ( size < 2 ) {
ostringstream strstream ;
strstream << "test_MPI_Access_Send_Recv_Length must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_Send_Recv_Length" << myrank << endl ;
+ debugStream << "test_MPI_Access_Send_Recv_Length" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
for ( i = 0 ; i < 10 ; i++ ) {
if ( myrank == 0 ) {
sts = mpi_access.send( sendbuf, 1000*i, MPI_INT, target, RequestId[i] ) ;
- cout << "test" << myrank << " Send RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Send RequestId " << RequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
else {
}
//int source, tag, error, outcount ;
//mpi_access.Status( RequestId[i], source, tag, error, outcount, true) ;
- cout << "test" << myrank << " Recv RequestId " << RequestId[i]
+ debugStream << "test" << myrank << " Recv RequestId " << RequestId[i]
<< " tag " << mpi_access.recvMPITag(target)
<< " outcount " << outcount << endl ;
recvbufok = true ;
for ( j = 0 ; j < outcount ; j++ ) {
if ( recvbuf[j] != j ) {
- cout << "test" << myrank << " recvbuf[ " << j << " ] = " << recvbuf[j]
+ debugStream << "test" << myrank << " recvbuf[ " << j << " ] = " << recvbuf[j]
<< endl ;
recvbufok = false ;
break ;
<< " recvbuf " << recvbuf << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
}
int flag ;
mpi_access.testAll(10,RequestId,flag) ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
mpi_access.waitAll(10,RequestId) ;
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
int sendrequests[10] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
}
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}
void MPIAccessTest::test_MPI_Access_Time() {
- cout << "test_MPI_Access_Time" << endl ;
+ debugStream << "test_MPI_Access_Time" << endl ;
// MPI_Init(&argc, &argv) ;
if ( size < 2 ) {
ostringstream strstream ;
strstream << "test_MPI_Access_Time must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
- cout << "test_MPI_Access_Time" << myrank << endl ;
+ debugStream << "test_MPI_Access_Time" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
#define maxreq 10
if ( myrank >= 2 ) {
- cout << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->Barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->Barrier" << endl ;
mpi_access.barrier() ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->Barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->Barrier" << endl ;
delete group ;
- cout << "test_MPI_Access_Time" << myrank << " OK" << endl ;
+ debugStream << "test_MPI_Access_Time" << myrank << " OK" << endl ;
return ;
}
sts = mpi_access.ISend( &aSendTimeMsg[i] , 1 ,
mpi_access.timeType() , target ,
SendTimeRequestId[i]) ;
- cout << "test" << myrank << " ISend RequestId " << SendTimeRequestId[i]
+ debugStream << "test" << myrank << " ISend RequestId " << SendTimeRequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
sendbuf[i] = i ;
sts = mpi_access.ISend(&sendbuf[i],1,MPI_INT,target, SendRequestId[i]) ;
- cout << "test" << myrank << " ISend RequestId " << SendRequestId[i]
+ debugStream << "test" << myrank << " ISend RequestId " << SendRequestId[i]
<< " tag " << mpi_access.sendMPITag(target) << endl ;
}
else {
sts = mpi_access.IRecv( &aRecvTimeMsg[i] , 1 ,
mpi_access.timeType() , target ,
RecvTimeRequestId[i]) ;
- cout << "test" << myrank << " IRecv RequestId " << RecvTimeRequestId[i]
+ debugStream << "test" << myrank << " IRecv RequestId " << RecvTimeRequestId[i]
<< " tag " << mpi_access.recvMPITag(target) << endl ;
sts = mpi_access.IRecv(&recvbuf[i],1,MPI_INT,target, RecvRequestId[i]) ;
- cout << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
+ debugStream << "test" << myrank << " IRecv RequestId " << RecvRequestId[i]
<< " tag " << mpi_access.recvMPITag(target) << endl ;
}
int j ;
if ( myrank == 0 ) {
mpi_access.status( SendTimeRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Send TimeRequestId " << SendTimeRequestId[j]
+ debugStream << "test" << myrank << " Test(Send TimeRequestId " << SendTimeRequestId[j]
<< ") : target " << target << " tag " << tag << " error " << error
<< " flag " << flag << aSendTimeMsg[j] << endl ;
}
else {
mpi_access.status( RecvTimeRequestId[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Recv TimeRequestId "
+ debugStream << "test" << myrank << " Test(Recv TimeRequestId "
<< RecvTimeRequestId[j] << ") : source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount
<< " flag " << flag << aRecvTimeMsg[j] << endl ;
<< " RecvTimeRequestId " << RecvTimeRequestId[j] << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " RecvTimeRequestId " << RecvTimeRequestId[j] << " OK" << endl
<< "==========================================================="
if ( myrank == 0 ) {
mpi_access.status( SendRequestId[j], target, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
+ debugStream << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
<< ") : target " << target << " tag " << tag << " error " << error
<< " flag " << flag << endl ;
}
else {
mpi_access.status( RecvRequestId[j], source, tag, error, outcount,
true ) ;
- cout << "test" << myrank << " Test(Recv RequestId "
+ debugStream << "test" << myrank << " Test(Recv RequestId "
<< RecvRequestId[j] << ") : source " << source << " tag " << tag
<< " error " << error << " outcount " << outcount
<< " flag " << flag << endl ;
<< outcount << " recvbuf " << recvbuf[j] << " KO" << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " RequestId " << RecvRequestId[j] << " OK" << endl
<< "==========================================================="
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
- cout << "test" << myrank << " lenerr " << lenerr << " "
+ debugStream << "test" << myrank << " lenerr " << lenerr << " "
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
i = i + 1 ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
mpi_access.waitAll(maxreq, SendTimeRequestId) ;
mpi_access.deleteRequests(maxreq, SendTimeRequestId) ;
mpi_access.waitAll(maxreq, RecvRequestId) ;
mpi_access.deleteRequests(maxreq, RecvRequestId) ;
}
- mpi_access.check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access.check() ;
if ( myrank == 0 ) {
int sendrequests[2*maxreq] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
}
- cout << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->Barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->Barrier" << endl ;
mpi_access.barrier() ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->Barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->Barrier" << endl ;
delete group ;
// MPI_Finalize();
- cout << "test_MPI_Access_Time" << myrank << " OK" << endl ;
+ debugStream << "test_MPI_Access_Time" << myrank << " OK" << endl ;
return ;
}
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 << "==========================================================="
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
return ;
void MPIAccessTest::test_MPI_Access_Time_0() {
- cout << "test_MPI_Access_Time_0" << endl ;
+ debugStream << "test_MPI_Access_Time_0" << endl ;
// MPI_Init(&argc, &argv) ;
<< "mpirun -np <nbprocs> test_MPI_Access_Time_0" <<endl
<< " nbprocs =2" << endl
<< "test must be runned with 2 procs" << endl ;
- cout << strstream.str() << endl ;
- CPPUNIT_FAIL( strstream.str() ) ;
+ cerr << strstream.str() << endl ;
+ //CPPUNIT_FAIL( strstream.str() ) ;
+ return;
}
#define maxreq 100
double dt[2] = {2., 1.} ;
double maxt = maxreq/dt[myrank] ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << endl ;
ParaMEDMEM::CommInterface interface ;
ParaMEDMEM::MPIAccess * mpi_access = new ParaMEDMEM::MPIAccess( group ) ;
if ( myrank >= 2 ) {
- cout << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
mpi_access->barrier() ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->barrier" << endl ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
mpi_access->barrier() ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->barrier" << endl ;
delete group ;
delete mpi_access ;
- cout << "test_MPI_Access_Time" << myrank << " OK" << endl ;
+ debugStream << "test_MPI_Access_Time" << myrank << " OK" << endl ;
return ;
}
// mpi_access->Trace() ;
int istep = 0 ;
for ( t = 0 ; t < maxt ; t = t+dt[myrank] ) {
- cout << "test" << myrank << " ==========================TIME " << t
+ debugStream << "test" << myrank << " ==========================TIME " << t
<< " ==========================" << endl ;
if ( myrank == 0 ) {
aSendTimeMsg[istep].time = t ;
sts = mpi_access->ISend( &aSendTimeMsg[istep] , 1 ,
mpi_access->timeType() , target ,
SendTimeRequestId[istep]) ;
- cout << "test" << myrank << " ISend TimeRequestId " << SendTimeRequestId[istep]
+ debugStream << "test" << myrank << " ISend TimeRequestId " << SendTimeRequestId[istep]
<< " tag " << mpi_access->MPITag(SendTimeRequestId[istep]) << endl ;
chksts( sts , myrank , mpi_access ) ;
sendbuf[istep] = istep ;
sts = mpi_access->ISend(&sendbuf[istep],1,MPI_INT,target, SendRequestId[istep]) ;
- cout << "test" << myrank << " ISend Data RequestId " << SendRequestId[istep]
+ debugStream << "test" << myrank << " ISend Data RequestId " << SendRequestId[istep]
<< " tag " << mpi_access->MPITag(SendRequestId[istep]) << endl ;
chksts( sts , myrank , mpi_access ) ;
//CheckSent
chksts( sts , myrank , mpi_access ) ;
if ( flag ) {
mpi_access->deleteRequest( sendrequests[j] ) ;
- cout << "test" << myrank << " " << j << ". " << sendrequests[j]
+ debugStream << "test" << myrank << " " << j << ". " << sendrequests[j]
<< " sendrequest deleted" << endl ;
}
}
sts = mpi_access->IRecv( &aRecvTimeMsg[lasttime+1] , 1 ,
mpi_access->timeType() ,
target , RecvTimeRequestId[lasttime+1]) ;
- cout << "test" << myrank << " t == 0 IRecv TimeRequestId "
+ debugStream << "test" << myrank << " t == 0 IRecv TimeRequestId "
<< RecvTimeRequestId[lasttime+1]
<< " MPITag " << mpi_access->MPITag( RecvTimeRequestId[lasttime+1] )
<< " MPICompleted "
chksts( sts , myrank , mpi_access ) ;
}
else {
- cout << "test" << myrank << " t # 0 lasttime " << lasttime << endl ;
+ debugStream << "test" << myrank << " t # 0 lasttime " << lasttime << endl ;
//InitialOutTime
//==============
bool outtime = false ;
<< aRecvTimeMsg[lasttime-1].time << " KO" << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank << " t " << t << " > "
<< "aRecvTimeMsg[ " << lasttime << "-1 ].time "
<< aRecvTimeMsg[lasttime-1].time << " OK" << endl
if ( t <= aRecvTimeMsg[lasttime].time ) {
outtime = false ;
}
- cout << "test" << myrank << " while outtime( " << outtime << " && t " << t
+ debugStream << "test" << myrank << " while outtime( " << outtime << " && t " << t
<< " > aRecvTimeMsg[ " << lasttime << " ] "
<< aRecvTimeMsg[lasttime].time << " )" << endl ;
while ( !outtime && (t > aRecvTimeMsg[lasttime].time) ) {
//===========
sts = mpi_access->wait( RecvTimeRequestId[lasttime] ) ;
chksts( sts , myrank , mpi_access ) ;
- cout << "test" << myrank << " Wait done RecvTimeRequestId "
+ debugStream << "test" << myrank << " Wait done RecvTimeRequestId "
<< RecvTimeRequestId[lasttime] << " lasttime " << lasttime
<< " tag " << mpi_access->MPITag(RecvTimeRequestId[lasttime])
<< aRecvTimeMsg[lasttime] << endl ;
double deltatime = aRecvTimeMsg[lasttime].deltatime ;
//double maxtime = aRecvTimeMsg[lasttime].maxtime ;
double nexttime = aRecvTimeMsg[lasttime].time + deltatime ;
- cout << "test" << myrank << " t " << t << " lasttime " << lasttime
+ debugStream << "test" << myrank << " t " << t << " lasttime " << lasttime
<< " deltatime " << deltatime
<< " nexttime " << nexttime << endl ;
//if ( nexttime < maxtime && t > nexttime ) {
//sts = mpi_access->cancel( source, datatype, outcount ,
//RecvRequestId[lasttime] ,
cancelflag ) ;
- cout << "test" << myrank << " Recv TO CANCEL RequestId "
+ debugStream << "test" << myrank << " Recv TO CANCEL RequestId "
<< RecvRequestId[lasttime]
<< " tag " << mpi_access->recvMPITag( target )
<< " cancelflag " << cancelflag << endl ;
//sts = mpi_access->cancel( source, datatype, outcount ,
//RecvRequestId[lasttime] ,
cancelflag ) ;
- cout << "test" << myrank << " Time TO CANCEL RequestId "
+ debugStream << "test" << myrank << " Time TO CANCEL RequestId "
<< RecvRequestId[lasttime]
<< " tag " << mpi_access->recvMPITag( target )
<< " cancelflag " << cancelflag << endl ;
else {
//DoRecv
//======
- cout << "test" << myrank << " Recv target " << target
+ debugStream << "test" << myrank << " Recv target " << target
<< " lasttime " << lasttime
<< " lasttime-1 " << aRecvTimeMsg[lasttime-1]
<< " lasttime " << aRecvTimeMsg[lasttime]
<< endl ;
sts = mpi_access->recv(&recvbuf[lasttime],1,MPI_INT,target,
RecvRequestId[lasttime]) ;
- cout << "test" << myrank << " Recv RequestId "
+ debugStream << "test" << myrank << " Recv RequestId "
<< RecvRequestId[lasttime]
<< " tag " << mpi_access->recvMPITag( target )
<< endl ;
sts = mpi_access->IRecv( &aRecvTimeMsg[lasttime+1] , 1 ,
mpi_access->timeType() , target ,
RecvTimeRequestId[lasttime+1]) ;
- cout << "test" << myrank << " IRecv TimeRequestId "
+ debugStream << "test" << myrank << " IRecv TimeRequestId "
<< RecvTimeRequestId[lasttime+1] << " MPITag "
<< mpi_access->MPITag( RecvTimeRequestId[lasttime+1] )
<< " MPICompleted "
<< RecvRequestId[lasttime-1] << " " << RecvRequestId[lasttime] << endl
<< "==========================================================="
<< endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "==========================================================="
+ debugStream << "==========================================================="
<< endl << "test" << myrank
<< " aRecvTimeMsg[ " << lasttime << "-1 ].time "
<< aRecvTimeMsg[lasttime-1].time << " < t " << t << " <= "
istep = istep + 1 ;
}
- cout << "test" << myrank << " Barrier :" << endl ;
+ debugStream << "test" << myrank << " Barrier :" << endl ;
mpi_access->barrier() ;
- mpi_access->check() ;
+ if (MPI_ACCESS_VERBOSE) mpi_access->check() ;
if ( myrank == 0 ) {
//CheckFinalSent
//==============
- cout << "test" << myrank << " CheckFinalSent :" << endl ;
+ debugStream << "test" << myrank << " CheckFinalSent :" << endl ;
int sendrequests[2*maxreq] ;
int sendreqsize = mpi_access->sendRequestIds( target , 2*maxreq , sendrequests ) ;
int j ;
sts = mpi_access->wait( sendrequests[j] ) ;
chksts( sts , myrank , mpi_access ) ;
mpi_access->deleteRequest( sendrequests[j] ) ;
- cout << "test" << myrank << " " << j << ". " << sendrequests[j] << " deleted"
+ debugStream << "test" << myrank << " " << j << ". " << sendrequests[j] << " deleted"
<< endl ;
}
}
else {
- cout << "test" << myrank << " CheckFinalRecv :" << endl ;
+ debugStream << "test" << myrank << " CheckFinalRecv :" << endl ;
int recvrequests[2*maxreq] ;
int recvreqsize = mpi_access->recvRequestIds( target , 2*maxreq , recvrequests ) ;
int cancelflag ;
sts = mpi_access->cancel( recvrequests[j] , cancelflag ) ;
chksts( sts , myrank , mpi_access ) ;
mpi_access->deleteRequest( recvrequests[j] ) ;
- cout << "test" << myrank << " " << j << ". " << recvrequests[j] << " deleted"
+ debugStream << "test" << myrank << " " << j << ". " << recvrequests[j] << " deleted"
<< " cancelflag " << cancelflag << endl ;
}
int source, MPITag, outcount , flag ;
//sts = mpi_access->cancel( source, datatype, outcount ,
//RecvRequestId[lasttime] ,
cancelflag ) ;
- cout << "test" << myrank << " TO CANCEL RequestId "
+ debugStream << "test" << myrank << " TO CANCEL RequestId "
<< RecvRequestId[lasttime]
<< " tag " << mpi_access->recvMPITag( target )
<< " cancelflag " << cancelflag << endl ;
chksts( sts , myrank , mpi_access ) ;
}
}
- mpi_access->check() ;
+ if(MPI_ACCESS_VERBOSE) mpi_access->check() ;
if ( myrank == 0 ) {
int sendrequests[2*maxreq] ;
strstream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " sendreqsize " << sendreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
strstream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " KO" << endl
<< "=========================================================" << endl ;
- cout << strstream.str() << endl ;
+ debugStream << strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
else {
- cout << "=========================================================" << endl
+ debugStream << "=========================================================" << endl
<< "test" << myrank << " recvreqsize " << recvreqsize << " OK" << endl
<< "=========================================================" << endl ;
}
int i ;
for ( i = 0 ; i <= lasttime ; i++ ) {
- cout << "test" << myrank << " " << i << ". RecvTimeMsg "
+ debugStream << "test" << myrank << " " << i << ". RecvTimeMsg "
<< aRecvTimeMsg[i].time << " recvbuf " << recvbuf[i] << endl ;
}
- cout << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " --> mpi_access->barrier" << endl ;
mpi_access->barrier() ;
- cout << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->barrier" << endl ;
+ debugStream << "test_MPI_Access_Time_0 rank" << myrank << " <-- mpi_access->barrier" << endl ;
delete group ;
delete mpi_access ;
// MPI_Finalize();
- cout << "test" << myrank << " OK" << endl ;
+ debugStream << "test" << myrank << " OK" << endl ;
return ;
}