Skip to content

Commit ba43ff2

Browse files
author
Jeff Whitaker
authored
Merge pull request #1400 from Unidata/netcdf-c_update
update netcdf-c and pnetcdf versions in ci
2 parents 7804c53 + ed39d92 commit ba43ff2

File tree

3 files changed

+46
-25
lines changed

3 files changed

+46
-25
lines changed

.github/workflows/build_latest.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ jobs:
55
name: Python (${{ matrix.python-version }})
66
runs-on: ubuntu-latest
77
env:
8-
PNETCDF_VERSION: 1.12.1
9-
NETCDF_VERSION: 4.9.2
8+
PNETCDF_VERSION: 1.14.0
9+
NETCDF_VERSION: 4.9.3
1010
NETCDF_DIR: ${{ github.workspace }}/..
1111
NETCDF_EXTRA_CONFIG: --enable-pnetcdf
12-
CC: mpicc.mpich
12+
#CC: mpicc.mpich
13+
CC: mpicc
1314
#NO_NET: 1
1415
strategy:
1516
matrix:
16-
python-version: ["3.12"]
17+
python-version: ["3.13"]
1718
steps:
1819

1920
- uses: actions/checkout@v4
@@ -28,7 +29,8 @@ jobs:
2829
- name: Install Ubuntu Dependencies
2930
run: |
3031
sudo apt-get update
31-
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
32+
#sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev openmpi-bin openmpi-common libopenmpi-dev libhdf5-openmpi-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
33+
sudo apt-get install openmpi-common libopenmpi-dev openmpi-bin libhdf5-openmpi-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
3234
echo "Download and build PnetCDF version ${PNETCDF_VERSION}"
3335
wget https://parallel-netcdf.github.io/Release/pnetcdf-${PNETCDF_VERSION}.tar.gz
3436
tar -xzf pnetcdf-${PNETCDF_VERSION}.tar.gz
@@ -41,9 +43,12 @@ jobs:
4143
wget https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
4244
tar -xzf netcdf-c-${NETCDF_VERSION}.tar.gz
4345
pushd netcdf-c-${NETCDF_VERSION}
44-
export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
46+
#export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
47+
export CPPFLAGS="-I/usr/include/hdf5/openmpi -I${NETCDF_DIR}/include"
4548
export LDFLAGS="-L${NETCDF_DIR}/lib"
46-
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
49+
#export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
50+
export LIBS="-lhdf5_openmpi_hl -lhdf5_openmpi -lm -lz"
51+
which $CC
4752
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4 $NETCDF_EXTRA_CONFIG
4853
make -j 2
4954
sudo make install
@@ -74,21 +79,24 @@ jobs:
7479
python run_all.py
7580
# parallel (hdf5 for netcdf4, pnetcdf for netcdf3)
7681
cd ../examples
77-
mpirun.mpich -np 4 python mpi_example.py
82+
#mpirun.mpich -np 4 python mpi_example.py
83+
mpirun -np 4 --oversubscribe python mpi_example.py
7884
if [ $? -ne 0 ] ; then
7985
echo "hdf5 mpi test failed!"
8086
exit 1
8187
else
8288
echo "hdf5 mpi test passed!"
8389
fi
84-
mpirun.mpich -np 4 python mpi_example_compressed.py
90+
#mpirun.mpich -np 4 python mpi_example_compressed.py
91+
mpirun -np 4 --oversubscribe python mpi_example_compressed.py
8592
if [ $? -ne 0 ] ; then
8693
echo "hdf5 compressed mpi test failed!"
8794
exit 1
8895
else
8996
echo "hdf5 compressed mpi test passed!"
9097
fi
91-
mpirun.mpich -np 4 python mpi_example.py NETCDF3_64BIT_DATA
98+
#mpirun.mpich -np 4 python mpi_example.py NETCDF3_64BIT_DATA
99+
mpirun -np 4 --oversubscribe python mpi_example.py NETCDF3_64BIT_DATA
92100
if [ $? -ne 0 ] ; then
93101
echo "pnetcdf mpi test failed!"
94102
exit 1

.github/workflows/build_master.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ jobs:
66
runs-on: ubuntu-latest
77
env:
88
NETCDF_DIR: ${{ github.workspace }}/..
9-
CC: mpicc.mpich
9+
#CC: mpicc.mpich
10+
CC: mpicc
1011
#NO_NET: 1
1112
strategy:
1213
matrix:
13-
python-version: ["3.12"]
14+
python-version: ["3.13"]
1415
steps:
1516

