Skip to content

Commit

Permalink
Merge pull request #1746 from NCAR/ejh_mpi_check
Browse files Browse the repository at this point in the history
added check for MPI
  • Loading branch information
edwardhartnett authored Sep 2, 2020
2 parents c569627 + 286f529 commit 64cdf4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/a4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,4 @@ jobs:
autoreconf -i
./configure --enable-fortran
make -j check
- name: cmake build
run: |
set -x
echo 'export PATH=/home/runner/mpich/bin:$PATH' > .bashrc
source .bashrc
export CC=mpicc
mkdir build
cd build
export LD_LIBRARY_PATH="/home/runner/netcdf-c/lib:/home/runner/pnetcdf/lib:/home/runner/hdf5/lib:/home/runner/mpich/lib:$LD_LIBRARY_PATH"
cmake -Wno-dev -DNetCDF_C_LIBRARY=/home/runner/netcdf-c/lib/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/home/runner/netcdf-c/include -DPnetCDF_PATH='/home/runner/pnetcdf' -DPIO_ENABLE_FORTRAN=Off -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off .. || (cat CMakeFiles/CMakeOutput.log && cat CMakeFiles/CMakeError.log)
cat config.h
make VERBOSE=1
make tests VERBOSE=1
ctest -VV
9 changes: 6 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ fi

AC_MSG_NOTICE([finding libraries])

# Ensure we have MPI.
AC_CHECK_FUNCS([MPI_Init])
if test "x$ac_cv_func_MPI_Init" != "xyes"; then
AC_MSG_ERROR([Can't link to MPI library. MPI is required.])
fi

# Check for netCDF library.
AC_CHECK_LIB([netcdf], [nc_create], [], [AC_MSG_ERROR([Can't find or link to the netcdf library.])])
AC_CHECK_HEADERS([netcdf.h netcdf_meta.h])
Expand Down Expand Up @@ -333,9 +339,6 @@ else
AC_MSG_ERROR([Unable to find type MPI_Offset in mpi.h])
fi

#AC_CHECK_SIZEOF([MPI_Offset], [], [[#include <mpi.h>]])
#AC_DEFINE([SIZEOF_MPI_OFFSET], [8], [netCDF classic library available])

# If we want the timing library, we must find it.
if test "x$enable_timing" = xyes; then
AC_CHECK_HEADERS([gptl.h])
Expand Down

0 comments on commit 64cdf4b

Please sign in to comment.