]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Compilation with MPI
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 20 Feb 2017 13:19:05 +0000 (14:19 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 20 Feb 2017 13:19:05 +0000 (14:19 +0100)
src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i
src/MEDCoupling_Swig/MEDCouplingTypemaps.i
src/MEDPartitioner/MEDPARTITIONER_ParaDomainSelector.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_InterpKernelDEC.cxx
src/ParaMEDMEMTest/ParaMEDMEMTest_OverlapDEC.cxx
src/RENUMBER_Swig/MEDRenumberCommon.i

index 1687f44c24fca380c8c0e7b26af1c9d0c65c7624..8cb326457a0aecbfe9be8f1a0e537dd50298ecf2 100644 (file)
@@ -2662,5 +2662,20 @@ static PyObject *NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(PyObject *cls
   return instance;
 }
 
+static PyObject *convertPartDefinition(MEDCoupling::PartDefinition *pd, int owner) throw(INTERP_KERNEL::Exception)
+{
+  PyObject *ret=0;
+  if(!pd)
+    {
+      Py_XINCREF(Py_None);
+      return Py_None;
+    }
+  if(dynamic_cast<MEDCoupling::DataArrayPartDefinition *>(pd))
+    ret=SWIG_NewPointerObj((void*)pd,SWIGTYPE_p_MEDCoupling__DataArrayPartDefinition,owner);
+  else
+    ret=SWIG_NewPointerObj((void*)pd,SWIGTYPE_p_MEDCoupling__SlicePartDefinition,owner);
+  return ret;
+}
+
 #endif
 
index ae568df97502c0caf491fb2f6151ace6e9ec893d..6bb7ee801e85b22969d8a56ed04745beb999775c 100644 (file)
@@ -98,21 +98,6 @@ static PyObject* convertMultiFields(MEDCoupling::MEDCouplingMultiFields *mfs, in
   return ret;
 }
 
-static PyObject *convertPartDefinition(MEDCoupling::PartDefinition *pd, int owner) throw(INTERP_KERNEL::Exception)
-{
-  PyObject *ret=0;
-  if(!pd)
-    {
-      Py_XINCREF(Py_None);
-      return Py_None;
-    }
-  if(dynamic_cast<MEDCoupling::DataArrayPartDefinition *>(pd))
-    ret=SWIG_NewPointerObj((void*)pd,SWIGTYPE_p_MEDCoupling__DataArrayPartDefinition,owner);
-  else
-    ret=SWIG_NewPointerObj((void*)pd,SWIGTYPE_p_MEDCoupling__SlicePartDefinition,owner);
-  return ret;
-}
-
 static PyObject *convertCartesianAMRMesh(MEDCoupling::MEDCouplingCartesianAMRMeshGen *mesh, int owner) throw(INTERP_KERNEL::Exception)
 {
   if(!mesh)
index f91be6f2549ff6bf741fd3d8853d58c7655b3235..c72d7e365f40a06bede9a6be88fc4c65f986d26f 100644 (file)
@@ -340,7 +340,7 @@ std::auto_ptr<MEDPARTITIONER::Graph> MEDPARTITIONER::ParaDomainSelector::gatherG
 
   int value_size = graph_index[ index_size-1 ] - graph_index[ 0 ];
   int *graph_value = new int[ value_size ];
-  const int *value = graph->getGraph()->getValue();
+  const int *value = graph->getGraph()->getValues();
 
   MPI_Allgatherv((void*) value,                // send local value
                  value_size_of_proc[_rank],    // value size on this proc
index 21e1138bafdc162f5257fdcbaaf7e8210dbded88..7f6ef3893a9a0646a50b5a5a8e4a018cc9b5001e 100644 (file)
@@ -235,14 +235,14 @@ void ParaMEDMEMTest::testInterpKernelDEC_1D()
       const double *res=parafieldP0->getField()->getArray()->getConstPointer();
       if(rank==3)
         {
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfComponents());
           CPPUNIT_ASSERT_DOUBLES_EQUAL(7.4,res[0],1e-12);
         }
       if(rank==4)
         {
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfComponents());
           CPPUNIT_ASSERT_DOUBLES_EQUAL(9.0540540540540526,res[0],1e-12);
         }
       dec.sendData();
@@ -424,14 +424,14 @@ void ParaMEDMEMTest::testInterpKernelDEC_2DCurve()
       const double *res=parafieldP0->getField()->getArray()->getConstPointer();
       if(rank==3)
         {
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfComponents());
           CPPUNIT_ASSERT_DOUBLES_EQUAL(7.4,res[0],1e-12);
         }
       if(rank==4)
         {
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP0->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP0->getField()->getNumberOfComponents());
           CPPUNIT_ASSERT_DOUBLES_EQUAL(9.0540540540540526,res[0],1e-12);
         }
       dec.sendData();
@@ -1266,7 +1266,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P0()
       dec5.setForcedRenormalization(false);
       dec5.recvData();
       const double *res=parafield->getField()->getArray()->getConstPointer();
-      CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(1,(int)parafield->getField()->getNumberOfTuples());
       const double expected[]={37.8518518518519,43.5333333333333};
       CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13);
     }
@@ -1293,7 +1293,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P0()
       dec6.setForcedRenormalization(false);
       dec6.recvData();
       const double *res=parafield->getField()->getArray()->getConstPointer();
