Skip to content

Commit

Permalink
Merge pull request #6523 from fwyzard/IB/CMSSW_11_3_X/master_OpenMPI_…
Browse files Browse the repository at this point in the history
…4.1.0

Update OpenMPI to 4.1.0, and add extra support libraries
  • Loading branch information
smuzaffar authored Jan 11, 2021
2 parents 285064d + 143c147 commit e9ba972
Show file tree
Hide file tree
Showing 13 changed files with 360 additions and 13 deletions.
7 changes: 7 additions & 0 deletions cmssw-tool-conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ Requires: python-toolfile
Requires: python3-toolfile
Requires: root-toolfile
Requires: sherpa-toolfile
Requires: libpciaccess-toolfile
Requires: numactl-toolfile
Requires: hwloc-toolfile
%ifnarch aarch64
Requires: gdrcopy-toolfile
%endif
Requires: ucx-toolfile
Requires: openmpi-toolfile
Requires: sigcpp-toolfile
Requires: sqlite-toolfile
Expand Down
21 changes: 21 additions & 0 deletions gdrcopy-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### RPM external gdrcopy-toolfile 1.0
Requires: gdrcopy
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/gdrcopy.xml
<tool name="gdrcopy" version="@TOOL_VERSION@">
<lib name="gdrapi"/>
<client>
<environment name="GDRCOPY_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$GDRCOPY_BASE/include"/>
<environment name="LIBDIR" default="$GDRCOPY_BASE/lib64"/>
</client>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
15 changes: 15 additions & 0 deletions gdrcopy.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### RPM external gdrcopy 2.1
## INITENV +PATH LD_LIBRARY_PATH %i/lib64
Source: https://github.com/NVIDIA/%{n}/archive/v%{realversion}.tar.gz
Requires: cuda

%prep
%setup -n %{n}-%{realversion}

%build
make %{makeprocesses} PREFIX=%{i} CUDA=$CUDA_ROOT lib

%install
make %{makeprocesses} PREFIX=%{i} CUDA=$CUDA_ROOT lib_install

%post
22 changes: 22 additions & 0 deletions hwloc-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### RPM external hwloc-toolfile 1.0
Requires: hwloc
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/hwloc.xml
<tool name="hwloc" version="@TOOL_VERSION@">
<lib name="hwloc"/>
<client>
<environment name="HWLOC_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$HWLOC_BASE/include/hwloc"/>
<environment name="LIBDIR" default="$HWLOC_BASE/lib"/>
</client>
<runtime name="PATH" value="$HWLOC_BASE/bin" type="path"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
52 changes: 52 additions & 0 deletions hwloc.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
### RPM external hwloc 2.4.0
Source: https://download.open-mpi.org/release/%{n}/v2.4/%{n}-%{realversion}.tar.bz2

BuildRequires: autotools
Requires: cuda libpciaccess libxml2 numactl

%prep
%setup -n %{n}-%{realversion}

./configure \
--prefix %{i} \
--enable-shared \
--disable-static \
--disable-dependency-tracking \
--enable-cpuid \
--enable-cuda \
--enable-nvml \
--enable-libxml2 \
--disable-cairo \
--disable-doxygen \
--enable-plugins=cuda,nvml \
--with-pic \
--with-gnu-ld \
--without-x \
CPPFLAGS="-I$CUDA_ROOT/include" \
LDFLAGS="-L$CUDA_ROOT/lib64 -L$CUDA_ROOT/lib64/stubs" \
HWLOC_PCIACCESS_CFLAGS="-I$LIBPCIACCESS_ROOT/include" \
HWLOC_PCIACCESS_LIBS="-L$LIBPCIACCESS_ROOT/lib -lpciaccess" \
HWLOC_LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2" \
HWLOC_LIBXML2_LIBS="-L$LIBXML2_ROOT/lib -lxml2" \
HWLOC_NUMA_CFLAGS="-I$NUMACTL_ROOT/include" \
HWLOC_NUMA_LIBS="-L$NUMACTL_ROOT/lib -lnuma"

%build
make %{makeprocesses}

%install
make install

