Skip to content

Commit

Permalink
Merge pull request #1106 from kholland-intel/pr/test-submodule
Browse files Browse the repository at this point in the history
Add test-sos as a submodule
  • Loading branch information
David Ozog authored Feb 16, 2024
2 parents 0e4cff6 + 989d8d3 commit 12cd72b
Show file tree
Hide file tree
Showing 241 changed files with 80 additions and 35,917 deletions.
45 changes: 26 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ jobs:
- name: Checking OS version
run: |
echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get install -y gfortran rpm mpich libmpich-dev libhwloc-dev
Expand All @@ -167,7 +169,7 @@ jobs:
key: libfabric-${{ matrix.libfabric_version }}-${{ env.OS_NAME }}
- name: Checkout libfabric
if: steps.cache-libfabric.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: ofiwg/libfabric
path: repos/libfabric
Expand All @@ -192,7 +194,7 @@ jobs:
key: xpmem-${{ matrix.xpmem_version }}-${{ env.OS_NAME }}
- name: Checkout XPMEM
if: ${{ matrix.xpmem_version }}
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: hjelmn/xpmem
path: repos/xpmem
Expand Down Expand Up @@ -223,7 +225,7 @@ jobs:
make check TESTS= -j
${{ matrix.env_setup }}
SHMEM_DEBUG=1 SHMEM_INFO=1 make VERBOSE=1 TEST_RUNNER="${SOS_PM} -np 2" check
cat test/unit/hello.log
cat modules/tests-sos/test/unit/hello.log
- name: Test RPM (${{ matrix.rpm_build }})
if: ${{ matrix.rpm_build }}
run: |
Expand Down Expand Up @@ -453,7 +455,7 @@ jobs:
# export PATH=${PRRTE_INSTALL_DIR}/bin:$PATH
# ${{ matrix.sos_pm_pre }}
# SHMEM_INFO=1 make VERBOSE=1 TEST_RUNNER="${{ matrix.sos_pm }} -np 2" check
# cat test/unit/hello.log
# cat modules/tests-sos/test/unit/hello.log
# ${{ matrix.sos_pm_post }}
# - name: Test SOS (hello)
# if: ${{ matrix.sos_transport == 'portals4' }}
Expand All @@ -462,7 +464,7 @@ jobs:
# make check TESTS= -j
# export PATH=${PRRTE_INSTALL_DIR}/bin:$PATH
# ${{ matrix.sos_pm_pre }}
# SHMEM_INFO=1 ${{ matrix.sos_pm }} -np 1 test/unit/hello
# SHMEM_INFO=1 ${{ matrix.sos_pm }} -np 1 modules/tests-sos/test/unit/hello
# ${{ matrix.sos_pm_post }}
#
UCX:
Expand All @@ -474,16 +476,17 @@ jobs:
- config_name: ucx-1.9.0
ucx_version: v1.9.0
xpmem_version: master
sos_config: [--enable-pmi-simple --disable-fortran --with-hwloc=no,
--enable-pmi-mpi CC=mpicc --disable-fortran,
sos_config: [--enable-pmi-simple --disable-fortran,
--with-cma --enable-error-checking --enable-profiling
--enable-pmi-simple --disable-fortran --with-hwloc=no,
--with-xpmem --enable-error-checking --enable-pmi-simple --with-hwloc=no]
steps:
- name: Checking OS version
run: |
echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get install -y gfortran mpich libmpich-dev
Expand All @@ -492,7 +495,7 @@ jobs:
# XPMEM
- name: Checkout XPMEM
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: hjelmn/xpmem
path: repos/xpmem
Expand All @@ -517,7 +520,7 @@ jobs:
key: ucx-${{ matrix.ucx_version}}-${{ env.OS_NAME }}
- name: Checkout UCX
if: steps.cache-ucx.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: openucx/ucx
path: repos/ucx
Expand Down Expand Up @@ -545,7 +548,7 @@ jobs:
cd build
make check TESTS= -j
SHMEM_DEBUG=1 SHMEM_INFO=1 make VERBOSE=1 TEST_RUNNER="${SOS_PM} -np 2" check
cat test/unit/hello.log
cat modules/tests-sos/test/unit/hello.log
Portals4:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -573,7 +576,9 @@ jobs:
- name: Checking OS version
run: |
echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get install -y gfortran mpich libmpich-dev libev-dev libev-libevent-dev libhwloc-dev
Expand All @@ -582,7 +587,7 @@ jobs:
# XPMEM
- name: Checkout XPMEM
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: hjelmn/xpmem
path: repos/xpmem
Expand All @@ -607,7 +612,7 @@ jobs:
key: portals4-${{ matrix.portals4_version}}-${{ env.OS_NAME }}
- name: Checkout Portals4
if: steps.cache-portals4.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: regrant/portals4
path: repos/portals4
Expand All @@ -634,7 +639,7 @@ jobs:
run: |
cd build
make check TESTS= -j
${SOS_PM} -np 1 test/unit/hello
${SOS_PM} -np 1 modules/tests-sos/test/unit/hello
XPMEM_Only:
runs-on: ubuntu-20.04
Expand All @@ -650,7 +655,9 @@ jobs:
- name: Checking OS version
run: |
echo "OS_NAME=$(lsb_release -si)-$(ls_release -sr)" >> $GITHUB_ENV
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: |
sudo apt-get install -y gfortran mpich libmpich-dev libev-dev libev-libevent-dev libhwloc-dev
Expand All @@ -659,7 +666,7 @@ jobs:
# XPMEM
- name: Checkout XPMEM
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: hjelmn/xpmem
path: repos/xpmem
Expand Down Expand Up @@ -688,4 +695,4 @@ jobs:
cd build
make check TESTS= -j
SHMEM_DEBUG=1 SHMEM_INFO=1 make VERBOSE=1 TEST_RUNNER="${SOS_PM} -np 2" check
${SOS_PM} -np 1 test/unit/hello
${SOS_PM} -np 1 modules/tests-sos/test/unit/hello
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "modules/tests-sos"]
path = modules/tests-sos
url = ../../openshmem-org/tests-sos.git
branch = main
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif

