Salome HOME
Fixing ugly stack overflow in test_MPI_Access_ISend_IRecv_Length* tests. abn/mpi_leaks
authorabn <adrien.bruneton@cea.fr>
Thu, 22 Oct 2015 09:12:40 +0000 (11:12 +0200)
committerabn <adrien.bruneton@cea.fr>
Thu, 22 Oct 2015 09:12:40 +0000 (11:12 +0200)
src/ParaMEDMEM/MPIAccess.cxx
src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length.cxx
src/ParaMEDMEMTest/test_MPI_Access_ISend_IRecv_Length_1.cxx

index b9389cdcc509fd7c54b8bf0d70d96fa46e1df18c..b7fe80393e94e8ebd1f7cc94f17f9e012cdd010f 100644 (file)
@@ -234,29 +234,29 @@ namespace ParaMEDMEM
     The default is [ 0 , MPI_TAG_UB], MPI_TAG_UB being the maximum
     value in an implementation of MPI (minimum 32767 = 2**15-1).
     On awa with the implementation lam MPI_TAG_UB value is
-    7353944. The norma MPI specify that value is the same in all
+    7353944. The norm MPI specify that value is the same in all
     processes started by mpirun.
     In the case of the use of the same IntraCommunicator in a process
     for several distinct data flows (or for several IntraCommunicators
-    with common processes), that permits to avoid ambibuity
+    with common processes), that permits to avoid ambiguity
     and may help debug.
 
     . In MPIAccess the tags have two parts (#define MODULO_TAG 10) :
     + The last decimal digit decimal correspond to MPI_DataType ( 1 for
     TimeMessages, 2 for MPI_INT and 3 for MPI_DOUBLE)
-    + The value of other digits correspond to a circular numero for each
+    + The value of other digits correspond to a circular number for each
     message.
-    + A TimeMessage and the associated DataMessage have the same numero
+    + A TimeMessage and the associated DataMessage have the same number
     (but the types are different and the tags also).
 
     . For a Send of a message from a process "source" to a process
     "target", we have _send_MPI_tag[target] in the process
-    source (it contains the last "tag" used for the Send of a pour l'envoi de
+    source (it contains the last "tag" used for the Send of a
     message to the process target).
     And in the process "target" which receive that message, we have
     _recv_MPI_Tag[source] (it contains the last "tag" used for the Recv
     of messages from the process source).
-    Naturally in the MPI norma the values of that tags must be the same.
+    Naturally in the MPI norm the values of that tags must be the same.
   */
   int MPIAccess::newSendTag( MPI_Datatype datatype, int destrank , int method ,
                              bool asynchronous, int &RequestId )
index 546f60a0ff853406e3796fb2a612f7a642688a0f..d1b556c3da8818056d24be0c53117679f699a8cb 100644 (file)
@@ -80,7 +80,7 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length() {
   int RecvRequestId[maxreq] ;
   int sts ;
   int sendbuf[1000*(maxreq-1)] ;
-  int recvbuf[maxreq-1][1000*(maxreq-1)] ;
+  int recvbuf[maxreq][1000*(maxreq-1)] ;
   int i ;
   for ( i = 0 ; i < 1000*(maxreq-1) ; i++ ) {
     sendbuf[i] = i ;
@@ -186,7 +186,6 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length() {
   if ( myrank == 0 ) {
     int sendrequests[maxreq] ;
     int sendreqsize = mpi_access.sendRequestIds( target , maxreq , sendrequests ) ;
-    sendreqsize = mpi_access.sendRequestIds( target , maxreq , sendrequests ) ;
     if ( sendreqsize != 0 ) {
       ostringstream strstream ;
       strstream << "=========================================================" << endl
@@ -203,7 +202,7 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length() {
   }
   else {
     int recvrequests[maxreq] ;
-    int recvreqsize = mpi_access.sendRequestIds( target , maxreq , recvrequests ) ;
+    int recvreqsize = mpi_access.recvRequestIds( target , maxreq , recvrequests ) ;
     if ( recvreqsize != 0 ) {
       ostringstream strstream ;
       strstream << "=========================================================" << endl
index a60165d800ea1c7553b9c285b6d25ec6d3268c0e..966bfc457865aa7ad080b8665b3584fe06ed8c33 100644 (file)
@@ -78,7 +78,7 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
   int RecvRequestId[maxreq] ;
   int sts ;
   int sendbuf[1000*(maxreq-1)] ;
-  int recvbuf[maxreq-1][1000*(maxreq-1)] ;
+  int recvbuf[maxreq][1000*(maxreq-1)] ;
   int maxirecv = 1 ;
   int i ;
   RecvRequestId[0] = -1 ;