dreamworksanimation / openmoonray

MoonRay is DreamWorks’ open-source, award-winning, state-of-the-art production MCRT renderer.
https://openmoonray.org/
Apache License 2.0
4.31k stars 251 forks source link

rdl2_ispc_util > rdl2.isph Illegal instruction #54

Closed fjallraven closed 1 year ago

fjallraven commented 1 year ago
[ 16%] Built target scene_rdl2_tmp
[ 16%] Building CXX object moonray/scene_rdl2/lib/scene/rdl2/CMakeFiles/rdl2_ispc_util.dir/rdl2_ispc_util/rdl2_ispc_util.cc.o
[ 16%] Linking CXX executable rdl2_ispc_util
/bin/sh: line 1: 28267 Illegal instruction     (core dumped) ./rdl2_ispc_util > rdl2.isph
gmake[2]: *** [moonray/scene_rdl2/lib/scene/rdl2/CMakeFiles/rdl2_ispc_util.dir/build.make:110: moonray/scene_rdl2/lib/scene/rdl2/rdl2_ispc_util] Error 132
gmake[2]: *** Deleting file 'moonray/scene_rdl2/lib/scene/rdl2/rdl2_ispc_util'
gmake[1]: *** [CMakeFiles/Makefile2:38644: moonray/scene_rdl2/lib/scene/rdl2/CMakeFiles/rdl2_ispc_util.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Hello I'm following the centos 7 build instructions on a Centos 7.9 machine but hitting issues above. Any ideas or tips on how to debug this issue?

kjeffery commented 1 year ago

I see illegal instruction errors when the hardware does not support the instruction set. Still, it's odd to see it during compilation (the compiler will write the instruction regardless of whether your hardware supports it). What processor are you using? What compiler are you using?

denislavdoynov commented 1 year ago

Have the same issue. I'm using: gcc 9.3 12th Gen Intel(R) Core(TM) i7-12700K

Edit: More info traps: rdl2_ispc_util[5676] trap invalid opcode ip:7f8919c3a101 sp:7fff63feecf0 error:0 in libcommon_math.so[7f8919c3a000+1000]

rwoods-dwa commented 1 year ago

rdl2_ispc_util is build as with the same compiler flags as the rest of moonray -march=avx2. What flags does your machine support run more /proc/cpuinfo to find out look for the flags: labels and under there look for avx2 fma and f16c.

fjallraven commented 1 year ago

Thanks @rwoods-dwa that's not supported on my machine

Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz

flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm epb ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid dtherm ida arat spec_ctrl intel_stibp fl
ush_l1d
kjeffery commented 1 year ago

@fjallraven I am almost positive that MoonRay will build and run with avx (avx1, as opposed to avx2), but your machine doesn't support that. I don't know if MoonRay will compile with sse4.2 support, but you can try.