def define_components(reqs): """Define all of the components""" define_common(reqs) define_mercury(reqs) define_ompi(reqs) isal_build = ['./autogen.sh ', './configure --prefix=$ISAL_PREFIX --libdir=$ISAL_PREFIX/lib', 'make $JOBS_OPT', 'make install'] reqs.define('isal', retriever=GitRepoRetriever( 'https://github.com/01org/isa-l.git'), commands=isal_build, libs=["isal"]) reqs.define('isal_crypto', retriever=GitRepoRetriever("https://github.com/intel/" "isa-l_crypto"), commands=['./autogen.sh ', './configure --prefix=$ISAL_CRYPTO_PREFIX ' '--libdir=$ISAL_CRYPTO_PREFIX/lib', 'make $JOBS_OPT', 'make install'], libs=['isal_crypto']) retriever = GitRepoRetriever("https://github.com/pmem/pmdk.git") pmdk_build = ["make all \"BUILD_RPMEM=n\" \"NDCTL_ENABLE=n\" " "\"NDCTL_DISABLE=y\" $JOBS_OPT install " "prefix=$PMDK_PREFIX"] reqs.define('pmdk', retriever=retriever, commands=pmdk_build, libs=["pmemobj"]) retriever = GitRepoRetriever("https://github.com/pmodels/argobots.git", True) reqs.define('argobots', retriever=retriever, commands=['git clean -dxf ', './autogen.sh', './configure --prefix=$ARGOBOTS_PREFIX CC=gcc' ' --enable-valgrind', 'make $JOBS_OPT', 'make $JOBS_OPT install'], requires=['valgrind_devel'], libs=['abt'], headers=['abt.h']) reqs.define('fuse', libs=['fuse3'], defines=["FUSE_USE_VERSION=35"], headers=['fuse3/fuse.h'], package='fuse3-devel') retriever = GitRepoRetriever("https://github.com/spdk/spdk.git", True) reqs.define('spdk', retriever=retriever, commands=['./configure --prefix="$SPDK_PREFIX"' \ ' --disable-tests --without-vhost --without-crypto' \ ' --without-pmdk --without-vpp --without-rbd' \ ' --with-rdma --with-shared' \ ' --without-iscsi-initiator --without-isal' \ ' --without-vtune', 'make $JOBS_OPT', 'make install', 'cp dpdk/build/lib/* "$SPDK_PREFIX/lib"', 'mkdir -p "$SPDK_PREFIX/share/spdk"', 'cp -r include scripts "$SPDK_PREFIX/share/spdk"'], libs=['rte_bus_pci'], patch_rpath=['lib']) url = 'https://github.com/protobuf-c/protobuf-c/releases/download/' \ 'v1.3.0/protobuf-c-1.3.0.tar.gz' web_retriever = WebRetriever(url, "08804f8bdbb3d6d44c2ec9e71e47ef6f") reqs.define('protobufc', retriever=web_retriever, commands=['./configure --prefix=$PROTOBUFC_PREFIX ' '--disable-protoc', 'make $JOBS_OPT', 'make install'], libs=['protobuf-c'], headers=['protobuf-c/protobuf-c.h'])
def define_mercury(reqs): """mercury definitions""" libs = ['rt'] if reqs.get_env('PLATFORM') == 'darwin': libs = [] else: reqs.define('rt', libs=['rt']) reqs.define('stdatomic', headers=['stdatomic.h']) if reqs.check_component('stdatomic'): atomic = 'stdatomic' else: atomic = 'openpa' reqs.define('psm2', retriever=GitRepoRetriever( 'https://github.com/intel/opa-psm2.git'), # psm2 hard-codes installing into /usr/... commands=['sed -i -e "s/\\(.{DESTDIR}\\/\\)usr\\//\\1/" ' + ' -e "s/\\(INSTALL_LIB_TARG=' + '\\/usr\\/lib\\)64/\\1/" ' + ' -e "s/\\(INSTALL_LIB_TARG=\\)\\/usr/\\1/" ' + 'Makefile compat/Makefile', 'make $JOBS_OPT LIBDIR="/lib64"', 'make DESTDIR=$PSM2_PREFIX LIBDIR="/lib64" install'], headers=['psm2.h'], libs=['psm2']) if reqs.build_type == 'debug': OFI_DEBUG = '--enable-debug ' else: OFI_DEBUG = '--disable-debug ' retriever = GitRepoRetriever('https://github.com/ofiwg/libfabric') reqs.define('ofi', retriever=retriever, commands=['./autogen.sh', './configure --prefix=$OFI_PREFIX ' + '--disable-efa ' + OFI_DEBUG + exclude(reqs, 'psm2', '--enable-psm2' + check(reqs, 'psm2', "=$PSM2_PREFIX " 'LDFLAGS="-Wl,--enable-new-dtags ' + '-Wl,-rpath=$PSM2_PREFIX/lib64" ', ''), ''), 'make $JOBS_OPT', 'make install'], libs=['fabric'], requires=exclude(reqs, 'psm2', ['psm2'], []), config_cb=ofi_config, headers=['rdma/fabric.h'], package='libfabric-devel' if inst(reqs, 'ofi') else None, patch_rpath=['lib']) reqs.define('openpa', retriever=GitRepoRetriever( 'https://github.com/pmodels/openpa.git'), commands=['$LIBTOOLIZE', './autogen.sh', './configure --prefix=$OPENPA_PREFIX', 'make $JOBS_OPT', 'make install'], libs=['opa'], package='openpa-devel' if inst(reqs, 'openpa') else None) if reqs.build_type == 'debug': MERCURY_DEBUG = '-DMERCURY_ENABLE_DEBUG=ON ' else: MERCURY_DEBUG = '-DMERCURY_ENABLE_DEBUG=OFF ' retriever = \ GitRepoRetriever('https://github.com/mercury-hpc/mercury.git', True) reqs.define('mercury', retriever=retriever, commands=['cmake -DMERCURY_USE_CHECKSUMS=OFF ' '-DOPA_LIBRARY=$OPENPA_PREFIX/lib' + check(reqs, 'openpa', '', '64') + '/libopa.a ' '-DOPA_INCLUDE_DIR=$OPENPA_PREFIX/include/ ' '-DCMAKE_INSTALL_PREFIX=$MERCURY_PREFIX ' '-DBUILD_EXAMPLES=OFF ' '-DMERCURY_USE_BOOST_PP=ON ' '-DMERCURY_USE_SELF_FORWARD=ON ' '-DMERCURY_ENABLE_VERBOSE_ERROR=ON ' + MERCURY_DEBUG + '-DBUILD_TESTING=ON ' '-DNA_USE_OFI=ON ' '-DBUILD_DOCUMENTATION=OFF ' '-DBUILD_SHARED_LIBS=ON ../mercury ' '-DMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ' + check(reqs, 'ofi', '-DOFI_INCLUDE_DIR=$OFI_PREFIX/include ' '-DOFI_LIBRARY=$OFI_PREFIX/lib/libfabric.so'), 'make $JOBS_OPT', 'make install'], libs=['mercury', 'na', 'mercury_util'], requires=[atomic, 'boost', 'ofi'] + libs, extra_include_path=[os.path.join('include', 'na')], out_of_src_build=True, package='mercury-devel' if inst(reqs, 'mercury') else None, patch_rpath=['lib'])
def define_mercury(reqs): """mercury definitions""" libs = ['rt'] if reqs.get_env('PLATFORM') == 'darwin': libs = [] else: reqs.define('rt', libs=['rt']) retriever = \ GitRepoRetriever('https://github.com/mercury-hpc/mercury.git', True) reqs.define('mercury', retriever=retriever, commands=[ 'cmake -DMERCURY_USE_CHECKSUMS=OFF ' '-DOPA_LIBRARY=$OPENPA_PREFIX/lib' + check(reqs, 'openpa', '', '64') + '/libopa.a ' '-DOPA_INCLUDE_DIR=$OPENPA_PREFIX/include/ ' '-DCMAKE_INSTALL_PREFIX=$MERCURY_PREFIX ' '-DBUILD_EXAMPLES=OFF ' '-DMERCURY_USE_BOOST_PP=ON ' '-DMERCURY_USE_SELF_FORWARD=ON ' '-DMERCURY_ENABLE_VERBOSE_ERROR=ON ' '-DBUILD_TESTING=ON ' '-DNA_USE_OFI=ON ' '-DBUILD_DOCUMENTATION=OFF ' '-DBUILD_SHARED_LIBS=ON $MERCURY_SRC ' '-DCMAKE_INSTALL_RPATH=$MERCURY_PREFIX/lib ' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ' + check( reqs, 'ofi', '-DOFI_INCLUDE_DIR=$OFI_PREFIX/include ' '-DOFI_LIBRARY=$OFI_PREFIX/lib/libfabric.so'), 'make $JOBS_OPT', 'make install' ], libs=['mercury', 'na', 'mercury_util'], requires=['openpa', 'boost', 'ofi'] + libs, extra_include_path=[os.path.join('include', 'na')], out_of_src_build=True, package='mercury-devel' if inst(reqs, 'mercury') else None) retriever = GitRepoRetriever('https://github.com/ofiwg/libfabric') reqs.define('ofi', retriever=retriever, commands=[ './autogen.sh', './configure --prefix=$OFI_PREFIX', 'make $JOBS_OPT', 'make install' ], libs=['fabric'], headers=['rdma/fabric.h'], package='libfabric-devel' if inst(reqs, 'ofi') else None) reqs.define( 'openpa', retriever=GitRepoRetriever('http://git.mcs.anl.gov/radix/openpa.git'), commands=[ '$LIBTOOLIZE', './autogen.sh', './configure --prefix=$OPENPA_PREFIX', 'make $JOBS_OPT', 'make install' ], libs=['opa'], package='openpa-devel' if inst(reqs, 'openpa') else None) if ARM_PLATFORM: url = "https://github.com/mercury-hpc/mchecksum.git" retriever = GitRepoRetriever(url) reqs.define('mchecksum', retriever=retriever, commands=[ 'cmake -DBUILD_SHARED_LIBS=ON $MCHECKSUM_SRC' '-DBUILD_TESTING=ON ' '-DCMAKE_INSTALL_PREFIX=$MCHECKSUM_PREFIX ' '-DMCHECKSUM_ENABLE_COVERAGE=OFF ' '-DMCHECKSUM_ENABLE_VERBOSE_ERROR=ON ' '-DMCHECKSUM_USE_ZLIB=OFF ' '-DCMAKE_INSTALL_RPATH=$MCHECKSUM_PREFIX/lib ' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ', 'make $JOBS_OPT', 'make install' ], libs=['mchecksum'], out_of_src_build=True)
def define_components(reqs): """Define all of the components""" define_common(reqs) define_mercury(reqs) define_ompi(reqs) isal_build = [ './autogen.sh ', './configure --prefix=$ISAL_PREFIX --libdir=$ISAL_PREFIX/lib', 'make $JOBS_OPT', 'make install' ] reqs.define( 'isal', retriever=GitRepoRetriever('https://github.com/01org/isa-l.git'), commands=isal_build, libs=["isal"]) reqs.define('isal_crypto', retriever=GitRepoRetriever("https://github.com/intel/" "isa-l_crypto"), commands=[ './autogen.sh ', './configure --prefix=$ISAL_CRYPTO_PREFIX ' '--libdir=$ISAL_CRYPTO_PREFIX/lib', 'make $JOBS_OPT', 'make install' ], libs=['isal_crypto']) retriever = GitRepoRetriever("https://github.com/pmem/pmdk.git") pmdk_build = [ 'make all "BUILD_RPMEM=n" "NDCTL_ENABLE=n" ' '"NDCTL_DISABLE=y" "DOC=n" $JOBS_OPT install ' 'prefix=$PMDK_PREFIX' ] reqs.define('pmdk', retriever=retriever, commands=pmdk_build, libs=["pmemobj"]) if reqs.target_type == 'debug': ABT_DEBUG = ' --enable-debug=most' else: ABT_DEBUG = ' --disable-debug' retriever = GitRepoRetriever("https://github.com/pmodels/argobots.git", True) reqs.define('argobots', retriever=retriever, commands=[ 'git clean -dxf', './autogen.sh', './configure --prefix=$ARGOBOTS_PREFIX CC=gcc' ' --enable-valgrind' ' --enable-stack-unwind' + ABT_DEBUG, 'make $JOBS_OPT', 'make $JOBS_OPT install' ], requires=['valgrind_devel', 'libunwind'], libs=['abt'], headers=['abt.h']) reqs.define('fuse', libs=['fuse3'], defines=["FUSE_USE_VERSION=35"], headers=['fuse3/fuse.h'], package='fuse3-devel') retriever = GitRepoRetriever("https://github.com/spdk/spdk.git", True) reqs.define('spdk', retriever=retriever, commands=['./configure --prefix="$SPDK_PREFIX"' \ ' --disable-tests --disable-unit-tests ' \ ' --disable-examples --disable-apps --without-vhost '\ ' --without-crypto --without-pmdk --without-rbd ' \ ' --with-rdma --without-iscsi-initiator ' \ ' --without-isal --without-vtune --with-shared', 'make $JOBS_OPT', 'make install', 'cp -r -P dpdk/build/lib/* "$SPDK_PREFIX/lib"', 'mkdir -p "$SPDK_PREFIX/include/dpdk"', 'cp -r -P dpdk/build/include/* ' \ '"$SPDK_PREFIX/include/dpdk"', 'mkdir -p "$SPDK_PREFIX/share/spdk"', 'cp -r include scripts "$SPDK_PREFIX/share/spdk"'], headers=['spdk/nvme.h', 'dpdk/rte_eal.h'], extra_include_path=['/usr/include/dpdk', '$SPDK_PREFIX/include/dpdk', # debian dpdk rpm puts rte_config.h here '/usr/include/x86_64-linux-gnu/dpdk'], patch_rpath=['lib']) retriever = GitRepoRetriever( "https://github.com/protobuf-c/protobuf-c.git") reqs.define('protobufc', retriever=retriever, commands=[ './autogen.sh', './configure --prefix=$PROTOBUFC_PREFIX ' '--disable-protoc', 'make $JOBS_OPT', 'make install' ], libs=['protobuf-c'], headers=['protobuf-c/protobuf-c.h'])
def define_components(reqs): """Define all of the components""" define_common(reqs) define_mercury(reqs) define_pmix(reqs) isal_build = [ './autogen.sh ', './configure --prefix=$ISAL_PREFIX --libdir=$ISAL_PREFIX/lib', 'make $JOBS_OPT', 'make install' ] reqs.define( 'isal', retriever=GitRepoRetriever('https://github.com/01org/isa-l.git'), commands=isal_build, required_progs=['nasm', 'yasm'], libs=["isal"]) retriever = GitRepoRetriever("https://github.com/pmem/pmdk.git") pmdk_build = [ "make \"BUILD_RPMEM=n\" \"NDCTL_ENABLE=n\" " "\"NDCTL_DISABLE=y\" " "$JOBS_OPT install " "prefix=$PMDK_PREFIX" ] reqs.define('pmdk', retriever=retriever, commands=pmdk_build, libs=["pmemobj"]) retriever = GitRepoRetriever("https://github.com/pmodels/argobots.git", True) reqs.define('argobots', retriever=retriever, commands=[ 'git clean -dxf ', './autogen.sh', './configure --prefix=$ARGOBOTS_PREFIX CC=gcc', 'make $JOBS_OPT', 'make $JOBS_OPT install' ], libs=['abt'], headers=['abt.h']) retriever = GitRepoRetriever("https://review.hpdd.intel.com/daos/iof", True) reqs.define('iof', retriever=retriever, commands=[ "scons $JOBS_OPT " "OMPI_PREBUILT=$OMPI_PREFIX " "CART_PREBUILT=$CART_PREFIX " "FUSE_PREBUILT=$FUSE_PREFIX " "PREFIX=$IOF_PREFIX " "USE_INSTALLED=" + ','.join(reqs.installed) + ' ' + "install" ], headers=['cnss_plugin.h'], requires=['cart', 'fuse', 'ompi']) retriever = GitRepoRetriever("https://github.com/daos-stack/daos", True) reqs.define('daos', retriever=retriever, commands=[ "scons $JOBS_OPT " "OMPI_PREBUILT=$OMPI_PREFIX " "CART_PREBUILT=$CART_PREFIX " "PREFIX=$DAOS_PREFIX " "USE_INSTALLED=" + ','.join(reqs.installed) + ' ' + "install" ], headers=['daos.h'], requires=['cart', 'ompi']) retriever = GitRepoRetriever('https://github.com/libfuse/libfuse') reqs.define('fuse', retriever=retriever, commands=['meson $FUSE_SRC --prefix=$FUSE_PREFIX' \ ' -D udevrulesdir=$FUSE_PREFIX/udev' \ ' -D disable-mtab=True' \ ' -D utils=False', '$ninja -v $JOBS_OPT', '$ninja install'], libs=['fuse3'], defines=["FUSE_USE_VERSION=32"], required_progs=['libtoolize', NINJA_PROG], headers=['fuse3/fuse.h'], out_of_src_build=True) retriever = GitRepoRetriever("https://github.com/daos-stack/cart", True) reqs.define( 'cart', retriever=retriever, commands=[ "scons $JOBS_OPT " "OMPI_PREBUILT=$OMPI_PREFIX " "MERCURY_PREBUILT=$MERCURY_PREFIX " "PMIX_PREBUILT=$PMIX_PREFIX " "PREFIX=$CART_PREFIX " "USE_INSTALLED=" + ','.join(reqs.installed) + ' ' + "install" ], headers=["cart/api.h", "gurt/list.h"], libs=["cart", "gurt"], requires=[ 'mercury', 'uuid', 'crypto', 'ompi', 'pmix', 'boost', 'yaml' ], package='cart-devel' if inst(reqs, 'cart') else None) reqs.define('fio', retriever=GitRepoRetriever('https://github.com/axboe/fio.git'), commands=[ 'git checkout fio-3.3', './configure --prefix="$FIO_PREFIX"', 'make $JOBS_OPT', 'make install' ], progs=['genfio', 'fio']) retriever = GitRepoRetriever("https://github.com/spdk/spdk.git", True) reqs.define('spdk', retriever=retriever, commands=['./configure --prefix="$SPDK_PREFIX" ' \ ' --with-fio="$FIO_SRC"', 'make $JOBS_OPT', 'make install', 'mkdir -p "$SPDK_PREFIX/share/spdk"', 'cp -r include scripts examples/nvme/fio_plugin ' \ '"$SPDK_PREFIX/share/spdk"'], libs=['spdk'], requires=['fio']) url = 'https://github.com/protobuf-c/protobuf-c/releases/download/' \ 'v1.3.0/protobuf-c-1.3.0.tar.gz' web_retriever = WebRetriever(url, "08804f8bdbb3d6d44c2ec9e71e47ef6f") reqs.define('protobufc', retriever=web_retriever, commands=[ './configure --prefix=$PROTOBUFC_PREFIX ' '--disable-protoc', 'make $JOBS_OPT', 'make install' ], libs=['protobuf-c'], headers=['protobuf-c/protobuf-c.h'])
def define_pmix(reqs): """PMIX and related components""" url = 'https://www.open-mpi.org/software/hwloc/v1.11' \ '/downloads/hwloc-1.11.5.tar.gz' web_retriever = \ WebRetriever(url, "8f5fe6a9be2eb478409ad5e640b2d3ba") reqs.define('hwloc', retriever=web_retriever, commands=[ './configure --prefix=$HWLOC_PREFIX', 'make $JOBS_OPT', 'make install' ], headers=['hwloc.h'], libs=['hwloc'], package='hwloc-devel' if inst(reqs, 'hwloc') else None) retriever = GitRepoRetriever('https://github.com/pmix/master') reqs.define('pmix', retriever=retriever, commands=[ './autogen.pl', './configure --with-platform=optimized ' '--prefix=$PMIX_PREFIX', 'make $JOBS_OPT', 'make install' ], libs=['pmix'], required_progs=['autoreconf', 'aclocal', 'libtool'], headers=['pmix.h'], requires=['hwloc', 'event'], package='pmix-devel' if inst(reqs, 'pmix') else None) retriever = GitRepoRetriever('https://github.com/pmix/prrte') reqs.define('prrte', retriever=retriever, commands=[ './autogen.pl', './configure --with-platform=optimized ' '--prefix=$PRRTE_PREFIX ' '--enable-orterun-prefix-by-default ' + check(reqs, 'pmix', '--with-pmix=$PMIX_PREFIX') + ' ' + check(reqs, 'hwloc', '--with-hwloc=$HWLOC_PREFIX'), 'make $JOBS_OPT', 'make install' ], required_progs=['g++', 'flex'], progs=['prun', 'prte', 'prted'], requires=['pmix', 'hwloc', 'event']) retriever = GitRepoRetriever('https://github.com/open-mpi/ompi', True) reqs.define('ompi', retriever=retriever, commands=[ './autogen.pl --no-oshmem', './configure --with-platform=optimized ' '--enable-orterun-prefix-by-default ' '--prefix=$OMPI_PREFIX ' + '--with-pmix=' + check(reqs, 'pmix', '$PMIX_PREFIX', 'external') + ' ' + '--disable-mpi-fortran ' '--enable-contrib-no-build=vt ' '--with-libevent=external ' + '--with-hwloc=' + check(reqs, 'hwloc', '$HWLOC_PREFIX', 'external'), 'make $JOBS_OPT', 'make install' ], libs=['open-rte'], required_progs=['g++', 'flex'], requires=['pmix', 'hwloc', 'event'], package='ompi-devel' if inst(reqs, 'ompi') else None)
def define_mercury(reqs): """mercury definitions""" libs = ['rt'] if reqs.get_env('PLATFORM') == 'darwin': libs = [] else: reqs.define('rt', libs=['rt']) reqs.define('stdatomic', headers=['stdatomic.h']) if reqs.check_component('stdatomic'): atomic = 'stdatomic' else: atomic = 'openpa' reqs.define( 'psm2', retriever=GitRepoRetriever('https://github.com/intel/opa-psm2.git'), # psm2 hard-codes installing into /usr/... commands=[[ 'sed', '-i', '-e', 's/\\(.{DESTDIR}\\/\\)usr\\//\\1/', '-e', 's/\\(INSTALL_LIB_TARG=\\/usr\\/lib\\)64/\\1/', '-e', 's/\\(INSTALL_LIB_TARG=\\)\\/usr/\\1/', 'Makefile', 'compat/Makefile' ], ['make', 'LIBDIR=/lib64'], ['make', 'DESTDIR=$PSM2_PREFIX', 'LIBDIR=/lib64', 'install']], headers=['psm2.h'], libs=['psm2']) ofi_build = [ './configure', '--prefix=$OFI_PREFIX', '--disable-efa', '--disable-psm3', '--disable-opx', '--without-gdrcopy' ] if reqs.target_type == 'debug': ofi_build.append('--enable-debug') else: ofi_build.append('--disable-debug') ofi_build.extend( include( reqs, 'psm2', check(reqs, 'psm2', [ '--enable-psm2=$PSM2_PREFIX', 'LDFLAGS=-Wl,--enable-new-dtags -Wl,-rpath=$PSM2_PREFIX/lib64' ], ['--enable-psm2']), ['--disable-psm2'])) reqs.define( 'ofi', retriever=GitRepoRetriever('https://github.com/ofiwg/libfabric'), commands=[['./autogen.sh'], ofi_build, ['make'], ['make', 'install']], libs=['fabric'], requires=include(reqs, 'psm2', ['psm2'], []), config_cb=ofi_config, headers=['rdma/fabric.h'], package='libfabric-devel' if inst(reqs, 'ofi') else None, patch_rpath=['lib']) reqs.define( 'openpa', retriever=GitRepoRetriever('https://github.com/pmodels/openpa.git'), commands=[['libtoolize'], ['./autogen.sh'], ['./configure', '--prefix=$OPENPA_PREFIX'], ['make'], ['make', 'install']], libs=['opa'], package='openpa-devel' if inst(reqs, 'openpa') else None) ucx_configure = [ './configure', '--disable-assertions', '--disable-params-check', '--enable-mt', '--without-go', '--without-java', '--prefix=$UCX_PREFIX', '--libdir=$UCX_PREFIX/lib64', '--enable-cma', '--without-cuda', '--without-gdrcopy', '--with-verbs', '--without-knem', '--without-rocm', '--without-xpmem', '--without-fuse3', '--without-ugni' ] if reqs.target_type == 'debug': ucx_configure.extend(['--enable-debug']) else: ucx_configure.extend(['--disable-debug', '--disable-logging']) reqs.define( 'ucx', retriever=GitRepoRetriever('https://github.com/openucx/ucx.git'), libs=['ucs', 'ucp', 'uct'], functions={'ucs': ['ucs_debug_disable_signal']}, headers=['uct/api/uct.h'], pkgconfig='ucx', commands=[['./autogen.sh'], ucx_configure, ['make'], ['make', 'install'], ['mkdir', '-p', '$UCX_PREFIX/lib64/pkgconfig'], ['cp', 'ucx.pc', '$UCX_PREFIX/lib64/pkgconfig']], package='ucx-devel' if inst(reqs, 'ucx') else None) mercury_build = [ 'cmake', '-DMERCURY_USE_CHECKSUMS=OFF', '-DOPA_INCLUDE_DIR=$OPENPA_PREFIX/include/', '-DCMAKE_INSTALL_PREFIX=$MERCURY_PREFIX', '-DCMAKE_CXX_FLAGS="-std=c++11"', '-DBUILD_EXAMPLES=OFF', '-DMERCURY_USE_BOOST_PP=ON', '-DBUILD_TESTING=OFF', '-DNA_USE_OFI=ON', '-DBUILD_DOCUMENTATION=OFF', '-DBUILD_SHARED_LIBS=ON', '-DNA_USE_UCX=ON', '../mercury' ] if reqs.target_type == 'debug': mercury_build.append('-DMERCURY_ENABLE_DEBUG=ON') else: mercury_build.append('-DMERCURY_ENABLE_DEBUG=OFF') mercury_build.append( check(reqs, 'openpa', '-DOPA_LIBRARY=$OPENPA_PREFIX/lib/libopa.a', '-DOPA_LIBRARY=$OPENPA_PREFIX/lib64/libopa.a')) mercury_build.extend( check(reqs, 'ofi', [ '-DOFI_INCLUDE_DIR=$OFI_PREFIX/include', '-DOFI_LIBRARY=$OFI_PREFIX/lib/libfabric.so' ], [])) reqs.define('mercury', retriever=GitRepoRetriever( 'https://github.com/mercury-hpc/mercury.git', True), commands=[mercury_build, ['make'], ['make', 'install']], libs=['mercury', 'na', 'mercury_util'], pkgconfig='mercury', requires=[atomic, 'boost', 'ofi', 'ucx'] + libs, out_of_src_build=True, package='mercury-devel' if inst(reqs, 'mercury') else None, patch_rpath=['lib'])
def define_components(reqs): """Define all of the components""" define_common(reqs) define_mercury(reqs) define_ompi(reqs) reqs.define( 'isal', retriever=GitRepoRetriever('https://github.com/01org/isa-l.git'), commands=[['./autogen.sh'], [ './configure', '--prefix=$ISAL_PREFIX', '--libdir=$ISAL_PREFIX/lib' ], ['make'], ['make', 'install']], libs=['isal']) reqs.define( 'isal_crypto', retriever=GitRepoRetriever('https://github.com/intel/isa-l_crypto'), commands=[['./autogen.sh'], [ './configure', '--prefix=$ISAL_CRYPTO_PREFIX', '--libdir=$ISAL_CRYPTO_PREFIX/lib' ], ['make'], ['make', 'install']], libs=['isal_crypto']) reqs.define('pmdk', retriever=GitRepoRetriever('https://github.com/pmem/pmdk.git'), commands=[[ 'make', 'all', 'BUILD_RPMEM=n', 'NDCTL_ENABLE=n', 'NDCTL_DISABLE=y', 'DOC=n', 'install', 'prefix=$PMDK_PREFIX' ]], libs=['pmemobj']) abt_build = [ './configure', '--prefix=$ARGOBOTS_PREFIX', 'CC=gcc', '--enable-stack-unwind' ] if reqs.target_type == 'debug': abt_build.append('--enable-debug=most') else: abt_build.append('--disable-debug') if inst(reqs, 'valgrind_devel'): abt_build.append('--enable-valgrind') reqs.define('argobots', retriever=GitRepoRetriever( 'https://github.com/pmodels/argobots.git', True), commands=[['git', 'clean', '-dxf'], ['./autogen.sh'], abt_build, ['make'], ['make', 'install']], requires=['libunwind'], libs=['abt'], headers=['abt.h']) reqs.define('fuse', libs=['fuse3'], defines=['FUSE_USE_VERSION=35'], headers=['fuse3/fuse.h'], package='fuse3-devel') # Tell SPDK which CPU to optimize for, by default this is native which works well unless you # are relocating binaries across systems, for example in CI under github actions etc. There # isn't a minimum value needed here, but getting this wrong will cause daos server to exit # prematurely with SIGILL (-4). # https://docs.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series#dsv2-series says # that GHA can schedule on any of Skylake, Broadwell or Haswell CPUs. # Ubuntu systems seem to fail more often, there may be something different going on here, # it has also failed with sandybridge. # https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html dist = distro.linux_distribution() if dist[0] == 'CentOS Linux' and dist[1] == '7': spdk_arch = 'native' elif dist[0] == 'Ubuntu' and dist[1] == '20.04': spdk_arch = 'nehalem' else: spdk_arch = 'haswell' reqs.define( 'spdk', retriever=GitRepoRetriever('https://github.com/spdk/spdk.git', True), commands=[ [ './configure', '--prefix=$SPDK_PREFIX', '--disable-tests', '--disable-unit-tests', '--disable-apps', '--without-vhost', '--without-crypto', '--without-pmdk', '--without-rbd', '--with-rdma', '--without-iscsi-initiator', '--without-isal', '--without-vtune', '--with-shared' ], ['make', 'CONFIG_ARCH={}'.format(spdk_arch)], ['make', 'install'], ['cp', '-r', '-P', 'dpdk/build/lib/', '$SPDK_PREFIX'], [ 'cp', '-r', '-P', 'dpdk/build/include/', '$SPDK_PREFIX/include/dpdk' ], ['mkdir', '-p', '$SPDK_PREFIX/share/spdk'], ['cp', '-r', 'include', 'scripts', '$SPDK_PREFIX/share/spdk'], ['cp', 'build/examples/lsvmd', '$SPDK_PREFIX/bin/spdk_nvme_lsvmd'], [ 'cp', 'build/examples/nvme_manage', '$SPDK_PREFIX/bin/spdk_nvme_manage' ], [ 'cp', 'build/examples/identify', '$SPDK_PREFIX/bin/spdk_nvme_identify' ], ['cp', 'build/examples/perf', '$SPDK_PREFIX/bin/spdk_nvme_perf'] ], headers=['spdk/nvme.h', 'dpdk/rte_eal.h'], extra_include_path=[ '/usr/include/dpdk', '$SPDK_PREFIX/include/dpdk', # debian dpdk rpm puts rte_config.h here '/usr/include/x86_64-linux-gnu/dpdk' ], patch_rpath=['lib']) reqs.define('protobufc', retriever=GitRepoRetriever( 'https://github.com/protobuf-c/protobuf-c.git'), commands=[['./autogen.sh'], [ './configure', '--prefix=$PROTOBUFC_PREFIX', '--disable-protoc' ], ['make'], ['make', 'install']], libs=['protobuf-c'], headers=['protobuf-c/protobuf-c.h'])
def define_components(reqs): """Define all of the components""" define_common(reqs) define_mercury(reqs) define_ompi(reqs) isal_build = [ './autogen.sh ', './configure --prefix=$ISAL_PREFIX --libdir=$ISAL_PREFIX/lib', 'make $JOBS_OPT', 'make install' ] reqs.define( 'isal', retriever=GitRepoRetriever('https://github.com/01org/isa-l.git'), commands=isal_build, libs=["isal"]) reqs.define('isal_crypto', retriever=GitRepoRetriever("https://github.com/intel/" "isa-l_crypto"), commands=[ './autogen.sh ', './configure --prefix=$ISAL_CRYPTO_PREFIX ' '--libdir=$ISAL_CRYPTO_PREFIX/lib', 'make $JOBS_OPT', 'make install' ], libs=['isal_crypto']) retriever = GitRepoRetriever("https://github.com/pmem/pmdk.git") pmdk_build = [ "make all \"BUILD_RPMEM=n\" \"NDCTL_ENABLE=n\" " "\"NDCTL_DISABLE=y\" $JOBS_OPT install " "prefix=$PMDK_PREFIX" ] reqs.define('pmdk', retriever=retriever, commands=pmdk_build, libs=["pmemobj"]) retriever = GitRepoRetriever("https://github.com/pmodels/argobots.git", True) reqs.define('argobots', retriever=retriever, commands=[ 'git clean -dxf ', './autogen.sh', './configure --prefix=$ARGOBOTS_PREFIX CC=gcc' ' --enable-valgrind', 'make $JOBS_OPT', 'make $JOBS_OPT install' ], requires=['valgrind_devel'], libs=['abt'], headers=['abt.h']) if distro.id() == "ubuntu" and int(distro.major_version()) < 20: retriever = GitRepoRetriever('https://github.com/libfuse/libfuse') reqs.define('fuse', retriever=retriever, commands=['meson $FUSE_SRC --prefix=$FUSE_PREFIX' \ ' -D udevrulesdir=$FUSE_PREFIX/udev' \ ' -D disable-mtab=True' \ ' -D utils=False', '$ninja -v $JOBS_OPT', '$ninja install'], libs=['fuse3'], defines=["FUSE_USE_VERSION=32"], required_progs=['libtoolize', NINJA_PROG], headers=['fuse3/fuse.h'], out_of_src_build=True) else: reqs.define('fuse', libs=['fuse3'], defines=["FUSE_USE_VERSION=32"], headers=['fuse3/fuse.h'], package='fuse3-devel') retriever = GitRepoRetriever("https://github.com/daos-stack/cart", True) fi_opt = "" if reqs.get_env("BUILD_TYPE") in ["debug", "dev"]: fi_opt = " --with-fault-injection " reqs.define( 'cart', retriever=retriever, commands=[ SCONS_EXE + " --config=force $JOBS_OPT " + fi_opt + "MERCURY_PREBUILT=$MERCURY_PREFIX " "PREFIX=$CART_PREFIX " "MPI_PKG=$MPI_PKG " "USE_INSTALLED=" + ','.join(reqs.installed) + ' ' + "install" ], headers=["cart/api.h", "gurt/list.h"], libs=["cart", "gurt"], requires=['mercury', 'uuid', 'crypto', 'boost', 'yaml'], package='cart-devel' if inst(reqs, 'cart') else None) reqs.define('fio', retriever=GitRepoRetriever('https://github.com/axboe/fio.git'), commands=[ './configure --prefix="$FIO_PREFIX"', 'make $JOBS_OPT', 'make install' ], progs=['genfio', 'fio']) retriever = GitRepoRetriever("https://github.com/spdk/spdk.git", True) reqs.define('spdk', retriever=retriever, commands=['./configure --prefix="$SPDK_PREFIX" --with-shared ' \ ' --with-fio="$FIO_SRC"', 'make $JOBS_OPT', 'make install', 'cp dpdk/build/lib/* "$SPDK_PREFIX/lib"', 'mkdir -p "$SPDK_PREFIX/share/spdk"', 'cp -r include scripts examples/nvme/fio_plugin ' \ '"$SPDK_PREFIX/share/spdk"'], libs=['spdk'], requires=['fio']) url = 'https://github.com/protobuf-c/protobuf-c/releases/download/' \ 'v1.3.0/protobuf-c-1.3.0.tar.gz' web_retriever = WebRetriever(url, "08804f8bdbb3d6d44c2ec9e71e47ef6f") reqs.define('protobufc', retriever=web_retriever, commands=[ './configure --prefix=$PROTOBUFC_PREFIX ' '--disable-protoc', 'make $JOBS_OPT', 'make install' ], libs=['protobuf-c'], headers=['protobuf-c/protobuf-c.h'])