Fix behaviour of PoissonRecon on ppc64le (#1289)

pull/1291/head
Piotr Maślanka 2021-06-02 21:38:03 +02:00 zatwierdzone przez GitHub
rodzic 429f0c80ed
commit 37396921f9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
from __future__ import absolute_import 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.dem import commands
from opendm import system from opendm import system
from opendm import log from opendm import log
@ -145,7 +145,12 @@ def screened_poisson_reconstruction(inPointCloud, outMesh, depth = 8, samples =
# ext = .ply # ext = .ply
outMeshDirty = os.path.join(mesh_path, "{}.dirty{}".format(basename, ext)) 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 = { poissonReconArgs = {
'bin': context.poisson_recon_path, 'bin': context.poisson_recon_path,
'outfile': outMeshDirty, 'outfile': outMeshDirty,