I run a few tests regarding clang and omp after installing OSX 10.11 and Xcode
7.3.1.
It seems that clang-omp-3.5 from libs can’t compile using OSX 10.11 SDK.
So, I downloaded clang 3.7.0 and 3.8.0 darwin binaries from official page and
both compile blender ok after a minor modification on cmake.
diff --git a/build_files/cmake/platform/platform_apple.cmake
b/build_files/cmake/platform/platform_apple.cmake
index b28b748..ec40400 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -376,8 +376,13 @@ if(WITH_OPENMP)
message(STATUS "Using special OpenMP enabled compiler !") #
letting find_package(OpenMP) module work for gcc
if(CMAKE_C_COMPILER_ID MATCHES "Clang") # clang-omp in darwin
libs
set(OPENMP_FOUND ON)
- set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C compiler
flags for OpenMP parallization" FORCE)
- set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "C++
compiler flags for OpenMP parallization" FORCE)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.7)
+ set(OpenMP_C_FLAGS "-fopenmp" CACHE STRING "C
compiler flags for OpenMP parallization" FORCE)
+ set(OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING
"C++ compiler flags for OpenMP parallization" FORCE)
+ else()
+ set(OpenMP_C_FLAGS "-fopenmp=libiomp5" CACHE
STRING "C compiler flags for OpenMP parallization" FORCE)
+ set(OpenMP_CXX_FLAGS "-fopenmp=libiomp5" CACHE
STRING "C++ compiler flags for OpenMP parallization" FORCE)
+ endif()
include_directories(${LIBDIR}/openmp/include)
link_directories(${LIBDIR}/openmp/lib)
# This is a workaround for our helperbinaries (
datatoc, masgfmt, ... ),
After the tests I have not found any issues with cuda 7.5 and xcode 7.3.1 or
clang 3.7/3.8 but I guess it’s because I am using the latest version and is
seems to have fixed incompatible compiler issues but as I don’t know what the
cuda-hack does, I am not sure.
Any comment on what the cuda-hack does/solves is very welcome.
Thanks,
Francesc
On 26 Aug 2016, at 19:08, Jens Verwiebe <[email protected]> wrote:
> I'd say cuda8 is pointless for you right now, cause pascal gpu is not
> yet supported by the NV/OSX (Quadro-) drivers.
>
> You would definitely loose openmp capability unless you compile and use
> a vanilla clang 3.7 which supports it.
>
>
> Jens
>
>
> Am 26.08.2016 um 18:11 schrieb Francesc Juhe:
>> Hi,
>>
>> Some time ago noticed this commit
>> https://developer.blender.org/rB3a24e6320f31a790ea9d3c912a35db2186140b71
>> changing the nvcc compiler on builbot but I did not give it much though as I
>> was having no issues compiling with cuda 7.5 and clang 3.5 from libs folder
>> on OSX 10.9. But now with CUDA 8 it seems I have to update to OSX 10.11 and
>> Xcode 7.3.
>>
>> So, how does this cuda-hack work?
>> Also, OSX buildbot builds seem to be compiled without OpenMP but release
>> builds are compiled with it. What are the appropriate steps for building a
>> release build?
>>
>> Thank you,
>> Francesc
>>
>> _______________________________________________
>> Bf-committers mailing list
>> [email protected]
>> https://lists.blender.org/mailman/listinfo/bf-committers
>>
>
> --
>
> Jens Verwiebe
> Allerskehre 44 - 22309 Hamburg
>
> Tel.: +49 40 68 78 50
> mobile: +49 172 400 49 07
> mailto: [email protected]
> web: http://www.jensverwiebe.de
>
> _______________________________________________
> Bf-committers mailing list
> [email protected]
> https://lists.blender.org/mailman/listinfo/bf-committers
_______________________________________________
Bf-committers mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-committers