On 12/24/14 11:19, Vasiliy Tolstov wrote:
> 2014-12-24 12:03 GMT+03:00 Hiroyuki Sato <[email protected]>:
>> Hello Vasilly Tolstov
>>
>> This URL might be help.
>> http://www.rdmamojo.com
>>
>> There are RDMA configuration for many OSs. (RHEL, Ubuntu, SLES..)
> 
> Thanks, but.. i'm using source based disto that not listed in this site =(

Hello Vasiliy,

A possible alternative is to start from a recent upstream kernel and to
build and install the latest RDMA libraries from the upstream git
repositories. I have attached the script I use myself since considerable
time to install the latest RDMA libraries on openSUSE systems.

Bart.
#!/bin/bash

# See also http://www.openfabrics.org/downloads/MAINTAINERS
clone() {
  case "$1" in
    ibacm)
      git clone git://git.openfabrics.org/~shefty/ibacm.git;;
    ibutils)
      git clone git://git.openfabrics.org/~vlad/ibutils.git;;
    infiniband-diags)
      git clone git://git.openfabrics.org/~iraweiny/infiniband-diags.git;;
    libibcm)
      git clone git://git.openfabrics.org/~shefty/libibcm.git;;
    libibmad)
      git clone git://git.openfabrics.org/~iraweiny/libibmad.git;;
    libibumad)
      git clone git://git.openfabrics.org/~halr/libibumad.git;;
    libibverbs)
      git clone git://git.kernel.org/pub/scm/libs/infiniband/libibverbs.git;;
    libmlx4)
      git clone git://git.kernel.org/pub/scm/libs/infiniband/libmlx4.git;;
    librdmacm)
      git clone git://git.openfabrics.org/~shefty/librdmacm.git;;
    mstflint)
      git clone git://git.openfabrics.org/~mohammads/mstflint.git;;
    opensm)
      git clone git://git.openfabrics.org/~halr/opensm;;
    perftest)
      git clone git://git.openfabrics.org/~grockah/perftest.git;;
    srptools)
      git clone git://git.openfabrics.org/~bvanassche/srptools.git;;
    *)
      false;;
  esac
}

build() {
  local rc

  ${scripts_dir}/clean-source-tree &&
  ./autogen.sh &&
  rpm --eval '%configure' | sh &&
  make -s &&
  sudo make -s install
  rc=$?
  ${scripts_dir}/change-owner-to-bart
  return $rc
}

build_lib() {
  local rc

  ${scripts_dir}/clean-source-tree &&
  ./autogen.sh &&
  rpm --eval '%configure' \
    | sed "s|\(\./configure \)|\1 --disable-static $@ |" \
    | sh &&
  make -s &&
  sudo make -s install
  rc=$?
  ${scripts_dir}/change-owner-to-bart
  return $rc
}

build_libibcm() {
  build_lib --with-valgrind
}

build_libibverbs() {
  build_lib --with-valgrind
}

# Depends on libibverbs.
build_libmlx4() {
  build_lib --with-valgrind
}

build_libibumad() {
  build_lib --with-valgrind
}

# Depends on libibumad.
build_libibmad() {
  build_lib
}

build_librdmacm() {
  build_lib --with-valgrind
}

build_ibacm() {
  build_lib
}

build_ibutils() {
  build_lib
}

# Depends on libibumad and libosmcomp.
build_infiniband_diags() {
  build_lib --with-ibpath_override=$prefix/sbin
}

build_mstflint() {
  build
}

build_opensm() {
  build_lib
}

# Depends on librdmacm.
build_perftest() {
  if [ -e autogen.sh ]; then
    build
  else
    ${scripts_dir}/clean-source-tree &&
    make &&
    sudo cp \
      ib_atomic_bw \
      ib_atomic_lat \
      ib_clock_test \
      ib_read_bw \
      ib_read_lat \
      ib_send_bw \
      ib_send_lat \
      ib_write_bw \
      ib_write_bw_postlist \
      ib_write_lat \
      $prefix/bin
  fi
}

build_srptools() {
  build
}

prefix=/usr
scripts_dir="$(dirname $0)"
if [ "${scripts_dir#/}" = "${scripts_dir}" ]; then
  scripts_dir="$PWD/$scripts_dir"
fi

if type -p zypper >/dev/null 2>&1; then
    zypper install -y autoconf automake bison flex gcc gcc-c++ glib2-devel 
libtool make python-docutils valgrind-devel # graphviz-tcl swig tcl-devel 
tk-devel
elif type -p apt-get >/dev/null 2>&1; then
    apt-get install -q -y autoconf automake bison flex gcc libglib2.0-dev 
libtool make python-docutils valgrind # graphviz-tcl swig tcl-dev tk-dev
fi

components="${@:-libibverbs libmlx4 libibumad libibmad opensm infiniband-diags 
libibcm librdmacm srptools perftest mstflint}" # ibutils
for p in ${components}
do
  (
    echo
    echo ==== $p ====
    echo
    if [ ! -e $p ]; then
      clone $p
    fi
    cd $p &&
    build_${p/-/_}
  ) || exit $?
done

Reply via email to