mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.58k stars 426 forks source link

Failed to close loop #139

Open ytyfeng opened 4 years ago

ytyfeng commented 4 years ago

What causes the error of "failed to close loop"? I was able to run Poisson v.12 at depth 8, but when I increase depth to 9+ it gave me this error: [ERROR] Src/FEMTree.IsoSurface.specialized.inl (Line 1463) operator() Failed to close loop [7: 47 194 112] | (384145): (4478,5652,5000) The command I used was PoissonRecon --in file --out file --depth 9 --colors --verbose.
I also ran Poisson v.11.0 and it successfully gave me mesh at depth 9 but not depth 10+. It also gave me the same error at higher depths. Thanks!

mkazhdan commented 4 years ago

Strange indeed. Would you be able to share the input file you're using?

ytyfeng commented 4 years ago

Strange indeed. Would you be able to share the input file you're using?

I sent it to your cs.jhu.edu email. I'm running Poisson on a Power9 system.

mkazhdan commented 4 years ago

Got it. Unfortunately, I was not able to reproduce the problem using either the MSVC-compiled executable or the GCC(5.4.0)-compiled executable on my Windows machine. I could try sharing the GCC-compiled executable if that would help.

piotrmaslanka commented 3 years ago

I'm having similar problems running OpenDroneMap on POWER platform. Looks like an artifact of earlier processing to me. Will report when I solve it. Looks like it's POWER's fault :)

cpheinrich commented 3 years ago

I consistently hit this issue when running on ARM (arm mac or arm iOS) using more than 1 thread

piotrmaslanka commented 3 years ago

@ytyfeng try running with --threads 1 and report if the problem persists.

ytyfeng commented 3 years ago

@ytyfeng try running with --threads 1 and report if the problem persists.

@piotrmaslanka yes —threads 1 disables multithreading and works around the issue. The problem is the implementation of multithreading. I’m not sure why this problem happens on Power9 (ppcle64) systems. Thanks.

piotrmaslanka commented 3 years ago

@ytyfeng I'm investigating this issue in #190. This is also the place where I will put whatever I can discover.

The other way you can do, is to compile PoissonRecon with -O0. This seems to fix the problem while leaving multithreading enabled, although this solution seems to be much slower than simply compiling with defaults and just leaving it at --threads 1.

mkazhdan commented 3 years ago

Cool. Aside form running correctly, do you see increased core usage?

piotrmaslanka commented 3 years ago

@mkazhdan yes PoissonRecon spends most of it's time utilizing all 160 threads on it's POWER8 system, however, there are periods where it works single-threaded only.

mkazhdan commented 3 years ago

Great. Thanks for tracking that down. (The fact that it's serial in parts is certainly expected. The same behavior happens on the "standard" hardware I've been working on.)