Skip to content

Github action: build mpich #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions .github/workflows/build_test_latest_c.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test Linux with pnetcdf-c built from source
name: Test PnetCDF-C master branch
on:
push:
branches:
Expand All @@ -20,28 +20,26 @@ jobs:
timeout-minutes: 60
env:
MPICH_VERSION: 4.2.0
MPICH_DIR: ${{ github.workspace }}/mpich-install
PNETCDF_VERSION: repo
PNETCDF_DIR: ${{ github.workspace }}/PnetCDF-install
MPICH_DIR: ${{ github.workspace }}/mpich-install

strategy:
matrix:
python-version: ["3.10"]
steps:

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Ubuntu Dependencies
run: |
set -x
sudo apt-get update
sudo apt-get install csh
sudo apt-get install automake autoconf libtool libtool-bin m4
# sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev
# sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev

- name: Build MPICH
run: |
Expand All @@ -56,43 +54,52 @@ jobs:
--with-file-system=ufs \
--with-device=ch3:sock \
--enable-shared\
CC=gcc
--disable-fortran \
CC=gcc
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1
- name: Build PnetCDF

- name: Build PnetCDF-C from master branch
run: |
echo "Build PnetCDF from source"
echo "Build PnetCDF-C from its master branch"
cd ${GITHUB_WORKSPACE}
git clone -q https://github.com/Parallel-NetCDF/PnetCDF.git
pushd PnetCDF
autoreconf -i
./configure --prefix $PNETCDF_DIR --enable-shared --enable-debug --disable-fortran --disable-cxx --with-mpi=$MPICH_DIR
make -j 8
make install
./configure --prefix=$PNETCDF_DIR \
--silent \
--enable-shared \
--enable-debug \
--disable-fortran \
--disable-cxx \
--with-mpi=$MPICH_DIR
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1
popd

- name: Install python dependencies via pip
run: |
python -m pip install --upgrade pip
pip install numpy cython cftime pytest twine wheel check-manifest
pip install numpy cython cftime pytest twine wheel check-manifest
export MPICC=$MPICH_DIR/bin/mpicc
pip install mpi4py

- name: Install pnetcdf
- name: Install PnetCDF-Python
run: |
export PATH=${PNETCDF_DIR}/bin:${PATH}
export CC=$MPICH_DIR/bin/mpicc
python setup.py install
- name: Test

- name: Test PnetCDF-Python
run: |
export PATH=${MPICH_DIR}/bin:${PATH}
# serial
chmod 700 ./test_all.sh

chmod 700 ./test_all.sh
export NPROC=3 && ./test_all.sh
export NPROC=8 && ./test_all.sh
export NPROC=10 && ./test_all.sh

cd examples
chmod 700 ./test_all.sh
export NPROC=3 && ./test_all.sh
export NPROC=8 && ./test_all.sh
export NPROC=10 && ./test_all.sh
Expand Down
112 changes: 112 additions & 0 deletions .github/workflows/pnetcdf_c_official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Test PnetCDF-C latest official release
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.txt'
pull_request:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.txt'

jobs:
build-linux:
name: Python (${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 60
env:
MPICH_VERSION: 4.2.0
MPICH_DIR: ${{ github.workspace }}/mpich-install
PNETCDF_VERSION: 1.13.0
PNETCDF_DIR: ${{ github.workspace }}/PnetCDF-install
strategy:
matrix:
python-version: ["3.10"]
steps:

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install m4

- name: Build MPICH
run: |
echo "Install MPICH ${MPICH_VERSION} in $MPICH_DIR"
rm -rf MPICH ; mkdir MPICH ; cd MPICH
wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz
gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf -
cd mpich-${MPICH_VERSION}
./configure --prefix=$MPICH_DIR \
--silent \
--enable-romio \
--with-file-system=ufs \
--with-device=ch3:sock \
--enable-shared\
--disable-fortran \
CC=gcc
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1

- name: Build PnetCDF-C official release
run: |
echo "Download and build PnetCDF-C release version ${PNETCDF_VERSION}"
wget -q https://parallel-netcdf.github.io/Release/pnetcdf-${PNETCDF_VERSION}.tar.gz
tar -xzf pnetcdf-${PNETCDF_VERSION}.tar.gz
pushd pnetcdf-${PNETCDF_VERSION}
./configure --prefix=$PNETCDF_DIR \
--silent \
--enable-shared \
--enable-debug \
--disable-fortran \
--disable-cxx \
--with-mpi=$MPICH_DIR
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1
popd

- name: Install python dependencies via pip
run: |
python -m pip install --upgrade pip
pip install numpy cython cftime pytest twine wheel check-manifest
export MPICC=$MPICH_DIR/bin/mpicc
pip install mpi4py

- name: Install PnetCDF-Python
run: |
export CC=$MPICH_DIR/bin/mpicc
python setup.py install

- name: Test PnetCDF-Python
run: |
export PATH=${MPICH_DIR}/bin:${PATH}

chmod 700 ./test_all.sh
export NPROC=3 && ./test_all.sh
export NPROC=8 && ./test_all.sh
export NPROC=10 && ./test_all.sh

cd examples
chmod 700 ./test_all.sh
export NPROC=3 && ./test_all.sh
export NPROC=8 && ./test_all.sh
export NPROC=10 && ./test_all.sh

# - name: Tarball
# run: |
# export PATH=${NETCDF_DIR}/bin:${PATH}
# python setup.py --version
# check-manifest --version
# check-manifest --verbose
# pip wheel . -w dist --no-deps
# twine check dist/*
Loading