# remove the libtool library files
rm -f %{i}/lib/lib*.la
rm -f %{i}/lib/hwloc/*.la

# remove unnecessary or unwanted files
rm -rf %{i}/sbin
rm -rf %{i}/share/doc
rm -rf %{i}/share/hwloc
rm -f %{i}/share/man/man1/hwloc-dump-hwdata.1

%post
%{relocateConfig}bin/hwloc-compress-dir
%{relocateConfig}bin/hwloc-gather-topology
22 changes: 22 additions & 0 deletions libpciaccess-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### RPM external libpciaccess-toolfile 1.0
Requires: libpciaccess

%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/libpciaccess.xml
<tool name="libpciaccess" version="@TOOL_VERSION@">
<lib name="libpciaccess"/>
<client>
<environment name="LIBPCIACCESS_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$LIBPCIACCESS_BASE/lib"/>
<environment name="INCLUDE" default="$LIBPCIACCESS_BASE/include"/>
</client>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
24 changes: 24 additions & 0 deletions libpciaccess.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### RPM external libpciaccess 0.16
# use the packaged sources from Debian instead of the developer sources from Xorg gitlab
# to avoid the dependency on the xorg-macros package
Source: http://deb.debian.org/debian/pool/main/libp/%{n}/%{n}_%{realversion}.orig.tar.gz

BuildRequires: autotools
Requires: zlib

%prep
%setup -n %{n}-%{realversion}

%build
./configure \
--prefix %{i} \
--disable-dependency-tracking \
--enable-shared \
--disable-static \
--with-pic \
--with-gnu-ld \
--with-zlib \
CPPFLAGS="-I$ZLIB_ROOT/include" \
LDFLAGS="-L$ZLIB_ROOT/lib"

%post
23 changes: 23 additions & 0 deletions numactl-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### RPM external numactl-toolfile 1.0
Requires: numactl
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/numactl.xml
<tool name="numactl" version="@TOOL_VERSION@">
<lib name="numa"/>
<client>
<environment name="NUMACTL_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$NUMACTL_BASE/include"/>
<environment name="LIBDIR" default="$NUMACTL_BASE/lib"/>
</client>
<runtime name="PATH" value="$NUMACTL_BASE/bin" type="path"/>
<runtime name="MANPATH" value="$NUMACTL_BASE/share/man" type="path"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
27 changes: 27 additions & 0 deletions numactl.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### RPM external numactl 2.0.14
## INITENV +PATH MANPATH %i/share/man
BuildRequires: autotools
Source: https://github.com/%{n}/%{n}/archive/v%{realversion}.tar.gz

%prep
%setup -n %{n}-%{realversion}

./autogen.sh
./configure \
--prefix=%{i} \
--enable-shared \
--disable-static \
--disable-dependency-tracking \
--with-pic \
--with-gnu-ld

%build
make %{makeprocesses}

%install
make install

# Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config
rm -rf %{i}/lib/pkgconfig

%post
19 changes: 10 additions & 9 deletions openmpi-toolfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ Requires: openmpi
%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/openmpi.xml
<tool name="openmpi" version="@TOOL_VERSION@">
<lib name="mpi"/>
<lib name="mpi_cxx"/>
<client>
<environment name="OPENMPI_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$OPENMPI_BASE/lib"/>
<environment name="INCLUDE" default="$OPENMPI_BASE/include"/>
</client>
<runtime name="PATH" value="$OPENMPI_BASE/bin" type="path"/>
<runtime name="OPAL_PREFIX" value="$OPENMPI_BASE"/>
<lib name="mpi"/>
<lib name="mpi_cxx"/>
<client>
<environment name="OPENMPI_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$OPENMPI_BASE/lib"/>
<environment name="INCLUDE" default="$OPENMPI_BASE/include"/>
</client>
<runtime name="PATH" value="$OPENMPI_BASE/bin" type="path"/>
<runtime name="OPAL_PREFIX" value="$OPENMPI_BASE"/>
</tool>
EOF_TOOLFILE

Expand Down
40 changes: 36 additions & 4 deletions openmpi.spec
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
### RPM external openmpi 4.0.5
### RPM external openmpi 4.1.0
## INITENV SET OPAL_PREFIX %{i}
Source: http://download.open-mpi.org/release/open-mpi/v4.0/%{n}-%{realversion}.tar.gz
Source: https://download.open-mpi.org/release/open-mpi/v4.1/%{n}-%{realversion}.tar.bz2
BuildRequires: autotools
Requires: zlib cuda hwloc ucx
# external libraries are needed for additional protocols:
# --with-ofi: Open Fabric Interface's libfabric
# --with-mxm: Mellanox Messaging
# --with-fca: Mellanox Fabric Collective Accelerator
# --with-hcoll: Mellanox Hierarchical Collectives
# --with-lsf: LSF job scheduler
# --with-lustre: Lustre filesystem
# etc.

%prep
%setup -q -n %{n}-%{realversion}

./autogen.pl --force
./configure --prefix=%i --without-lsf --disable-libnuma --enable-mpi-cxx --enable-mpi-thread-multiple
./configure \
--prefix=%i \
--disable-dependency-tracking \
--enable-ipv6 \
--enable-mpi-cxx \
--enable-shared \
--disable-static \
--enable-cxx-exceptions \
--disable-mpi-java \
--enable-openib-rdmacm-ibaddr \
--with-zlib=$ZLIB_ROOT \
--with-cuda=$CUDA_ROOT \
--with-hwloc=$HWLOC_ROOT \
--with-ucx=$UCX_ROOT \
--without-x \
--with-pic \
--with-gnu-ld

%build
make %{makeprocesses}

%install
make install

# remove the libtool library files
rm -f %{i}/lib/lib*.la
rm -f %{i}/lib/pmix/lib*.la
rm -f %{i}/lib/openmpi/lib*.la

%post
%{relocateConfig}share/openmpi/*-wrapper-data.txt
25 changes: 25 additions & 0 deletions ucx-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### RPM external ucx-toolfile 1.0
Requires: ucx
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/ucx.xml
<tool name="ucx" version="@TOOL_VERSION@">
<lib name="ucp"/>
<lib name="uct"/>
<lib name="ucs"/>
<lib name="ucm"/>
<client>
<environment name="UCX_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$UCX_BASE/include"/>
<environment name="LIBDIR" default="$UCX_BASE/lib"/>
</client>
<runtime name="PATH" value="$UCX_BASE/bin" type="path"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
Loading

0 comments on commit e9ba972

Please sign in to comment.