Switch linux buildbot to compile all cuda kernels in 64bit environment
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 10 Jan 2013 08:01:19 +0000 (08:01 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 10 Jan 2013 08:01:19 +0000 (08:01 +0000)
Solves memory limit issues when building sm_13 for 32bit platform.

Some further refinement of patch could be needed.

SConstruct
build_files/buildbot/config/user-config-cuda-glibc211-i686.py [new file with mode: 0644]
build_files/buildbot/config/user-config-cuda-glibc211-x86_64.py [new file with mode: 0644]
build_files/buildbot/config/user-config-glibc211-i686.py
build_files/buildbot/config/user-config-glibc211-x86_64.py
build_files/buildbot/config/user-config-player-glibc211-i686.py
build_files/buildbot/config/user-config-player-glibc211-x86_64.py
build_files/buildbot/slave_compile.py

index c50240b85e096471775ad69f53787b91af82a7f7..49e899c3d205f610fe57457d67b2a61a365f4f1e 100644 (file)
@@ -276,7 +276,9 @@ if 'blenderlite' in B.targets:
             env[k] = v
 
 if 'cudakernels' in B.targets:
+    env['WITH_BF_CYCLES'] = True
     env['WITH_BF_CYCLES_CUDA_BINARIES'] = True
+    env['WITH_BF_PYTHON'] = False
 
 # Extended OSX_SDK and 3D_CONNEXION_CLIENT_LIBRARY and JAckOSX detection for OSX
 if env['OURPLATFORM']=='darwin':
diff --git a/build_files/buildbot/config/user-config-cuda-glibc211-i686.py b/build_files/buildbot/config/user-config-cuda-glibc211-i686.py
new file mode 100644 (file)
index 0000000..16733be
--- /dev/null
@@ -0,0 +1,6 @@
+BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
+BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
+BF_NUMJOBS = 1
+BF_BITNESS = 32
+
+BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21', 'sm_30']
diff --git a/build_files/buildbot/config/user-config-cuda-glibc211-x86_64.py b/build_files/buildbot/config/user-config-cuda-glibc211-x86_64.py
new file mode 100644 (file)
index 0000000..60afecc
--- /dev/null
@@ -0,0 +1,6 @@
+BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
+BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
+BF_NUMJOBS = 1
+BF_BITNESS = 64
+
+BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21', 'sm_30']
index 149a01433a6bc287e3c37a8ce6e9daf0202c5ecb..56eedc3203b888ea347816ae58318cf9ddb9d83c 100644 (file)
@@ -1,6 +1,6 @@
 BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
 BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
-BF_NUMJOBS = 2
+BF_NUMJOBS = 4
 
 # Python configuration
 BF_PYTHON_VERSION = '3.3'
@@ -109,8 +109,7 @@ BF_JACK_LIB_STATIC = '${BF_ZLIB}/lib/libjack.a'
 
 # Cycles
 WITH_BF_CYCLES = True
-WITH_BF_CYCLES_CUDA_BINARIES = True
-BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21', 'sm_30']
+WITH_BF_CYCLES_CUDA_BINARIES = False
 
 WITH_BF_OIIO = True
 WITH_BF_STATICOIIO = True
index 0fae7f0cdb3c3152a9f59b82f4227e822d6d80fa..ab3efedfb868ca17fc6b5046696ef0281a5661f2 100644 (file)
@@ -1,6 +1,6 @@
 BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
 BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
-BF_NUMJOBS = 2
+BF_NUMJOBS = 4
 
 # Python configuration
 BF_PYTHON_VERSION = '3.3'
@@ -109,8 +109,7 @@ BF_JACK_LIB_STATIC = '${BF_ZLIB}/lib/libjack.a'
 
 # Cycles
 WITH_BF_CYCLES = True
-WITH_BF_CYCLES_CUDA_BINARIES = True
-BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21', 'sm_30']
+WITH_BF_CYCLES_CUDA_BINARIES = False
 
 WITH_BF_OIIO = True
 WITH_BF_STATICOIIO = True
index 37fe511fac8710c2dd5125ddba929e5e1e7b275f..a99337f03e66b9100b85720bb9fbf8478793b118 100644 (file)
@@ -1,6 +1,6 @@
 BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
 BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
-BF_NUMJOBS = 2
+BF_NUMJOBS = 4
 
 # Python configuration
 BF_PYTHON_VERSION = '3.3'
index 8f51c5ad8be88fe5eadb81289d9256970e9987ac..c17cff2893d06e5d48051458b4290ec22dea9cf8 100644 (file)
@@ -1,6 +1,6 @@
 BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
 BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
-BF_NUMJOBS = 2
+BF_NUMJOBS = 4
 
 # Python configuration
 BF_PYTHON_VERSION = '3.3'
index fa933a84841f12cfb9a4acbc69f0e31f1b7e2e5c..b66a09afe2540db209839df5d04c48290db2c2da 100644 (file)
@@ -60,6 +60,26 @@ else:
     if builder.find('linux') != -1:
         import shutil
 
+        configs = []
+        if builder.endswith('linux_glibc211_x86_64_scons'):
+            configs = ['user-config-player-glibc211-x86_64.py',
+                       'user-config-cuda-glibc211-x86_64.py',
+                       'user-config-glibc211-x86_64.py']
+            chroot_name = 'buildbot_squeeze_x86_64'
+            cuda_chroot = 'buildbot_squeeze_x86_64'
+        elif builder.endswith('linux_glibc211_i386_scons'):
+            configs = ['user-config-player-glibc211-i686.py',
+                       'user-config-cuda-glibc211-i686.py',
+                       'user-config-glibc211-i686.py']
+            chroot_name = 'buildbot_squeeze_i686'
+
+            # use 64bit cuda toolkit, so there'll be no memory limit issues
+            cuda_chroot = 'buildbot_squeeze_x86_64'
+
+        # Compilation will happen inside of chroot environment
+        prog_scons_cmd = ['schroot', '-c', chroot_name] + scons_cmd
+        cuda_scons_cmd = ['schroot', '-c', cuda_chroot] + scons_cmd
+
         # We're using the same rules as release builder, so tweak
         # build and install dirs
         build_dir = os.path.join('..', 'build', builder)
@@ -74,14 +94,6 @@ else:
         buildbot_dir = os.path.dirname(os.path.realpath(__file__))
         config_dir = os.path.join(buildbot_dir, 'config')
 
-        configs = []
-        if builder.endswith('linux_glibc211_x86_64_scons'):
-            configs = ['user-config-player-glibc211-x86_64.py',
-                       'user-config-glibc211-x86_64.py']
-        elif builder.endswith('linux_glibc211_i386_scons'):
-            configs = ['user-config-player-glibc211-i686.py',
-                       'user-config-glibc211-i686.py']
-
         for config in configs:
             config_fpath = os.path.join(config_dir, config)
 
@@ -94,14 +106,19 @@ else:
 
             scons_options += common_options
 
-            if config.find('player') == -1:
-                scons_options.append('blender')
-            else:
+            if config.find('player') != -1:
                 scons_options.append('blenderplayer')
+                cur_scons_cmd = prog_scons_cmd
+            elif config.find('cuda') != -1:
+                scons_options.append('cudakernels')
+                cur_scons_cmd = cuda_scons_cmd
+            else:
+                scons_options.append('blender')
+                cur_scons_cmd = prog_scons_cmd
 
             scons_options.append('BF_CONFIG=' + config_fpath)
 
-            retcode = subprocess.call(scons_cmd + scons_options)
+            retcode = subprocess.call(cur_scons_cmd + scons_options)
             if retcode != 0:
                 print('Error building rules wuth config ' + config)
                 sys.exit(retcode)