From 78759c398a7ff8683dbcd838f8e56a0b646699aa Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 2 Jan 2020 14:12:23 +0100 Subject: [PATCH] Fix testHeapMem1 test to make it run on Scibian9 --- src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx | 4 ++-- src/MEDLoader/Swig/MEDLoaderTest3.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx b/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx index 820fbd525..2f9d0d923 100644 --- a/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx +++ b/src/INTERP_KERNEL/CurveIntersectorP1P1PL.txx @@ -76,7 +76,7 @@ namespace INTERP_KERNEL std::vector coordsT; if(this->getRealTargetCoordinates(icellT,coordsT)) throw INTERP_KERNEL::Exception("Invalid target cell detected for meshdim==1. Only SEG2 supported !"); - std::size_t nbOfNodesT(coordsT.size()/SPACEDIM); + mcIdType nbOfNodesT(ToIdType(coordsT.size()/SPACEDIM)); for(typename std::vector::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++) { std::vector coordsS; @@ -85,7 +85,7 @@ namespace INTERP_KERNEL assert(coordsS.size()/SPACEDIM==2); ConnType nodeIdS0(this->getNodeIdOfSourceCellAt(*iter,0)); ConnType nodeIdS1(this->getNodeIdOfSourceCellAt(*iter,1)); - for(std::size_t nodeIdT = 0 ; nodeIdTgetNodeIdOfTargetCellAt(icellT,nodeIdT)); double xs0,xs1,xt; diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index 6596505fa..5c37e3996 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -2261,11 +2261,12 @@ class MEDLoaderTest3(unittest.TestCase): indexMem = 82 * MEDCouplingSizeOfIDs()//8 meshMem = cooMem + nodalMem + indexMem self.assertIn(m.getHeapMemorySize(), list(range(meshMem - 100, meshMem + 100 + 4 * strMulFac))) - self.assertIn(f.getHeapMemorySize(), list(range(meshMem + 81*8 - 100, meshMem + 81*8 + 100 + 8 * strMulFac))) + delta = (m.getHeapMemorySize()-meshMem)//3 # std::string::capacity behaves differently + self.assertIn(f.getHeapMemorySize(), list(range(meshMem + 81*8 - (100 + 3*delta), meshMem + 81*8 + (100+3*delta) + 8 * strMulFac))) # mm=MEDFileUMesh() mm.setMeshAtLevel(0,m) - self.assertIn(mm.getHeapMemorySize(), list(range(meshMem + 81*(MEDCouplingSizeOfIDs()//8) - 100, meshMem + 81*(MEDCouplingSizeOfIDs()//8) + 100 + 10 * strMulFac))) + self.assertIn(mm.getHeapMemorySize(), list(range(meshMem + 81*(MEDCouplingSizeOfIDs()//8) - (100+3*delta), meshMem + 81*(MEDCouplingSizeOfIDs()//8) + (100+3*delta) + 10 * strMulFac))) ff=MEDFileField1TS() ff.setFieldNoProfileSBT(f) self.assertIn(ff.getHeapMemorySize(), list(range(771 - 40, 871 + 21 + (4 + 1) * strMulFac))) -- 2.39.2