dist_doc_DATA = README NEWS LICENSE

SUBDIRS = bindings mpp pmi-simple src test
SUBDIRS = bindings mpp pmi-simple src modules

if ENABLE_MANPAGES
SUBDIRS += man
Expand Down
27 changes: 27 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

test -d ./config || mkdir ./config

tests_sos_dir=modules/tests-sos

script_dir="$(cd "$(dirname "$0")" && pwd)"
current_dir="$(pwd)"

# Check if the script is being run from within the root SOS source directory
if [ "$script_dir" != "$current_dir" ]; then
echo "Error: Please run ./autogen.sh from the top-level directory of SOS."
exit 1
fi

if [ ! -d "${tests_sos_dir}" ]; then
echo "Error: the tests-sos submodule directory ${tests_sos_dir} does not exist"
exit 1
elif [ ! -f "${tests_sos_dir}/test/Makefile.am" ] ||
[ ! -f "${tests_sos_dir}/test/apps/Makefile.am" ] ||
[ ! -f "${tests_sos_dir}/test/include/Makefile.am" ] ||
[ ! -f "${tests_sos_dir}/test/performance/Makefile.am" ] ||
[ ! -f "${tests_sos_dir}/test/shmemx/Makefile.am" ] ||
[ ! -f "${tests_sos_dir}/test/spec-example/Makefile.am" ] ||
[ ! -f "${tests_sos_dir}/test/unit/Makefile.am" ]; then
echo "Error: test submodule (${tests_sos_dir}) contents are missing."
echo "Please run the following command to download the SOS tests:"
echo " git submodule update --init"
exit 1
fi

