Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deal with pipes
[tools/medcoupling.git]
/
src
/
ParaMEDMEMTest
/
test_MPI_Access_IProbe.cxx
diff --git
a/src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx
b/src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx
index 92fdcf2f2a6e2db2897f3b5ef9a1e7a17f9e1cc8..653b68627c54e3f4b7ff29ac257f98f3df66d582 100644
(file)
--- a/
src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx
+++ b/
src/ParaMEDMEMTest/test_MPI_Access_IProbe.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D
+// Copyright (C) 2007-201
6
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
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-43,11
+43,11
@@
#define ENABLE_FORCED_FAILURES
using namespace std;
#define ENABLE_FORCED_FAILURES
using namespace std;
-using namespace
ParaMEDMEM
;
+using namespace
MEDCoupling
;
void MPIAccessTest::test_MPI_Access_IProbe() {
void MPIAccessTest::test_MPI_Access_IProbe() {
-
cout
<< "test_MPI_Access_IProbe" << endl ;
+
debugStream
<< "test_MPI_Access_IProbe" << endl ;
// MPI_Init(&argc, &argv) ;
// MPI_Init(&argc, &argv) ;
@@
-58,18
+58,19
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
if ( size < 2 ) {
ostringstream strstream ;
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() ) ;
+ strstream << "test_MPI_Access_IProbe must be run with 2 procs" << endl ;
+ 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 ;
+
MEDCoupling
::CommInterface interface ;
-
ParaMEDMEM::MPIProcessorGroup* group = new ParaMEDMEM
::MPIProcessorGroup(interface) ;
+
MEDCoupling::MPIProcessorGroup* group = new MEDCoupling
::MPIProcessorGroup(interface) ;
-
ParaMEDMEM
::MPIAccess mpi_access( group ) ;
+
MEDCoupling
::MPIAccess mpi_access( group ) ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
if ( myrank >= 2 ) {
mpi_access.barrier() ;
@@
-86,7
+87,7
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
if ( myrank == 0 ) {
sendbuf[i] = i ;
sts = mpi_access.ISend(&sendbuf[i],1,MPI_INT,target, RequestId[i]) ;
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 {
<< endl ;
}
else {
@@
-96,12
+97,12
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
MPI_Datatype datatype ;
sts = mpi_access.IProbe(target, source, tag, datatype, outcount, flag ) ;
if ( flag ) {
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 {
<< " 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 ) {
sleep( 1 ) ;
}
if ( flag ) {
@@
-115,10
+116,10
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
<< " recvbuf " << recvbuf << " KO" << endl
<< "==========================================================="
<< endl ;
<< " recvbuf " << recvbuf << " KO" << endl
<< "==========================================================="
<< endl ;
-
cout
<< strstream.str() << endl ;
+
debugStream
<< strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
CPPUNIT_FAIL( strstream.str() ) ;
}
-
cout
<< "==========================================================="
+
debugStream
<< "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " recvbuf " << recvbuf << " OK" << endl
<< "==========================================================="
<< endl << "test" << myrank << " outcount " << outcount
<< " recvbuf " << recvbuf << " OK" << endl
<< "==========================================================="
@@
-129,7
+130,7
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
char msgerr[MPI_MAX_ERROR_STRING] ;
int lenerr ;
mpi_access.errorString(sts, msgerr, &lenerr) ;
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 ) {
<< msgerr << endl ;
if ( sts != MPI_SUCCESS ) {
@@
-138,10
+139,10
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
<< "test" << myrank << " KO"
<< "==========================================================="
<< endl ;
-
cout
<< strstream.str() << endl ;
+
debugStream
<< strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+
if(MPI_ACCESS_VERBOSE)
mpi_access.check() ;
}
int flag ;
mpi_access.testAll(10,RequestId,flag) ;
}
int flag ;
mpi_access.testAll(10,RequestId,flag) ;
@@
-151,10
+152,10
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
if ( !flag ) {
ostringstream strstream ;
strstream << "test" << myrank << " flag " << flag << " KO" << endl ;
-
cout
<< strstream.str() << endl ;
+
debugStream
<< strstream.str() << endl ;
CPPUNIT_FAIL( strstream.str() ) ;
}
CPPUNIT_FAIL( strstream.str() ) ;
}
- mpi_access.check() ;
+
if(MPI_ACCESS_VERBOSE)
mpi_access.check() ;
mpi_access.barrier() ;
mpi_access.barrier() ;
@@
-162,7
+163,7
@@
void MPIAccessTest::test_MPI_Access_IProbe() {
// MPI_Finalize();
// MPI_Finalize();
-
cout
<< "test" << myrank << " OK" << endl ;
+
debugStream
<< "test" << myrank << " OK" << endl ;
return ;
}
return ;
}