From 37396921f95cee71874dc7bf2aece63b2a96c52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= Date: Wed, 2 Jun 2021 21:38:03 +0200 Subject: [PATCH] Fix behaviour of PoissonRecon on ppc64le (#1289) --- opendm/mesh.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/opendm/mesh.py b/opendm/mesh.py index d7096795..fc5df72d 100644 --- a/opendm/mesh.py +++ b/opendm/mesh.py @@ -1,5 +1,5 @@ from __future__ import absolute_import -import os, shutil, sys, struct, random, math +import os, shutil, sys, struct, random, math, platform from opendm.dem import commands from opendm import system from opendm import log @@ -145,7 +145,12 @@ def screened_poisson_reconstruction(inPointCloud, outMesh, depth = 8, samples = # ext = .ply outMeshDirty = os.path.join(mesh_path, "{}.dirty{}".format(basename, ext)) - + + # Since PoissonRecon has some kind of a race condition on ppc64el, and this helps... + if platform.machine() == 'ppc64le': + log.ODM_WARNING("ppc64le platform detected, forcing single-threaded operation for PoissonRecon") + threads = 1 + poissonReconArgs = { 'bin': context.poisson_recon_path, 'outfile': outMeshDirty,