X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParaMEDMEM%2FMPIAccess.cxx;h=8b5878dc939d18b4b7d541609801d7176a29da23;hb=9727e779d56acece98be02cdccd0f99cc5ef0fa2;hp=f93e36aa1215bb3f4b79f93601ab31065f9438c7;hpb=79386ac5c73f8365c428b8ef595c4ef004959667;p=tools%2Fmedcoupling.git diff --git a/src/ParaMEDMEM/MPIAccess.cxx b/src/ParaMEDMEM/MPIAccess.cxx index f93e36aa1..8b5878dc9 100644 --- a/src/ParaMEDMEM/MPIAccess.cxx +++ b/src/ParaMEDMEM/MPIAccess.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2019 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 @@ -137,7 +137,7 @@ namespace MEDCoupling array_of_displacements[0] = 0 ; array_of_displacements[1] = sizeof(double) ; array_of_displacements[2] = 2*sizeof(double) ; - MPI_Type_struct(3, array_of_blocklengths, array_of_displacements, + MPI_Type_create_struct(3, array_of_blocklengths, array_of_displacements, array_of_types, &_MPI_TIME) ; MPI_Type_commit(&_MPI_TIME) ; } @@ -170,7 +170,7 @@ namespace MEDCoupling "_MapOfRequestStruct". That structure RequestStruct give the possibility to manage the structures MPI_Request and MPI_Status * of MPI. It give - also the possibility to get informations about that request : + also the possibility to get information about that request : target, send/recv, tag, [a]synchronous, type, outcount. . That identifier is used to control an asynchronous request @@ -391,7 +391,7 @@ namespace MEDCoupling // Receive (read) in synchronous mode count values of type datatype in buffer from source // (returns RequestId identifier even if the corresponding structure is deleted : // it is only in order to have the same signature as the asynchronous mode) - // The output argument OutCount is optionnal : *OutCount <= count + // The output argument OutCount is optional : *OutCount <= count int MPIAccess::recv(void* buffer, int count, MPI_Datatype datatype, int source, int &RequestId, int *OutCount) { int sts = MPI_SUCCESS ; @@ -865,9 +865,9 @@ namespace MEDCoupling int MPIAccess::cancel( int source, int theMPITag, MPI_Datatype datatype, int outcount, int &flag ) { int sts ; - MPI_Aint extent ; + MPI_Aint extent, lbound ; flag = 0 ; - sts = MPI_Type_extent( datatype , &extent ) ; + sts = MPI_Type_get_extent( datatype , &lbound, &extent ) ; if ( sts == MPI_SUCCESS ) { void * recvbuf = malloc( extent*outcount ) ; @@ -1003,7 +1003,7 @@ namespace MEDCoupling return _comm_interface.requestFree( request ) ; } - // Print all informations of all known requests for debugging purpose + // Print all information of all known requests for debugging purpose void MPIAccess::check() const { int i = 0 ; @@ -1039,24 +1039,24 @@ namespace MEDCoupling // Returns the MPI size of a TimeMessage MPI_Aint MPIAccess::timeExtent() const { - MPI_Aint aextent ; - MPI_Type_extent( _MPI_TIME , &aextent ) ; + MPI_Aint aextent, lbound ; + MPI_Type_get_extent( _MPI_TIME , &lbound, &aextent ) ; return aextent ; } // Returns the MPI size of a MPI_INT MPI_Aint MPIAccess::intExtent() const { - MPI_Aint aextent ; - MPI_Type_extent( MPI_INT , &aextent ) ; + MPI_Aint aextent, lbound ; + MPI_Type_get_extent( MPI_INT , &lbound, &aextent ) ; return aextent ; } // Returns the MPI size of a MPI_DOUBLE MPI_Aint MPIAccess::doubleExtent() const { - MPI_Aint aextent ; - MPI_Type_extent( MPI_DOUBLE , &aextent ) ; + MPI_Aint aextent, lbound ; + MPI_Type_get_extent( MPI_DOUBLE , &lbound, &aextent ) ; return aextent ; }