Skip to content
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
33 changes: 22 additions & 11 deletions .github/workflows/check-linux-mpi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ jobs:
matrix:
config:
- {os: ubuntu-latest, r: 'release', mpi: 'openmpi'}
- {os: ubuntu-22.04, r: 'release', mpi: 'mpich'}
- {os: ubuntu-latest, r: 'release', mpi: 'mpich'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
path: RNetCDF

- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
repository: Unidata/netcdf-c
path: netcdf-c
Expand All @@ -46,8 +46,8 @@ jobs:
- name: Install system dependencies
run: |
case "${{ matrix.config.mpi }}" in
openmpi) sudo apt-get install -y libhdf5-openmpi-dev openmpi-bin ;;
mpich) sudo apt-get install -y libhdf5-mpich-dev mpich ;;
openmpi) sudo apt-get install -y libhdf5-openmpi-dev openmpi-bin libxml2-dev ;;
mpich) sudo apt-get install -y libhdf5-mpich-dev mpich libxml2-dev ;;
*) echo "Unknown MPI variant"; exit 1 ;;
esac
shell: bash
Expand All @@ -60,7 +60,8 @@ jobs:
echo ::endgroup::
echo ::group::configure
inc_path="/usr/include/hdf5/${{ matrix.config.mpi }}"
lib_path="/usr/lib/x86_64-linux-gnu/hdf5/${{ matrix.config.mpi }}"
arch=$( uname -m )
lib_path="/usr/lib/${arch}-linux-gnu/hdf5/${{ matrix.config.mpi }}"
./configure CC="mpicc.${{ matrix.config.mpi }}" \
CPPFLAGS="-I${inc_path}" \
LDFLAGS="-L${lib_path} -Wl,-rpath=${lib_path}"
Expand All @@ -78,16 +79,24 @@ jobs:
cat("::group::bit64\n")
install.packages("bit64")
cat("::endgroup::\n")
arch <- Sys.info()["machine"]
if ("${{ matrix.config.mpi }}" == "openmpi") {
Rmpi_type <- "OPENMPI"
pbdMPI_type <- "OPENMPI"
mpi_include <- "/usr/lib/x86_64-linux-gnu/openmpi/include"
mpi_lib <- "/usr/lib/x86_64-linux-gnu/openmpi/lib"
mpi_include <- sprintf("/usr/lib/%s-linux-gnu/openmpi/include", arch)
mpi_lib <- sprintf("/usr/lib/%s-linux-gnu/openmpi/lib", arch)
} else if ("${{ matrix.config.mpi }}" == "mpich") {
Rmpi_type <- "MPICH2"
pbdMPI_type <- "MPICH3"
mpi_include <- "/usr/include/x86_64-linux-gnu/mpich"
mpi_lib <- "/usr/lib/x86_64-linux-gnu"
mpi_include <- sprintf("/usr/include/%s-linux-gnu/mpich", arch)
# Workaround missing libopa and libmpl in recent mpich packages:
mpi_lib_real <- sprintf("/usr/lib/%s-linux-gnu/mpich/lib", arch)
mpi_lib <- file.path(getwd(), "mpich")
dir.create(mpi_lib)
for (destlib in c("libmpich.so", "libopa.so", "libmpl.so")) {
file.symlink(file.path(mpi_lib_real, "libmpich.so"),
file.path(mpi_lib, destlib))
}
} else {
stop("Unknown MPI variant")
}
Expand Down Expand Up @@ -118,6 +127,8 @@ jobs:
Rscript -e "library(Rmpi); library(pbdMPI);"
mpicc="mpicc.${{ matrix.config.mpi }}"
mpiexec="mpiexec.${{ matrix.config.mpi }}"
export LD_LIBRARY_PATH="$PWD/mpich:$LD_LIBRARY_PATH"
echo "LD_LIBRARY_PATH='$LD_LIBRARY_PATH'"
R CMD check --no-manual \
--install-args="--configure-args='--with-cc=$mpicc --with-mpiexec=$mpiexec'" \
RNetCDF_*.*-*.tar.gz
Expand All @@ -126,7 +137,7 @@ jobs:

- name: Upload check directory
if: success() || failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.config.os }}_r-${{ matrix.config.r }}_${{ matrix.config.mpi }}
path: RNetCDF.Rcheck/
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: RNetCDF
Version: 2.11-1
Date: 2025-04-30
Version: 2.11-2
Date: 2026-07-19
Title: Interface to 'NetCDF' Datasets
Authors@R: c(person("Pavel", "Michna", role = "aut",
email = "rnetcdf-devel@bluewin.ch"),
Expand Down
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ R CMD INSTALL Example

R CMD INSTALL --configure-args="CPPFLAGS=-I/sw/include \
LDFLAGS=-L/sw/lib LIBS=-lhdf5 --with-cc=mpicc --with-mpiexec=mpiexec" \
RNetCDF_2.11-1.tar.gz
RNetCDF_2.11-2.tar.gz


LD_LIBRARY_PATH
Expand Down Expand Up @@ -126,7 +126,7 @@ R CMD check Example
===================

R CMD check --install-args="--configure-args='CPPFLAGS=-I/sw/include \
LDFLAGS=-L/sw/lib'" RNetCDF_2.11-1.tar.gz
LDFLAGS=-L/sw/lib'" RNetCDF_2.11-2.tar.gz


Time units
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RNetCDF
=======

All files except those indicated later are
Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
They are licensed under the terms of the GNU General Public License:

This program is free software; you can redistribute it and/or modify
Expand Down
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 2.11-2, 2026-07-19
* Fix compiler warning for C23 standard on Fedora 44

Version 2.11-1, 2025-04-30
* Do not use nc-config compiler by default
* Use new R API functions for environments
Expand Down
2 changes: 1 addition & 1 deletion R/RNetCDF.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
# Milton Woods (miltonjwoods@gmail.com)
#
# Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
# Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
#
#===============================================================================
#
Expand Down
2 changes: 1 addition & 1 deletion R/config.R.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
# Milton Woods (miltonjwoods@gmail.com)
#
# Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
# Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
#
#===============================================================================
#
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for RNetCDF 2.11-1.
# Generated by GNU Autoconf 2.72 for RNetCDF 2.11-2.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
Expand Down Expand Up @@ -601,8 +601,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='RNetCDF'
PACKAGE_TARNAME='rnetcdf'
PACKAGE_VERSION='2.11-1'
PACKAGE_STRING='RNetCDF 2.11-1'
PACKAGE_VERSION='2.11-2'
PACKAGE_STRING='RNetCDF 2.11-2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
'configure' configures RNetCDF 2.11-1 to adapt to many kinds of systems.
'configure' configures RNetCDF 2.11-2 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1321,7 +1321,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of RNetCDF 2.11-1:";;
short | recursive ) echo "Configuration of RNetCDF 2.11-2:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1412,7 +1412,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
RNetCDF configure 2.11-1
RNetCDF configure 2.11-2
generated by GNU Autoconf 2.72

Copyright (C) 2023 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1929,7 +1929,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by RNetCDF $as_me 2.11-1, which was
It was created by RNetCDF $as_me 2.11-2, which was
generated by GNU Autoconf 2.72. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -7542,7 +7542,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by RNetCDF $as_me 2.11-1, which was
This file was extended by RNetCDF $as_me 2.11-2, which was
generated by GNU Autoconf 2.72. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -7606,7 +7606,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
RNetCDF config.status 2.11-1
RNetCDF config.status 2.11-2
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Initialize #
#-------------------------------------------------------------------------------#

AC_INIT([RNetCDF],[2.11-1])
AC_INIT([RNetCDF],[2.11-2])

: ${R_HOME=`R RHOME`}
AS_IF([test -z "${R_HOME}"],
Expand Down
4 changes: 2 additions & 2 deletions src/RNetCDF.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: RNetCDF.h
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: Declare RNetCDF functions callable from R
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
4 changes: 2 additions & 2 deletions src/attribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: attribute.c
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: NetCDF attribute functions for RNetCDF
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
6 changes: 3 additions & 3 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: common.c
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: Common definitions for RNetCDF functions
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down Expand Up @@ -64,7 +64,7 @@ R_nc_strcmp (SEXP var, const char *str)
size_t
R_nc_strnlen (const char *str, char chr, size_t maxlen)
{
char *nullchr;
const char *nullchr;
nullchr = memchr(str, (int) chr, maxlen);
return (nullchr == NULL) ? maxlen : ((size_t) (nullchr - str));
}
Expand Down
4 changes: 2 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: common.h
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: Common definitions for RNetCDF functions
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
4 changes: 2 additions & 2 deletions src/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*
* Name: convert.c
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: Type conversions for RNetCDF
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
4 changes: 2 additions & 2 deletions src/convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: convert.h
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: Type conversions for RNetCDF
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
4 changes: 2 additions & 2 deletions src/dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: dataset.c
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: NetCDF dataset functions for RNetCDF
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
4 changes: 2 additions & 2 deletions src/dimension.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: dimension.c
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: NetCDF dimension functions for RNetCDF
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
4 changes: 2 additions & 2 deletions src/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
*
* Name: group.c
*
* Version: 2.11-1
* Version: 2.11-2
*
* Purpose: NetCDF group functions for RNetCDF.
*
* Author: Pavel Michna (rnetcdf-devel@bluewin.ch)
* Milton Woods (miltonjwoods@gmail.com)
*
* Copyright (C) 2004-2025 Pavel Michna and Milton Woods.
* Copyright (C) 2004-2026 Pavel Michna and Milton Woods.
*
*=============================================================================*
*
Expand Down
Loading
Loading