Clean the FLUX module code and fix getopt() bug #723
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compilation Testing for DYAD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
compile-flux: | |
strategy: | |
fail-fast: false | |
matrix: | |
flux: [ 0.52.0, 0.49.0] | |
mode: ["UCX"] | |
os: [ ubuntu-20.04 ] | |
compiler: [ gcc ] | |
gcc: [ 10 ] | |
profiler_mode: ["NONE"] | |
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.gcc }}-${{ matrix.flux }}-${{ matrix.mode }} | |
runs-on: ${{ matrix.os }} # Docker-based jobs must run on Ubuntu | |
env: | |
FLUX_VERSION: ${{ matrix.flux }} | |
CC: gcc-${{ matrix.gcc }} | |
CXX: g++-${{ matrix.gcc }} | |
SPACK_DIR: "/home/runner/work/spack" | |
DYAD_INSTALL_PREFIX: "/home/runner/work/dyad/install" | |
DYAD_KVS_NAMESPACE: "test" | |
DYAD_DTL_MODE: ${{ matrix.mode }} | |
DYAD_PATH: "/home/runner/work/dyad/temp/" | |
steps: | |
- name: Push checkout | |
if: github.event_name == 'push' | |
uses: actions/checkout@v3 | |
- name: PR checkout | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: ${{ matrix.gcc }} | |
- name: Install system deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends \ | |
gcc g++ gfortran \ | |
cmake \ | |
autoconf \ | |
automake \ | |
libtool \ | |
libtool-bin \ | |
openmpi-bin \ | |
libopenmpi-dev \ | |
libarchive-dev \ | |
ncurses-bin \ | |
hwloc \ | |
lua5.3 liblua5.3-dev \ | |
python3.10 \ | |
python3-pip \ | |
python3-venv \ | |
libczmq-dev \ | |
lua-posix-dev \ | |
lz4 \ | |
pkgconf \ | |
libzmq5 \ | |
sqlite | |
sudo pip install jsonschema cffi ply pyyaml | |
sudo chmod 777 /usr -R | |
- name: Install Spack | |
run: | | |
git clone https://github.com/spack/spack.git ${SPACK_DIR} | |
- name: Load existing dependencies | |
run: | | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
mkdir -p /home/runner/.spack | |
GCC_VERSION="9.3.0" | |
if [[ $CC == 'gcc-10' ]]; then | |
GCC_VERSION="10.3.0" | |
fi | |
cat > /home/runner/.spack/packages.yaml <<EOF | |
packages: | |
all: | |
target: [x86_64] | |
providers: | |
mpi: [openmpi] | |
python: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
py-cffi: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
py-jsonschema: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
py-ply: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
py-pyyaml: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
czmq: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
sqlite: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
libzmq: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
lua: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
lua-luaposix: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
lz4: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
ncurses: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
pkgconf: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
hwloc: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
libarchive: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
autoconf: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
automake: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
libtool: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
m4: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
openmpi: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
openssl: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
pkg-config: | |
buildable: False | |
externals: | |
- spec: "[email protected]" | |
prefix: /usr | |
gcc: | |
externals: | |
- spec: gcc@${GCC_VERSION} languages=c,c++ | |
prefix: /usr | |
extra_attributes: | |
compilers: | |
c: ${CC} | |
cxx: ${CXX} | |
buildable: False | |
EOF | |
echo "-------------------------------" | |
cat /home/runner/.spack/packages.yaml | |
echo "-------------------------------" | |
spack compiler find --scope=user | |
if [[ $CC == 'gcc-10' ]]; then | |
spack config add "packages:all:compiler:[[email protected]]" | |
else | |
spack config add "packages:all:compiler:[[email protected]]" | |
fi | |
spack external find | |
spack spec flux-core@${FLUX_VERSION} | |
spack spec cpp-logger@develop | |
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then | |
spack spec [email protected] | |
fi | |
- name: Install dependencies | |
run: | | |
mkdir -p ${DYAD_INSTALL_PREFIX} | |
python3 -m venv ${DYAD_INSTALL_PREFIX} | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
spack install -j4 flux-core@${FLUX_VERSION} | |
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then | |
spack install -j4 [email protected] | |
fi | |
if [[ $DYAD_PROFILER_MODE == 'CALIPER' ]]; then | |
spack install -j4 caliper | |
fi | |
spack install cpp-logger@develop | |
spack view --verbose symlink ${DYAD_INSTALL_PREFIX} flux-core@${FLUX_VERSION} cpp-logger@develop | |
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then | |
spack view --verbose symlink ${DYAD_INSTALL_PREFIX} [email protected] | |
fi | |
if [[ $DYAD_PROFILER_MODE == 'CALIPER' ]]; then | |
spack view --verbose symlink ${DYAD_INSTALL_PREFIX} caliper | |
fi | |
- name: Compile DYAD | |
run: | | |
echo "Activating spack" | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
echo "Install DYAD" | |
cd ${GITHUB_WORKSPACE} | |
ls | |
pwd | |
mkdir build | |
cd build | |
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DYAD_INSTALL_PREFIX}/lib/pkgconfig | |
CONFIGURE_FLAGS="-DDYAD_PROFILER=NONE" | |
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then | |
CONFIGURE_FLAGS="-DDYAD_ENABLE_UCX_DATA=ON -DDYAD_PROFILER=NONE" | |
fi | |
TEST_CONF="-DDYAD_LIBDIR_AS_LIB:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DDYAD_LOGGER=CPP_LOGGER -DDYAD_LOGGER_LEVEL=DEBUG" | |
cmake --version | |
cmake -DCMAKE_INSTALL_PREFIX=${DYAD_INSTALL_PREFIX} ${CONFIGURE_FLAGS} ${TEST_CONF} .. | |
make VERBOSE=1 install -j | |
- name: Install PyDYAD | |
run: | | |
source ${DYAD_INSTALL_PREFIX}/bin/activate | |
cd ${GITHUB_WORKSPACE}/pydyad | |
pip install -v -e . | |
cd ${GITHUB_WORKSPACE} | |
- name: Install Test | |
run: | | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
export LD_LIBRARY_PATH=${DYAD_INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH} | |
export CFLAGS="-I${DYAD_INSTALL_PREFIX}/include" | |
export CXXFLAGS="-I${DYAD_INSTALL_PREFIX}/include" | |
export LDFLAGS="-L${DYAD_INSTALL_PREFIX}/lib" | |
cd ${GITHUB_WORKSPACE}/docs/demos/ecp_feb_2023 | |
make all | |
- name: Test DYAD with separate FS c | |
timeout-minutes: 1 | |
run: | | |
mkdir -m 775 -p $DYAD_PATH | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
export PATH=${PATH}:${DYAD_INSTALL_PREFIX}/bin:${DYAD_INSTALL_PREFIX}/sbin | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DYAD_INSTALL_PREFIX}/lib | |
echo "Starting flux brokers" | |
flux start --test-size=2 /bin/bash ${GITHUB_WORKSPACE}/.github/prod-cons/dyad_prod_cons_test.sh "c" | |
- name: Test DYAD with separate FS cpp | |
timeout-minutes: 1 | |
run: | | |
mkdir -m 775 -p $DYAD_PATH | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
export PATH=${PATH}:${DYAD_INSTALL_PREFIX}/bin:${DYAD_INSTALL_PREFIX}/sbin | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DYAD_INSTALL_PREFIX}/lib | |
echo "Starting flux brokers" | |
flux start --test-size=2 /bin/bash ${GITHUB_WORKSPACE}/.github/prod-cons/dyad_prod_cons_test.sh "cpp" | |
- name: Test DYAD with separate FS python | |
timeout-minutes: 1 | |
run: | | |
mkdir -m 775 -p $DYAD_PATH | |
source ${DYAD_INSTALL_PREFIX}/bin/activate | |
. ${SPACK_DIR}/share/spack/setup-env.sh | |
export PATH=${PATH}:${DYAD_INSTALL_PREFIX}/bin:${DYAD_INSTALL_PREFIX}/sbin | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DYAD_INSTALL_PREFIX}/lib | |
echo "Starting flux brokers" | |
flux start --test-size=2 /bin/bash ${GITHUB_WORKSPACE}/.github/prod-cons/dyad_prod_cons_test.sh "python" | |
#- name: Test DYAD with DLIO benchmark | |
# timeout-minutes: 10 | |
# run: | | |
#mkdir -m 775 -p $DYAD_PATH | |
#source ${DYAD_INSTALL_PREFIX}/bin/activate | |
#. ${SPACK_DIR}/share/spack/setup-env.sh | |
#export PATH=${PATH}:${DYAD_INSTALL_PREFIX}/bin:${DYAD_INSTALL_PREFIX}/sbin | |
#export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DYAD_INSTALL_PREFIX}/lib | |
#export PYTHONPATH=${GITHUB_WORKSPACE}/tests/integration/dlio_benchmark:${GITHUB_WORKSPACE}/pydyad:$PYTHONPATH | |
#pip install -v -r ${GITHUB_WORKSPACE}/tests/integration/dlio_benchmark/requirements.txt | |
#echo "Starting flux brokers" | |
#cd ${GITHUB_WORKSPACE}/tests/integration/dlio_benchmark | |
#flux start --test-size=2 /bin/bash ./script.sh ${GITHUB_WORKSPACE} ${DYAD_INSTALL_PREFIX} | |