diff --git a/.gitignore b/.gitignore index 6c44adfb74d..7ea7b5b9507 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,5 @@ test/mpi/run_mpi.sh valgrind.xml tags .pydevproject +/ucx-*.*.* +/v*.*.* diff --git a/Makefile.am b/Makefile.am index 5aa6a832e99..6e48170df63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ # # Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED. # Copyright (C) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED. -# Copyright (C) The University of Tennessee and The University +# Copyright (C) The University of Tennessee and The University # of Tennessee Research Foundation. 2016. ALL RIGHTS RESERVED. # # See file LICENSE for terms. @@ -18,8 +18,6 @@ doxygen_doc_files = $(noinst_HEADERS) doc_dir = $(pkgdatadir)/doc -dist_doc__DATA = README - if !DOCS_ONLY perftest_dir = $(pkgdatadir)/perftest dist_perftest__DATA = contrib/ucx_perftest_config/msg_pow2 contrib/ucx_perftest_config/README contrib/ucx_perftest_config/test_types contrib/ucx_perftest_config/transports @@ -57,6 +55,7 @@ EXTRA_DIST += contrib/ucx_perftest_config/test_types EXTRA_DIST += contrib/ucx_perftest_config/transports EXTRA_DIST += debian EXTRA_DIST += ucx.pc.in +EXTRA_DIST += LICENSE endif #!DOCS_ONLY EXTRA_DIST += doc/uml/uct.dot diff --git a/configure.ac b/configure.ac index ce8ca7e3a88..407c543f1c0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,18 +1,17 @@ # # Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED. # Copyright (c) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED. -# Copyright (C) The University of Tennessee and The University +# Copyright (C) The University of Tennessee and The University # of Tennessee Research Foundation. 2016. ALL RIGHTS RESERVED. # Copyright (C) ARM Ltd. 2016-2017. ALL RIGHTS RESERVED. # See file LICENSE for terms. # AC_PREREQ([2.63]) -define([scm_r], esyscmd([sh -c "git rev-parse --short=7 HEAD"])) define([ucx_ver_major], 1) define([ucx_ver_minor], 2) +define([ucx_ver_patch], 0) define([ts], esyscmd([sh -c "date +%Y%m%d%H%M%S"])) -define([revcount], esyscmd([git rev-list HEAD | wc -l | sed -e 's/ *//g' | xargs -n1 printf])) # This is the API version (see libtool library versioning) # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html @@ -28,6 +27,11 @@ AC_USE_SYSTEM_EXTENSIONS AC_GNU_SOURCE AC_CONFIG_HEADERS([config.h]) +AC_CHECK_PROG(GITBIN,git,yes) +AS_IF([test x"${GITBIN}" == x"yes"], + [AC_SUBST(SCM_VERSION, esyscmd([sh -c 'git rev-parse --short=7 HEAD']))], + [AC_SUBST(SCM_VERSION, "0000000")]) + AH_TOP([ #ifndef UCX_CONFIG_H #define UCX_CONFIG_H @@ -42,27 +46,22 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([config/m4]) -define([ucx_prefix], [/opt/ucx]) +define([ucx_prefix], [/usr]) AC_PREFIX_DEFAULT([ucx_prefix]) top_top_srcdir=$srcdir AC_SUBST(top_top_srcdir) -RPM_RELEASE=1 -BUILD_TS=ts MAJOR_VERSION=ucx_ver_major MINOR_VERSION=ucx_ver_minor -MICRO_VERSION=scm_r -REV_COUNT=revcount -VERSION=$MAJOR_VERSION.$MINOR_VERSION.$REV_COUNT +PATCH_VERSION=ucx_ver_patch +VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION SOVERSION=libucx_so_version AC_SUBST(MAJOR_VERSION) AC_SUBST(MINOR_VERSION) -AC_SUBST(MICRO_VERSION) -AC_SUBST(REV_COUNT) -AC_SUBST(RPM_RELEASE) +AC_SUBST(PATCH_VERSION) +AC_SUBST(SCM_VERSION) AC_SUBST(SOVERSION) -AC_SUBST(BUILD_TS) AC_PROG_CC AC_PROG_CXX @@ -194,7 +193,7 @@ AS_IF([test "x$with_docs_only" == xyes], [Enable collecting data to ease debugging, default: NO]), [ AC_DEFINE([ENABLE_DEBUG_DATA], [1], [Enable collecting data]) - AC_DEFINE([UCT_UD_EP_DEBUG_HOOKS], [1], + AC_DEFINE([UCT_UD_EP_DEBUG_HOOKS], [1], [Enable packet header inspection/rewriting in UCT/UD]) ], [AC_DEFINE([ENABLE_DEBUG_DATA], [0])]) diff --git a/contrib/buildrpm.sh b/contrib/buildrpm.sh index 4c937642473..f0f2585c039 100755 --- a/contrib/buildrpm.sh +++ b/contrib/buildrpm.sh @@ -46,6 +46,15 @@ if [ $opt_tarball -eq 1 ]; then make dist fi +# Version includes revision, while tarball in Source doesn't have it since +# it uses GitHub standart name v.tar.gz, so make: +# ucx-1.3.0.6a61458.tar.gz --> v1.3.0.tar.gz for rpmbuild +tgz=(ucx*.tar.gz) +tarball=${tgz[0]} +link_tarball=$(perl -e '$fname=$ARGV[0]; ($new_name=$fname)=~s/^.+-(\d+\.\d+\.\d+)/v$1/; print $new_name' $tarball) +rm -f $link_tarball +ln -s $tarball $link_tarball + if [ $opt_srcrpm -eq 1 ]; then echo rpmbuild -bs $rpmmacros $rpmopts $rpmspec $defines | bash -eEx fi diff --git a/debian/changelog.in b/debian/changelog.in index 3275d275d0b..1f1dab102e4 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -1,4 +1,4 @@ -ucx (@MAJOR_VERSION@.@MINOR_VERSION@.@MICRO_VERSION@) unstable; urgency=low +ucx (@MAJOR_VERSION@.@MINOR_VERSION@.@SCM_VERSION@) unstable; urgency=low * Initial release (Closes: #nnnn) diff --git a/src/tools/info/build_info.c b/src/tools/info/build_info.c index 82b915c7cc6..4e0615ff803 100644 --- a/src/tools/info/build_info.c +++ b/src/tools/info/build_info.c @@ -16,7 +16,7 @@ void print_version() { - printf("# UCT version=%s\n", UCT_VERNO_STRING); + printf("# UCT version=%s revision %s\n", UCT_VERNO_STRING, UCT_SCM_VERSION); printf("# configured with: %s\n", UCX_CONFIGURE_FLAGS); } diff --git a/src/ucp/api/ucp_version.h.in b/src/ucp/api/ucp_version.h.in index fc691b2c263..dc14a178411 100644 --- a/src/ucp/api/ucp_version.h.in +++ b/src/ucp/api/ucp_version.h.in @@ -19,5 +19,4 @@ */ #define UCP_API_MAJOR @MAJOR_VERSION@ #define UCP_API_MINOR @MINOR_VERSION@ -#define UCP_API_RELEASE @REV_COUNT@ #define UCP_API_VERSION UCP_VERSION(@MAJOR_VERSION@, @MINOR_VERSION@) diff --git a/src/ucp/core/ucp_version.c.in b/src/ucp/core/ucp_version.c.in index 6fcc38eb1fb..c4e17a30f68 100644 --- a/src/ucp/core/ucp_version.c.in +++ b/src/ucp/core/ucp_version.c.in @@ -9,10 +9,10 @@ void ucp_get_version(unsigned *major_version, unsigned *minor_version, { *major_version = @MAJOR_VERSION@; *minor_version = @MINOR_VERSION@; - *release_number = @REV_COUNT@; + *release_number = @PATCH_VERSION@; } const char *ucp_get_version_string() { - return "@MAJOR_VERSION@.@MINOR_VERSION@.@REV_COUNT@"; + return "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@"; } diff --git a/src/uct/api/version.h.in b/src/uct/api/version.h.in index 424b4bcd3a2..6c121145c3f 100644 --- a/src/uct/api/version.h.in +++ b/src/uct/api/version.h.in @@ -10,9 +10,8 @@ #define UCT_VERNO_MAJOR @MAJOR_VERSION@ #define UCT_VERNO_MINOR @MINOR_VERSION@ -#define UCT_VERNO_REV "@MICRO_VERSION@" -#define UCT_VERNO_MICRO @REV_COUNT@ -#define UCT_VERNO_STRING "@MAJOR_VERSION@.@MINOR_VERSION@.@REV_COUNT@" +#define UCT_VERNO_STRING "@VERSION@" +#define UCT_SCM_VERSION "@SCM_VERSION@" #define UCT_MINOR_BIT (16UL) #define UCT_MAJOR_BIT (24UL) diff --git a/ucx.spec.in b/ucx.spec.in index 703e3a4b2c6..c5fd34ac857 100644 --- a/ucx.spec.in +++ b/ucx.spec.in @@ -1,97 +1,71 @@ -%global rel @RPM_RELEASE@ -%global version @VERSION@ -%global pkgname @PACKAGE@ -%global prefix @prefix@ -%global __check_files %{nil} -%global _prefix %{prefix} -%global _libdir %{prefix}/lib -%global debug_package %{nil} -%bcond_with valgrind -%global _binary_filedigest_algorithm 1 -%global _source_filedigest_algorithm 1 +%{!?configure_options: %global configure_options %{nil}} -%global lt_release @LT_RELEASE@ -%global lt_version @LT_CURRENT@.@LT_REVISION@.@LT_AGE@ +Name: ucx +Version: @VERSION@ +Release: 1%{?dist} +Summary: UCX is a communication library implementing high-performance messaging +Group: System Environment/Libraries -%{!?configure_options: %define configure_options %{nil}} - -Name: %{pkgname} -Summary: Unified Communication X -Version: %{version} -Release: %{rel} - -License: BSDv3 -Group: Applications -Source: %{pkgname}-%{version}.tar.gz - -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +License: BSD URL: http://www.openucx.org -Prefix: %{prefix} -Provides: ucx -Packager: openucx -Vendor: openucx +Source: https://github.com/openucx/%{name}/archive/v@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.tar.gz + +ExclusiveArch: aarch64 ppc64le x86_64 +BuildRequires: numactl-devel +BuildRequires: automake autoconf libtool %description -UCX is a communication library implementing high-performance messaging. +UCX stands for Unified Communication X. It requires either RDMA-capable device +(InfiniBand, RoCE, etc), Cray Gemini or Aries, for inter-node communication. +Future versions will support also TCP for inter-node, to lift that hardware +dependency. +In addition, the library can be used for intra-node communication by leveraging +the following shared memory mechanisms: posix. sysv, cma, knem, xpmem. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} +Summary: Header files and libraries required to develop with ucx +Group: Development/Libraries + +%description devel +Provides header files, static libraries and examples for developing with UCX. %prep -rm -rf $RPM_BUILD_ROOT - %setup -q %build -./contrib/configure-release %{?configure_options} -make %{?_smp_mflags} +%configure --disable-optimizations \ + --disable-logging \ + --disable-debug \ + --disable-assertions \ + --disable-params-check \ + CXXFLAGS="%{optflags} -fno-exceptions" \ + %{?configure_options} +make %{?_smp_mflags} V=1 %install - -rm -rf "$RPM_BUILD_ROOT" - -# Strip out some dependencies -cat > find-requires.sh <<'EOF' -exec %{__find_requires} "$@" | egrep -v '^perl' -EOF -chmod +x find-requires.sh -%global _use_internal_dependency_generator 0 -%global __find_requires %{_builddir}/%{buildsubdir}/find-requires.sh - -make DESTDIR="$RPM_BUILD_ROOT" install -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d/ -echo %{_libdir} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/ucx.conf -mkdir -p $RPM_BUILD_ROOT/usr/lib64/pkgconfig -cp ucx.pc $RPM_BUILD_ROOT/usr/lib64/pkgconfig - -%clean -# We may be in the directory that we're about to remove, so cd out of -# there before we remove it -cd /tmp - -# Remove installed driver after rpm build finished -chmod -R o+w $RPM_BUILD_DIR/%{name}-%{version} -rm -rf $RPM_BUILD_DIR/%{name}-%{version} - -test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT - +make DESTDIR=%{buildroot} install +rm -f %{buildroot}%{_libdir}/*.la %files -%defattr(-, root, root) -%{prefix} -/etc/ld.so.conf.d/ucx.conf -/usr/lib64/pkgconfig/ucx.pc - -# Your application file list goes here -# %{prefix}/lib/lib*.so* -#%doc COPYRIGHT ChangeLog README AUTHORS NEWS -#%doc doc/* - -# If you install a library -%post -/sbin/ldconfig || exit 1 -exit 0 - -# If you install a library -%postun -/sbin/ldconfig -exit 0 - +%{_libdir}/lib*.so* +%{_bindir}/uc* +%{_datadir}/ucx/perftest/* +%doc README AUTHORS NEWS +%{!?_licensedir:%global license %%doc} +%license LICENSE + +%files devel +%{_includedir}/uc* +%{_libdir}/lib*.a +%{_libdir}/pkgconfig/ucx.pc +%{_datadir}/ucx/examples + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%changelog +* Mon Jul 3 2017 Andrey Maslennikov 1.3 +- Fedora package created