1617
- uses: actions/checkout@v4
@@ -25,13 +26,16 @@ jobs:
2526
- name: Install Ubuntu Dependencies
2627
run: |
2728
sudo apt-get update
28-
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
29+
#sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
30+
sudo apt-get install openmpi-common libopenmpi-dev openmpi-bin libhdf5-openmpi-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
2931
echo "Download and build netCDF github master"
3032
git clone https://github.com/Unidata/netcdf-c
3133
pushd netcdf-c
32-
export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
34+
#export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
35+
export CPPFLAGS="-I/usr/include/hdf5/openmpi -I${NETCDF_DIR}/include"
3336
export LDFLAGS="-L${NETCDF_DIR}/lib"
34-
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
37+
#export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
38+
export LIBS="-lhdf5_openmpi_hl -lhdf5_openmpi -lm -lz"
3539
autoreconf -i
3640
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4
3741
make -j 2
@@ -65,14 +69,16 @@ jobs:
6569
python run_all.py
6670
# parallel
6771
cd ../examples
68-
mpirun.mpich -np 4 python mpi_example.py
72+
#mpirun.mpich -np 4 python mpi_example.py
73+
mpirun -np 4 --oversubscribe python mpi_example.py
6974
if [ $? -ne 0 ] ; then
7075
echo "hdf5 mpi test failed!"
7176
exit 1
7277
else
7378
echo "hdf5 mpi test passed!"
7479
fi
75-
mpirun.mpich -np 4 python mpi_example_compressed.py
80+
#mpirun.mpich -np 4 python mpi_example_compressed.py
81+
mpirun -np 4 --oversubscribe python mpi_example_compressed.py
7682
if [ $? -ne 0 ] ; then
7783
echo "hdf5 compressed mpi test failed!"
7884
exit 1

.github/workflows/build_old.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ jobs:
99
NETCDF_VERSION: 4.7.4
1010
NETCDF_DIR: ${{ github.workspace }}/..
1111
NETCDF_EXTRA_CONFIG: --enable-pnetcdf
12-
CC: mpicc.mpich
12+
#CC: mpicc.mpich
13+
CC: mpicc
1314
#NO_NET: 1
1415
strategy:
1516
matrix:
16-
python-version: ["3.12"]
17+
python-version: ["3.13"]
1718
steps:
1819

1920
- uses: actions/checkout@v4
@@ -28,7 +29,8 @@ jobs:
2829
- name: Install Ubuntu Dependencies
2930
run: |
3031
sudo apt-get update
31-
sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
32+
#sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
33+
sudo apt-get install openmpi-common libopenmpi-dev openmpi-bin libhdf5-openmpi-dev libcurl4-openssl-dev bzip2 libsnappy-dev libblosc-dev libzstd-dev
3234
echo "Download and build PnetCDF version ${PNETCDF_VERSION}"
3335
wget https://parallel-netcdf.github.io/Release/pnetcdf-${PNETCDF_VERSION}.tar.gz
3436
tar -xzf pnetcdf-${PNETCDF_VERSION}.tar.gz
@@ -42,9 +44,11 @@ jobs:
4244
wget https://www.gfd-dennou.org/arch/netcdf/unidata-mirror/netcdf-c-${NETCDF_VERSION}.tar.gz
4345
tar -xzf netcdf-c-${NETCDF_VERSION}.tar.gz
4446
pushd netcdf-c-${NETCDF_VERSION}
45-
export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
47+
#export CPPFLAGS="-I/usr/include/hdf5/mpich -I${NETCDF_DIR}/include"
48+
export CPPFLAGS="-I/usr/include/hdf5/openmpi -I${NETCDF_DIR}/include"
4649
export LDFLAGS="-L${NETCDF_DIR}/lib"
47-
export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
50+
#export LIBS="-lhdf5_mpich_hl -lhdf5_mpich -lm -lz"
51+
export LIBS="-lhdf5_openmpi_hl -lhdf5_openmpi -lm -lz"
4852
./configure --prefix $NETCDF_DIR --enable-netcdf-4 --enable-shared --enable-dap --enable-parallel4 $NETCDF_EXTRA_CONFIG
4953
make -j 2
5054
sudo make install
@@ -75,21 +79,24 @@ jobs:
7579
python run_all.py
7680
# parallel (hdf5 for netcdf4, pnetcdf for netcdf3)
7781
cd ../examples
78-
mpirun.mpich -np 4 python mpi_example.py
82+
#mpirun.mpich -np 4 python mpi_example.py
83+
mpirun -np 4 --oversubscribe python mpi_example.py
7984
if [ $? -ne 0 ] ; then
8085
echo "hdf5 mpi test failed!"
8186
exit 1
8287
else
8388
echo "hdf5 mpi test passed!"
8489
fi
85-
mpirun.mpich -np 4 python mpi_example_compressed.py
90+
#mpirun.mpich -np 4 python mpi_example_compressed.py
91+
mpirun -np 4 --oversubscribe python mpi_example_compressed.py
8692
if [ $? -ne 0 ] ; then
8793
echo "hdf5 compressed mpi test failed!"
8894
exit 1
8995
else
9096
echo "hdf5 compressed mpi test passed!"
9197
fi
92-
mpirun.mpich -np 4 python mpi_example.py NETCDF3_64BIT_DATA
98+
#mpirun.mpich -np 4 python mpi_example.py NETCDF3_64BIT_DATA
99+
mpirun -np 4 --oversubscribe python mpi_example.py NETCDF3_64BIT_DATA
93100
if [ $? -ne 0 ] ; then
94101
echo "pnetcdf mpi test failed!"
95102
exit 1

0 commit comments

Comments
 (0)