1818 - ' docs/*'
1919 - ' test/test_installed/*'
2020
21+ env :
22+ OPENMPI_VERSION : 5.0.2
23+
2124jobs :
2225 build :
2326 runs-on : ubuntu-latest
@@ -28,27 +31,55 @@ jobs:
2831 run : |
2932 sudo apt-get update
3033 sudo apt-get install automake autoconf libtool libtool-bin m4
31- # zlib
32- sudo apt-get install zlib1g-dev
33- # mpi
34- sudo apt-get install openmpi-bin openmpi-common libopenmpi-dev libgtk2.0-dev
35- echo "---- location of OpenMPI C compiler ----"
36- which mpicc
34+ # install gfortran
35+ version=12
36+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
37+ sudo apt-get update
38+ sudo apt-get install -y gcc-${version} gfortran-${version}
39+ sudo update-alternatives \
40+ --install /usr/bin/gcc gcc /usr/bin/gcc-${version} 100 \
41+ --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${version} \
42+ --slave /usr/bin/gcov gcov /usr/bin/gcov-${version}
43+ echo "---- gcc/gfortran version ------------------------------"
44+ which gcc
45+ which gfortran
46+ gcc --version
47+ gfortran --version
48+ - name : Build OPENMPI
49+ run : |
50+ cd ${GITHUB_WORKSPACE}
51+ echo "Install OPENMPI ${OPENMPI_VERSION} in ${GITHUB_WORKSPACE}/OPENMPI"
52+ rm -rf OPENMPI ; mkdir OPENMPI ; cd OPENMPI
53+ VER_MAJOR=${OPENMPI_VERSION%.*}
54+ wget -q https://download.open-mpi.org/release/open-mpi/v${VER_MAJOR}/openmpi-${OPENMPI_VERSION}.tar.gz
55+ gzip -dc openmpi-${OPENMPI_VERSION}.tar.gz | tar -xf -
56+ cd openmpi-${OPENMPI_VERSION}
57+ ./configure --prefix=${GITHUB_WORKSPACE}/OPENMPI \
58+ --silent \
59+ --with-io-romio-flags="--with-file-system=ufs" \
60+ CC=gcc \
61+ FC=gfortran \
62+ FFLAGS=-fallow-argument-mismatch \
63+ FCFLAGS=-fallow-argument-mismatch
64+ make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
65+ make -s -j 4 distclean >> qout 2>&1
3766 - name : Build PnetCDF
3867 run : |
3968 cd ${GITHUB_WORKSPACE}
4069 autoreconf -i
41- mkdir -p /dev/shm/pnetcdf_output
42- ./configure --enable-option-checking=fatal \
70+ mkdir -p pnetcdf_output
71+ ./configure --prefix=${GITHUB_WORKSPACE}/PnetCDF \
72+ --enable-option-checking=fatal \
4373 --enable-profiling \
4474 pnc_ac_debug=yes \
4575 --enable-burst_buffering \
4676 --enable-subfiling \
4777 --enable-shared \
4878 --enable-thread-safe \
4979 --with-pthread \
50- TESTMPIRUN="mpiexec --oversubscribe -n NP" \
51- TESTOUTDIR=/dev/shm/pnetcdf_output
80+ --with-mpi=${GITHUB_WORKSPACE}/OPENMPI \
81+ TESTMPIRUN="${GITHUB_WORKSPACE}/OPENMPI/bin/mpiexec --oversubscribe -n NP" \
82+ TESTOUTDIR=${GITHUB_WORKSPACE}/pnetcdf_output
5283 make -j 8 tests
5384 - name : Print config.log
5485 if : ${{ always() }}
@@ -77,11 +108,12 @@ jobs:
77108 - name : make distcheck
78109 run : |
79110 cd ${GITHUB_WORKSPACE}
80- make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent TESTOUTDIR=/dev/shm/pnetcdf_output "
111+ make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-mpi=${GITHUB_WORKSPACE}/OPENMPI "
81112 - name : Cleanup
82113 if : ${{ always() }}
83114 run : |
84115 cd ${GITHUB_WORKSPACE}
85116 make -s distclean
86- rm -rf /dev/shm/pnetcdf_output
117+ rm -rf ${GITHUB_WORKSPACE}/pnetcdf_output
118+ rm -rf ${GITHUB_WORKSPACE}/OPENMPI
87119
0 commit comments