-      CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(1,(int)parafield->getField()->getNumberOfTuples());
       const double expected[]={0.794600591715977,1.35631163708087};
       CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13);
     }
@@ -1320,7 +1320,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P0()
       dec7.setForcedRenormalization(false);
       dec7.recvData();
       const double *res=parafield->getField()->getArray()->getConstPointer();
-      CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(1,(int)parafield->getField()->getNumberOfTuples());
       const double expected[]={36.4592592592593,44.5407407407407};
       CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13);
     }
@@ -1347,7 +1347,7 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P0()
       dec8.setForcedRenormalization(false);
       dec8.recvData();
       const double *res=parafield->getField()->getArray()->getConstPointer();
-      CPPUNIT_ASSERT_EQUAL(1,parafield->getField()->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(1,(int)parafield->getField()->getNumberOfTuples());
       const double expected[]={0.81314102564102553,1.3428994082840233};
       CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[rank],res[0],1e-13);
     }
@@ -1561,24 +1561,24 @@ void ParaMEDMEMTest::testInterpKernelDECNonOverlapp_2D_P0P1P1P0()
       if(rank==2)
         {
           const double expectP2[5]={39.0, 31.0, 31.0, 47.0, 39.0};
-          CPPUNIT_ASSERT_EQUAL(5,parafieldP1->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP1->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(5,(int)parafieldP1->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP1->getField()->getNumberOfComponents());
           for(int kk=0;kk<5;kk++)
             CPPUNIT_ASSERT_DOUBLES_EQUAL(expectP2[kk],res[kk],1e-12);
         }
       if(rank==3)
         {
           const double expectP3[3]={39.0, 31.0, 31.0};
-          CPPUNIT_ASSERT_EQUAL(3,parafieldP1->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP1->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(3,(int)parafieldP1->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP1->getField()->getNumberOfComponents());
           for(int kk=0;kk<3;kk++)
             CPPUNIT_ASSERT_DOUBLES_EQUAL(expectP3[kk],res[kk],1e-12);
         }
       if(rank==4)
         {
           const double expectP4[6]={47.0, 47.0, 47.0, 39.0, 39.0, 31.0};
-          CPPUNIT_ASSERT_EQUAL(6,parafieldP1->getField()->getNumberOfTuples());
-          CPPUNIT_ASSERT_EQUAL(1,parafieldP1->getField()->getNumberOfComponents());
+          CPPUNIT_ASSERT_EQUAL(6,(int)parafieldP1->getField()->getNumberOfTuples());
+          CPPUNIT_ASSERT_EQUAL(1,(int)parafieldP1->getField()->getNumberOfComponents());
           for(int kk=0;kk<6;kk++)
             CPPUNIT_ASSERT_DOUBLES_EQUAL(expectP4[kk],res[kk],1e-12);
         }
index d01960c13fdccfacc7c8f3ca422ee5944aa562df..5969e2be045dd6abf0e4323310cbcc06d827cb73 100644 (file)
@@ -590,7 +590,7 @@ void ParaMEDMEMTest::testOverlapDEC3()
   MEDCouplingFieldDouble * resField = parafieldT->getField();
   if(rank==0)
     {
-      CPPUNIT_ASSERT_EQUAL(8, resField->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(8, (int)resField->getNumberOfTuples());
       for(int i=0;i<4;i++)
         CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0,resField->getArray()->getIJ(i,0),1e-12);
       for(int i=4;i<8;i++)
@@ -598,7 +598,7 @@ void ParaMEDMEMTest::testOverlapDEC3()
     }
   if(rank==1)
     {
-      CPPUNIT_ASSERT_EQUAL(12, resField->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(12, (int)resField->getNumberOfTuples());
       for(int i=0;i<4;i++)
         CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0,resField->getArray()->getIJ(i,0),1e-12);
       for(int i=4;i<8;i++)
@@ -660,7 +660,7 @@ void ParaMEDMEMTest::testOverlapDEC4()
   MEDCouplingFieldDouble * resField = parafieldT->getField();
   if(rank==0)
     {
-      CPPUNIT_ASSERT_EQUAL(8, resField->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(8, (int)resField->getNumberOfTuples());
       for(int i=0;i<4;i++)
         {
           CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0,resField->getArray()->getIJ(i*2,0),1e-12);
@@ -674,7 +674,7 @@ void ParaMEDMEMTest::testOverlapDEC4()
     }
   if(rank==1)
     {
-      CPPUNIT_ASSERT_EQUAL(12, resField->getNumberOfTuples());
+      CPPUNIT_ASSERT_EQUAL(12, (int)resField->getNumberOfTuples());
       for(int i=0;i<4;i++)
         {
           CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0,resField->getArray()->getIJ(i*2,0),1e-12);
index 1c2e20ef5ad9de84f534fa3e0789b0a82ee29f51..6f8782e8ba3a9e60aa39e4e6069c61fc02923e92 100644 (file)
@@ -24,7 +24,7 @@
 %include std_string.i
 
 %{
-#include "MEDCouplingMemArray.hxx"
+#include "MEDCouplingMemArray.txx"
 #include "MCAuto.hxx"
 #include "MEDCouplingDataArrayTypemaps.i"