Salome HOME
Various fixes for test runs - introducing MEDCOUPLING_RESOURCE_DIR env variable
[tools/medcoupling.git] / src / ParaMEDMEM / MPIAccess.cxx
index 8b5878dc939d18b4b7d541609801d7176a29da23..8ddaf698c2779ae943ae2895335c4b85535f1135 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -290,7 +290,7 @@ namespace MEDCoupling
   {
     int size = 0;
     for (int i = 0 ; i < _processor_group_size ; i++ )
-      size += _send_requests[ i ].size() ;
+      size += (int)_send_requests[ i ].size() ;
     return size ;
   }
 
@@ -315,7 +315,7 @@ namespace MEDCoupling
   {
     int size = 0 ;
     for (int i = 0 ; i < _processor_group_size ; i++ )
-      size += _recv_requests[ i ].size() ;
+      size += (int)_recv_requests[ i ].size() ;
     return size ;
   }
 
@@ -344,7 +344,7 @@ namespace MEDCoupling
     list< int >::const_iterator iter ;
     for (iter = _send_requests[ destrank ].begin() ; iter != _send_requests[destrank].end() ; iter++ )
       ArrayOfSendRequests[i++] = *iter ;
-    return _send_requests[destrank].size() ;
+    return (int)_send_requests[destrank].size() ;
   }
 
   // Returns in ArrayOfRecvRequests with the dimension "size" all the
@@ -358,7 +358,7 @@ namespace MEDCoupling
     _recv_requests[ sourcerank ] ;
     for (iter = _recv_requests[ sourcerank ].begin() ; iter != _recv_requests[sourcerank].end() ; iter++ )
       ArrayOfRecvRequests[i++] = *iter ;
-    return _recv_requests[sourcerank].size() ;
+    return (int)_recv_requests[sourcerank].size() ;
   }
 
   // Send in synchronous mode count values of type datatype from buffer to target
@@ -407,8 +407,8 @@ namespace MEDCoupling
         int outcount = 0 ;
         if ( sts == MPI_SUCCESS )
           {
-            MPI_Datatype datatype = MPIDatatype( RequestId ) ;
-            _comm_interface.getCount(MPIStatus( RequestId ), datatype, &outcount ) ;
+            MPI_Datatype datatype2 = MPIDatatype( RequestId ) ;
+            _comm_interface.getCount(MPIStatus( RequestId ), datatype2, &outcount ) ;
             setMPIOutCount( RequestId , outcount ) ;
             setMPICompleted( RequestId , true ) ;
             deleteStatus( RequestId ) ;
@@ -1052,6 +1052,14 @@ namespace MEDCoupling
     return aextent ;
   }
 
+  // Returns the MPI size of a MPI_LONG
+  MPI_Aint MPIAccess::longExtent() const
+  {
+    MPI_Aint aextent, lbound ;
+    MPI_Type_get_extent( MPI_LONG , &lbound, &aextent ) ;
+    return aextent ;
+  }
+
   // Returns the MPI size of a MPI_DOUBLE
   MPI_Aint MPIAccess::doubleExtent() const
   {