-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 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
#include "MEDCouplingUMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "InterpKernelException.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
#include "InterpKernelAutoPtr.hxx"
#include <fstream>
#include <sstream>
#include <string>
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
#include <mpi.h>
#endif
int size=vec.size();
if (MyGlobals::_Verbose>1000)
std::cout << "proc " << MyGlobals::_Rank << " : --> SendDoubleVec " << size << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Send(&size, 1, MPI_INT, target, tag, MPI_COMM_WORLD);
MPI_Send(const_cast<double*>(&vec[0]), size, MPI_DOUBLE, target, tag+100, MPI_COMM_WORLD);
#endif
{
int tag = 111002;
int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Status status;
MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
if (MyGlobals::_Verbose>1000)
{
int tag = 111002;
int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Status status;
MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
if (MyGlobals::_Verbose>1000)
int size=vec.size();
if (MyGlobals::_Verbose>1000)
std::cout << "proc " << MyGlobals::_Rank << " : --> SendIntVec " << size << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Send(&size, 1, MPI_INT, target, tag, MPI_COMM_WORLD);
MPI_Send(const_cast<int*>(&vec[0]), size,MPI_INT, target, tag+100, MPI_COMM_WORLD);
#endif
{
int tag = 111003;
int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Status status;
MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
if (MyGlobals::_Verbose>1000)
{
int tag = 111003;
int size;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Status status;
MPI_Recv(&size, 1, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
if (MyGlobals::_Verbose>1000)
\param da dataArray to be sent
\param target processor id of the target
*/
-void MEDPARTITIONER::SendDataArrayInt(const ParaMEDMEM::DataArrayInt *da, const int target)
+void MEDPARTITIONER::SendDataArrayInt(const MEDCoupling::DataArrayInt *da, const int target)
{
if (da==0)
throw INTERP_KERNEL::Exception("Problem send DataArrayInt* NULL");
size[2]=da->getNumberOfComponents();
if (MyGlobals::_Verbose>1000)
std::cout << "proc " << MyGlobals::_Rank << " : --> SendDataArrayInt " << size[0] << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Send(&size, 3, MPI_INT, target, tag, MPI_COMM_WORLD);
const int *p=da->getConstPointer();
MPI_Send(const_cast<int*>(&p[0]), size[0] ,MPI_INT, target, tag+100, MPI_COMM_WORLD);
\param da dataArrayInt that is filled
\param source processor id of the incoming messages
*/
-ParaMEDMEM::DataArrayInt *MEDPARTITIONER::RecvDataArrayInt(const int source)
+MEDCoupling::DataArrayInt *MEDPARTITIONER::RecvDataArrayInt(const int source)
{
int tag = 111004;
int size[3];
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Status status;
MPI_Recv(size, 3, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
if (MyGlobals::_Verbose>1000)
std::cout << "proc " << MyGlobals::_Rank << " : <-- RecvDataArrayInt " << size[0] << std::endl;
if (size[0]!=(size[1]*size[2]))
throw INTERP_KERNEL::Exception("Problem in RecvDataArrayInt incoherent sizes");
- ParaMEDMEM::DataArrayInt* da=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* da=MEDCoupling::DataArrayInt::New();
da->alloc(size[1],size[2]);
int *p=da->getPointer();
MPI_Recv(const_cast<int*>(&p[0]), size[0], MPI_INT, source, tag+100, MPI_COMM_WORLD, &status);
\param da dataArray to be sent
\param target processor id of the target
*/
-void MEDPARTITIONER::SendDataArrayDouble(const ParaMEDMEM::DataArrayDouble *da, const int target)
+void MEDPARTITIONER::SendDataArrayDouble(const MEDCoupling::DataArrayDouble *da, const int target)
{
if (da==0)
throw INTERP_KERNEL::Exception("Problem send DataArrayDouble* NULL");
size[2]=da->getNumberOfComponents();
if (MyGlobals::_Verbose>1000)
std::cout << "proc " << MyGlobals::_Rank << " : --> SendDataArrayDouble " << size[0] << std::endl;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Send(&size, 3, MPI_INT, target, tag, MPI_COMM_WORLD);
const double *p=da->getConstPointer();
MPI_Send(const_cast<double*>(&p[0]), size[0] ,MPI_DOUBLE, target, tag+100, MPI_COMM_WORLD);
\param da dataArrayDouble that is filled
\param source processor id of the incoming messages
*/
-ParaMEDMEM::DataArrayDouble* MEDPARTITIONER::RecvDataArrayDouble(const int source)
+MEDCoupling::DataArrayDouble* MEDPARTITIONER::RecvDataArrayDouble(const int source)
{
int tag = 111005;
int size[3];
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI
MPI_Status status;
MPI_Recv(size, 3, MPI_INT, source, tag, MPI_COMM_WORLD, &status);
if (MyGlobals::_Verbose>1000)
std::cout << "proc " << MyGlobals::_Rank << " : <-- RecvDataArrayDouble " << size[0] << std::endl;
if (size[0]!=(size[1]*size[2]))
throw INTERP_KERNEL::Exception("Problem in RecvDataArrayDouble incoherent sizes");
- ParaMEDMEM::DataArrayDouble* da=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble* da=MEDCoupling::DataArrayDouble::New();
da->alloc(size[1],size[2]);
double *p=da->getPointer();
MPI_Recv(const_cast<double*>(&p[0]), size[0], MPI_DOUBLE, source, tag+100, MPI_COMM_WORLD, &status);
int rank=MyGlobals::_Rank;
//int
{
- ParaMEDMEM::DataArrayInt* send=ParaMEDMEM::DataArrayInt::New();
- ParaMEDMEM::DataArrayInt* recv=0;
+ MEDCoupling::DataArrayInt* send=MEDCoupling::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* recv=0;
int nbOfTuples=5;
int numberOfComponents=3;
send->alloc(nbOfTuples,numberOfComponents);
}
//double
{
- ParaMEDMEM::DataArrayDouble* send=ParaMEDMEM::DataArrayDouble::New();
- ParaMEDMEM::DataArrayDouble* recv=0;
+ MEDCoupling::DataArrayDouble* send=MEDCoupling::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble* recv=0;
int nbOfTuples=5;
int numberOfComponents=3;
send->alloc(nbOfTuples,numberOfComponents);