mitsuba icon indicating copy to clipboard operation
mitsuba copied to clipboard

Mitsuba was compiled without OpenMP support.

Open OrganicIrradiation opened this issue 9 years ago • 1 comments

Is there a recommended method of compiling mitsuba with clang with OpenMP support on Mac OS? LLVM's clang-3.9 (installed using homebrew with brew install llvm) supports the -fopenmp flag but I've been having a heck of a time compiling. I wanted to see if there was a recommendation (without reverting to the Intel compiler).

I currently build on macOS 10.12 with a simple shell script:

cd ~
git clone https://github.com/mitsuba-renderer/mitsuba.git
cd ~/mitsuba
hg clone https://www.mitsuba-renderer.org/hg/dependencies_macos
mv dependencies_macos dependencies

cd ~/mitsuba
cp build/config-macos10.8-gcc-x86_64.py config.py
inreplace() {
    local search=$2
    local replace=$3
    sed -i "" "s!${search}!${replace}!g" $1
}

inreplace "config.py" "'-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk', " ""
inreplace "config.py" "'-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk', " ""

scons -j 4

echo 'source ~/mitsuba/setpath.sh' >> ~/.bashrc
source ~/.bashrc

OrganicIrradiation avatar Feb 16 '17 19:02 OrganicIrradiation

I also wish to compile with full OpenMP support on MacOS, but I'm still getting the "Mitsuba was compiled without OpenMP support" warning. I'm using LLVM 7.0, compiled on my own from the LLVM sources (which fully supports OpenMP on MacOS, AFAIK) and I modified the scons configuration file to use LLVM 7.0 instead of Xcode. I checked that LLVM 7.0 is indeed being used for the build, but the warning is still there when I start mtsgui.

BTW, the rendering is performed in parallel: I checked that it fully uses 8 threads (4 cores hyperthreaded) but the warning is still there, so I guess I'm missing some performance somewhere...

Is there any setting I need to add to the configuration file in order to get a fully OpenMP mitsuba?

Thanks!

cesss avatar Apr 19 '19 21:04 cesss