mvs-texturing icon indicating copy to clipboard operation
mvs-texturing copied to clipboard

Illegal instruction: 4 while executing

Open theonlynick0430 opened this issue 7 years ago • 5 comments

I am attempting to execute MVS on the output of MVE on a Mac. I run the following command: ./texrecon /Users/nikhilsridhar/Desktop/kermit-output::undistorted /Users/nikhilsridhar/Desktop/kermit-output/surface-clean.ply /Users/nikhilsridhar/Desktop/kermit-output/textured

I get the following output:

./texrecon (built on Nov 21 2018, 14:11:02)
Load and prepare mesh: 
PLY Loader: comment Export generated by libmve
Reading PLY: 1414 verts... 2692 faces... done.
Generating texture views: 
Initializing scene with 12 views...
Initialized 11 views (max ID is 10), took 1ms.
        Loading 36%...Warning: View undistorted04 has no byte image undistorted 
        Loading 45%...Warning: View undistorted06 has no byte image undistorted 
        Loading 73%...Building adjacency graph:                                 
        Adding edges 100%... done. (Took 0.019s)                                
	3971 total edges.
View selection:
	Building BVH from 2692 faces... done. (Took: 3 ms)
        Calculating face qualities 100%... done. (Took 0.188s)                  
        Postprocessing face infos 100%... done. (Took 0.001s)                   
	Maximum quality of a face within an image: 258.603
	Clamping qualities to 107.719 within normalization.
	Writing data cost file... done.
	Optimizing:
		Time[s]	Energy
Illegal instruction: 4

Am I doing anything wrong?

theonlynick0430 avatar Nov 21 '18 23:11 theonlynick0430

This issue relates to mapMAP the MRF optimizer that we use, do you have SSE, AVX or AVX-2?

nmoehrle avatar Nov 22 '18 08:11 nmoehrle

Closing this due to inactivity.

nmoehrle avatar Jan 03 '19 20:01 nmoehrle

I'm experiencing the same problem using a 2016 macbook pro. The output of sysctl -a | grep machdep.cpu.features shows SSE and AVX is supported by the CPU. Any ideas how to avoid the problem?

nbfuhao avatar Feb 15 '19 15:02 nbfuhao

The same problem occurred on 2018 MacBook Pro.

carrypann avatar Mar 29 '19 11:03 carrypann

Experienced the same behaviour while attempting texturing a 414 image set. Process used ~10Gb of RAM at that stage, then was automatically halted at View selection > Optimizing Stage. Recompiled with these flags on ubuntu a 16 core AMD Ryzen. mapMap successfully finished processing for me. By editing your CMakeLists.txt

if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -Wall -Wextra -Wundef -pedantic")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpmath=sse -march=native -funroll-loops")
endif()

An alternative would be to swap -march=native with -march=both and recompile. (untested)

razvanmargineanu avatar Apr 09 '21 16:04 razvanmargineanu