Index: buildbot/osuosl/master/config/builders.py =================================================================== --- buildbot/osuosl/master/config/builders.py +++ buildbot/osuosl/master/config/builders.py @@ -969,6 +969,8 @@ 'factory' : Libiomp5Builder.getLibompCMakeBuildFactory( c_compiler="clang", cxx_compiler="clang++", + build_standalone_host=False, + build_standalone_bootstrap=True, env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin'})}, {'name': "libomp-ompt-gcc-x86_64-linux-debian", @@ -986,15 +988,24 @@ 'factory' : Libiomp5Builder.getLibompCMakeBuildFactory( c_compiler="clang", cxx_compiler="clang++", + build_standalone_host=False, + build_standalone_bootstrap=True, ompt=True, env={'PATH':'/home/llvmbb/bin/clang-latest/bin:/home/llvmbb/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin'})}, - + + ] + +def _get_openmp_complete_builders(): + return [ {'name': "libomp-clang-ppc64le-linux-debian", 'slavenames':["ppc64le-nvidia-K40"], 'builddir':"libomp-clang-ppc64le-linux-debian", 'factory' : Libiomp5Builder.getLibompCMakeBuildFactory( c_compiler="/home/bbot/opt/clang/bin/clang", cxx_compiler="/home/bbot/opt/clang/bin/clang++", + build_in_tree=True, + build_standalone_host=True, + build_standalone_bootstrap=True, env={'PATH':'/home/bbot/opt/cmake/bin:/home/bbot/opt/ninja/bin:/usr/local/bin:/usr/bin:/bin'})}, ] @@ -1351,6 +1362,10 @@ for b in _get_openmp_builders(): b['category'] = 'openmp' yield b + + for b in _get_openmp_complete_builders(): + b['category'] = 'openmp_complete' + yield b for b in _get_libcxx_builders(): b['category'] = 'libcxx' Index: buildbot/osuosl/master/config/slaves.py =================================================================== --- buildbot/osuosl/master/config/slaves.py +++ buildbot/osuosl/master/config/slaves.py @@ -97,7 +97,7 @@ create_slave("ppc64le-sanitizer", properties={'jobs': 4}, max_builds=1), # POWER 8 PowerPC little endian (powerpc64le) with NVIDIA GPUs - create_slave("ppc64le-nvidia-K40", properties={'jobs': 4}, max_builds=1), + create_slave("ppc64le-nvidia-K40", properties={'jobs': 12}, max_builds=1), # Ubuntu x86-64, Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz create_slave("hexagon-build-02", properties={'jobs': 12, 'loadaverage': 32}, Index: buildbot/osuosl/master/master.cfg =================================================================== --- buildbot/osuosl/master/master.cfg +++ buildbot/osuosl/master/master.cfg @@ -208,6 +208,14 @@ builderNames=get_all_for("openmp"), change_filter=depends_on([ "openmp"]))) + +c['schedulers'].append(SingleBranchScheduler(name="openmp_complete_scheduler", + treeStableTimer=2*60, + builderNames=get_all_for("openmp_complete"), + change_filter=depends_on([ + "openmp", + "llvm", + "cfe"]))) c['schedulers'].append(SingleBranchScheduler(name="libcxx_scheduler", treeStableTimer=2*60, Index: zorg/buildbot/builders/Libiomp5Builder.py =================================================================== --- zorg/buildbot/builders/Libiomp5Builder.py +++ zorg/buildbot/builders/Libiomp5Builder.py @@ -10,7 +10,7 @@ from zorg.buildbot.commands.NinjaCommand import NinjaCommand -def getLibompCMakeBuildFactory(clean=True, env=None, ompt=False, test=True, c_compiler="gcc", cxx_compiler="g++"): +def getLibompCMakeBuildFactory(clean=True, env=None, ompt=False, test=True, build_in_tree=False, build_standalone_host=True, build_standalone_bootstrap=False, c_compiler="gcc", cxx_compiler="g++"): # Prepare environmental variables. Set here all env we want everywhere. merged_env = { @@ -22,60 +22,80 @@ openmp_srcdir = "openmp.src" openmp_builddir = "openmp.build" + openmp_builddir_bootstrap = "openmp.build.bootstrap" llvm_srcdir = "llvm.src" llvm_builddir = "llvm.build" + standalone = build_standalone_host or build_standalone_bootstrap; f = buildbot.process.factory.BuildFactory() - # Get libomp - f.addStep(SVN(name='svn-libomp', - mode='update', - baseURL='http://llvm.org/svn/llvm-project/openmp/', - defaultBranch='trunk', - workdir=openmp_srcdir)) + # Get libomp in a separate folder if we are testing standalone builds. + if standalone: + f.addStep(SVN(name='svn-libomp standalone', + mode='update', + baseURL='http://llvm.org/svn/llvm-project/openmp/', + defaultBranch='trunk', + workdir=openmp_srcdir)) - # Get llvm to build llvm-lit + # Get llvm to build llvm-lit and trigger an eventual in-tree build for the + # OpenMP library. f.addStep(SVN(name='svn-llvm', mode='update', baseURL='http://llvm.org/svn/llvm-project/llvm/', defaultBranch='trunk', workdir=llvm_srcdir)) - # Get clang if c/c++ compilers is clang/clang++ - if c_compiler == "clang": + # Get clang if we are bootstrapping. + if build_standalone_bootstrap: f.addStep(SVN(name='svn-clang', mode='update', baseURL='http://llvm.org/svn/llvm-project/cfe/', defaultBranch='trunk', workdir='%s/tools/clang' % llvm_srcdir)) + + # Checkout libomp in-tree if requested. + if build_in_tree: + f.addStep(SVN(name='svn-libomp in tree', + mode='update', + baseURL='http://llvm.org/svn/llvm-project/openmp/', + defaultBranch='trunk', + workdir='%s/projects/openmp' % llvm_srcdir)) # Clean directory, if requested. if clean: f.addStep(ShellCommand(name="clean", - command=["rm", "-rf",openmp_builddir,llvm_builddir], + command=["rm", "-rf", openmp_builddir, openmp_builddir_bootstrap, llvm_builddir], warnOnFailure=True, description=["clean"], workdir='.', env=merged_env)) - # CMake llvm + # CMake llvm and everything else that was checkout in-tree. + command=["cmake", "../"+llvm_srcdir, + "-G", "Ninja", + "-DCMAKE_BUILD_TYPE=Release", + "-DLLVM_ENABLE_ASSERTIONS=ON", + "-DCMAKE_C_COMPILER="+c_compiler, + "-DCMAKE_CXX_COMPILER="+cxx_compiler] + + # Add OMPT option to the in_tree cmake command if requested. + if ompt and build_in_tree: + command.append("-DLIBOMP_OMPT_SUPPORT=ON") + f.addStep(ShellCommand(name='cmake llvm', - command=["cmake", "../"+llvm_srcdir, - "-G", "Ninja", - "-DCMAKE_BUILD_TYPE=Release", - "-DLLVM_ENABLE_ASSERTIONS=ON", - "-DCMAKE_C_COMPILER="+c_compiler, - "-DCMAKE_CXX_COMPILER="+cxx_compiler], + command=command, haltOnFailure=True, description='cmake llvm', workdir=llvm_builddir, env=merged_env)) - # Make clang build or just llvm utils build - if c_compiler == "clang": - f.addStep(NinjaCommand(name="make clang build", + # Build everything in-tree. This will build clang if we are bootstrapping + # and build libomp if the caller requested so. Otherwise, just build the + # target that gives us llvm-lit. + if build_standalone_bootstrap or build_in_tree: + f.addStep(NinjaCommand(name="make tree build", haltOnFailure=True, - description=["make clang build"], + description=["make tree build"], workdir=llvm_builddir, env=merged_env)) else: @@ -97,35 +117,52 @@ # Add clang/llvm-lit to PATH merged_env.update( { 'PATH' : WithProperties("%(workdir)s/" + llvm_builddir + "/bin:" + "${PATH}")} ) - # CMake libomp - command=["cmake", "../"+openmp_srcdir, - "-DCMAKE_C_COMPILER="+c_compiler, - "-DCMAKE_CXX_COMPILER="+cxx_compiler] - if ompt: - command.append("-DLIBOMP_OMPT_SUPPORT=ON") - f.addStep(ShellCommand(name='cmake libomp', - command=command, - haltOnFailure=True, - description='cmake libomp', - workdir=openmp_builddir, - env=merged_env)) - - # Make libomp - f.addStep(WarningCountingShellCommand(name='make libomp build', - command=['make'], - haltOnFailure=True, - description='make libomp build', - workdir=openmp_builddir, - env=merged_env)) + # Gather required information for standalone builds. + standalone_build_info = []; + if build_standalone_host: + standalone_build_info.append((c_compiler, cxx_compiler, openmp_builddir, "host")) + if build_standalone_bootstrap: + standalone_build_info.append(("clang", "clang++", openmp_builddir_bootstrap, "bootstrap")) + + # Create standalone build steps. + for cc, cxx, build_dir, name in standalone_build_info: + # CMake libomp + command=["cmake", "../"+openmp_srcdir, + "-G", "Ninja", + "-DCMAKE_C_COMPILER="+cc, + "-DCMAKE_CXX_COMPILER="+cxx] + if ompt: + command.append("-DLIBOMP_OMPT_SUPPORT=ON") + f.addStep(ShellCommand(name='cmake libomp ' + name, + command=command, + haltOnFailure=True, + description='cmake libomp ' + name, + workdir=build_dir, + env=merged_env)) - # Test, if requested + # Make libomp + f.addStep(NinjaCommand(name='make libomp build ' + name, + haltOnFailure=True, + description=['make libomp build ' + name], + workdir=build_dir, + env=merged_env)) + + # Gather information for tests and run them, if required. if test: - f.addStep(LitTestCommand(name="make check-libomp", - command=["make", "check-libomp"], - haltOnFailure=True, - description=["make check-libomp"], - descriptionDone=["build checked"], - workdir=openmp_builddir, - env=merged_env)) + tests_info = []; + if build_in_tree: + tests_info.append((llvm_builddir, "in-tree")) + if build_standalone_host: + tests_info.append((openmp_builddir, "host")) + if build_standalone_bootstrap: + tests_info.append((openmp_builddir_bootstrap, "bootstrap")) + for build_dir, name in tests_info: + f.addStep(LitTestCommand(name="make check-libomp " + name, + command=["ninja", "check-libomp"], + haltOnFailure=True, + description=["make check-libomp " + name], + descriptionDone=[name + " build checked"], + workdir=build_dir, + env=merged_env)) return f