FILES=./man/*.1
echo -n "dist_man1_MANS =" > ./man/Makefile.am
for f in $FILES
Expand Down
20 changes: 11 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -967,15 +967,17 @@ AC_CONFIG_FILES([Makefile
mpp/shmem-def.h
src/Makefile
src/sandia-openshmem.pc
test/Makefile
test/unit/Makefile
test/shmemx/Makefile
test/spec-example/Makefile
test/include/Makefile
test/performance/Makefile
test/performance/shmem_perf_suite/Makefile
test/performance/tests/Makefile
test/apps/Makefile])
modules/Makefile
modules/tests-sos/Makefile
modules/tests-sos/test/Makefile
modules/tests-sos/test/unit/Makefile
modules/tests-sos/test/shmemx/Makefile
modules/tests-sos/test/spec-example/Makefile
modules/tests-sos/test/include/Makefile
modules/tests-sos/test/performance/Makefile
modules/tests-sos/test/performance/shmem_perf_suite/Makefile
modules/tests-sos/test/performance/tests/Makefile
modules/tests-sos/test/apps/Makefile])

AC_OUTPUT

Expand Down
4 changes: 2 additions & 2 deletions test/Makefile.am → modules/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
# retains certain rights in this software.
#
# Copyright (c) 2017 Intel Corporation. All rights reserved.
# Copyright (c) 2024 Intel Corporation. All rights reserved.
# This software is available to you under the BSD license.
#
# This file is part of the Sandia OpenSHMEM software package. For license
# information, see the LICENSE file in the top level directory of the
# distribution.

SUBDIRS = unit shmemx performance apps spec-example include
SUBDIRS = tests-sos
1 change: 1 addition & 0 deletions modules/tests-sos
Submodule tests-sos added at d1adb7
12 changes: 6 additions & 6 deletions sandia-openshmem.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ rm -f %{buildroot}%{_libdir}/*.la
# FIXME: It would be better to configure with --disable-libtool-wrapper so we
# can pull from the standard dirs instead of .libs
install -d %{testdir}/unit
install test/unit/.libs/* %{testdir}/unit
install modules/tests-sos/test/unit/.libs/* %{testdir}/unit
install -d %{testdir}/shmemx
install test/shmemx/.libs/* %{testdir}/shmemx
install modules/tests-sos/test/shmemx/.libs/* %{testdir}/shmemx
install -d %{testdir}/spec-example
install test/spec-example/.libs/* %{testdir}/spec-example
install modules/tests-sos/test/spec-example/.libs/* %{testdir}/spec-example
install -d %{testdir}/apps
install test/apps/.libs/* %{testdir}/apps
install modules/tests-sos/test/apps/.libs/* %{testdir}/apps
install -d %{testdir}/performance/shmem_perf_suite
install test/performance/shmem_perf_suite/.libs/* %{testdir}/performance/shmem_perf_suite
install modules/tests-sos/test/performance/shmem_perf_suite/.libs/* %{testdir}/performance/shmem_perf_suite
install -d %{testdir}/performance/tests
install test/performance/tests/.libs/* %{testdir}/performance/tests
install modules/tests-sos/test/performance/tests/.libs/* %{testdir}/performance/tests

%clean
rm -rf %{buildroot}
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ RUN make install

# Build SOS
WORKDIR $SOS_INSTALL
RUN git clone https://github.com/Sandia-OpenSHMEM/SOS.git
RUN git clone --recurse-submodules https://github.com/Sandia-OpenSHMEM/SOS.git
WORKDIR SOS
RUN ./autogen.sh
# To build SOS w/ basic Libfabric
Expand Down
2 changes: 1 addition & 1 deletion scripts/simple-build-ofi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ echo ========================================================================
echo = BUILDING SANDIA OPENSHMEM
echo ========================================================================

git clone -b $SOS_VERSION --depth $CLONE_DEPTH https://github.com/Sandia-OpenSHMEM/SOS.git sos
git clone -b $SOS_VERSION --depth $CLONE_DEPTH --recurse-submodules https://github.com/Sandia-OpenSHMEM/SOS.git sos
cd sos
./autogen.sh
./configure --prefix=$INSTALL_DIR --with-ofi=$INSTALL_DIR $SOS_CONFIG_OPTS
Expand Down
58 changes: 0 additions & 58 deletions test/apps/Makefile.am

This file was deleted.

Loading

0 comments on commit 12cd72b

Please sign in to comment.