Re: [Bf-committers] Buildbot cuda-hack

2016-08-29 Thread Francesc Juhe
I have no idea. I hard-coded libiomp5 because that’s the one included in darwin 
libs and the default used by the also included clang-omp-3.5.
Official clang 3.7 uses libgomp as default and 3.8 uses libomp.

iomp5 is hard-coded on several places, it’s just not hard-coded on the lines I 
had to modify because -fopenmp seems to assume libiomp5 in clang-omp-3.5 so 
it’s not needed:

CMakeLists.txt  1428set(CMAKE_REQUIRED_FLAGS "-L${LIBDIR}/openmp/lib 
-liomp5") # these are only used for the checks
build_files/cmake/platform/platform_apple.cmake 390 
${LIBDIR}/openmp/lib/libiomp5.dylib
build_files/cmake/platform/platform_apple.cmake 391 
${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib)
source/creator/CMakeLists.txt   981 FILES 
${LIBDIR}/openmp/lib/libiomp5.dylib
source/creator/CMakeLists.txt   987 RENAME LICENSE-libiomp5.txt
source/creator/CMakeLists.txt   1076FILES 
${LIBDIR}/openmp/lib/libiomp5.dylib



On 29 Aug 2016, at 09:03, Sergey Sharybin  wrote:

> Hi,
> 
> Is it possible to somehow automatically detect which OpenMP library to use
> without need to hard-code it per-compiler-version? Maybe using try_compile
> CMake trickery?
> 
> On Sun, Aug 28, 2016 at 8:37 PM, Francesc Juhe  wrote:
> 
>> 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  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
 Bf-committers@blender.org
 https://lists.blender.org/mailman/listinfo/bf-committers
 
>>> 
>>> --
>>> 
>>> Jens 

Re: [Bf-committers] Buildbot cuda-hack

2016-08-29 Thread Sergey Sharybin
Hi,

Is it possible to somehow automatically detect which OpenMP library to use
without need to hard-code it per-compiler-version? Maybe using try_compile
CMake trickery?

On Sun, Aug 28, 2016 at 8:37 PM, Francesc Juhe  wrote:

> 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  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
> >> Bf-committers@blender.org
> >> 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: i...@jensverwiebe.de
> > web: http://www.jensverwiebe.de
> >
> > ___
> > Bf-committers mailing list
> > Bf-committers@blender.org
> > https://lists.blender.org/mailman/listinfo/bf-committers
>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
With best regards, Sergey Sharybin
___
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Buildbot cuda-hack

2016-08-28 Thread Francesc Juhe
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  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
>> Bf-committers@blender.org
>> 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: i...@jensverwiebe.de
> web: http://www.jensverwiebe.de
> 
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Buildbot cuda-hack

2016-08-26 Thread Francesc Juhe
But the cuda-hack commit was for CUDA 7.5 initially, I just ask about it now 
because I am creating a new build environment with el capitan and wanted to 
know more of what this “hack” did to better understand the build process and be 
prepared if I had the same issue.

About the openmp, I have been using clang 3.5 from blender libs  to get openmp 
support without finding any issues but since the change from scons to cmake on 
osx buildbot is no longer using it (scons buildbot config pointed to that clang 
from blender libs but cmake doesn't) and so it is missing openmp support but as 
the release build has openmp I wanted to know if release builders were using 
this clang from blender libs or a different one. In my build I added an osx 
config file to point to clang 3.5 and I think it could be better if official 
buildbot had openmp back like before when it used scons so that buildbot builds 
are more similar to releases, otherwise there could be issues not present on 
buildbot but affecting release. Don’t know, just my opinion.

Also, there is another thing missing since scons was removed in favor of cmake, 
osx buildbot does not include the blenderplayer binary inside 
blenderplayer.app, I fix it in my build with this diff:

diff --git a/source/blenderplayer/CMakeLists.txt 
b/source/blenderplayer/CMakeLists.txt
index ca84195..0da6e70 100644 (file)
--- a/source/blenderplayer/CMakeLists.txt
+++ b/source/blenderplayer/CMakeLists.txt
@@ -76,6 +76,11 @@ elseif(APPLE)
MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION}
MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} 
${BLENDER_DATE}")
 
+   install(
+   TARGETS blenderplayer
+   DESTINATION "."
+   )
+
 else()
add_executable(blenderplayer bad_level_call_stubs/stubs.c)

Thanks,
Francesc

On 26 Aug 2016, at 19:08, Jens Verwiebe  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
>> Bf-committers@blender.org
>> 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: i...@jensverwiebe.de
> web: http://www.jensverwiebe.de
> 
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Buildbot cuda-hack

2016-08-26 Thread Jens Verwiebe
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
> Bf-committers@blender.org
> 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: i...@jensverwiebe.de
web: http://www.jensverwiebe.de

___
Bf-committers mailing list
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Buildbot cuda-hack

2016-08-26 Thread 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
Bf-committers@blender.org
https://lists.blender.org/mailman/listinfo/bf-committers