Skip to content
Open
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
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2937,6 +2937,7 @@ AC_CONFIG_FILES(Makefile \
test/F90/Makefile \
test/burst_buffer/Makefile \
test/cdl/Makefile \
test/Lustre/Makefile \
)

dnl The following dependency is for configure.in and configure
Expand Down
4 changes: 4 additions & 0 deletions sneak_peek.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ This is essentially a placeholder for the next release note ...
See [PR #230](https://github.com/Parallel-NetCDF/PnetCDF/pull/230).

* Bug fixes
+ Fix a divide-by-zero error when opening a file that is striped using the
Lustre Progressive File Layout (PFL). The bug was reported in
[Issue #234](https://github.com/Parallel-NetCDF/PnetCDF/issues/234).
See fix in [PR #236](https://github.com/Parallel-NetCDF/PnetCDF/pull/236).
+ Fix detection of the MPI base compiler names when PrgEnv-cray is loaded,
where cc, CC, and ftn are wrappers of Cray clang and Cray Fortran
compilers.
Expand Down
57 changes: 57 additions & 0 deletions test/Lustre/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Copyright (C) 2026, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#
# @configure_input@

SUFFIXES = .o .c

AM_DEFAULT_SOURCE_EXT = .c

AM_CPPFLAGS =

LDADD =

if DECL_MPI_OFFSET
AM_CPPFLAGS += -DHAVE_DECL_MPI_OFFSET
endif

check_PROGRAMS =

# autimake 1.11.3 has not yet implemented AM_TESTS_ENVIRONMENT
# For newer versions, we can use AM_TESTS_ENVIRONMENT instead
TESTS_ENVIRONMENT = export SED="$(SED)";
TESTS_ENVIRONMENT += export srcdir="$(srcdir)";
TESTS_ENVIRONMENT += export top_builddir="$(top_builddir)";
TESTS_ENVIRONMENT += export TESTOUTDIR="$(FSTYPE_PREFIX)$(TESTOUTDIR)";
TESTS_ENVIRONMENT += export TESTSEQRUN="$(TESTSEQRUN)";
TESTS_ENVIRONMENT += export TESTMPIRUN="$(TESTMPIRUN)";
TESTS_ENVIRONMENT += export check_PROGRAMS="$(check_PROGRAMS)";

TESTS_ENVIRONMENT += export ENABLE_BURST_BUFFER=@ENABLE_BURST_BUFFER@;
TESTS_ENVIRONMENT += export ENABLE_NETCDF4=@ENABLE_NETCDF4@;
TESTS_ENVIRONMENT += export ENABLE_THREAD_SAFE=@ENABLE_THREAD_SAFE@;
TESTS_ENVIRONMENT += export MIMIC_LUSTRE=@MIMIC_LUSTRE@;

# build check targets but not invoke by not setting TESTS
# TESTS = $(check_PROGRAMS)
TEST_EXTENSIONS = .sh
LOG_COMPILER = $(srcdir)/seq_runs.sh
SH_LOG_COMPILER =

check_SCRIPTS = seq_runs.sh parallel_run.sh

EXTRA_DIST = seq_runs.sh parallel_run.sh

CLEANFILES = core core.* *.gcda *.gcno *.gcov gmon.out

../common/libtestutils.la:
set -e; cd ../common && $(MAKE) $(MFLAGS) tests

ptest2 ptest4 ptest6 ptest8 ptest10:

# build check targets but not invoke
tests-local: all $(check_PROGRAMS)

.PHONY: ptest ptests ptest2 ptest4 ptest6 ptest8 ptest10

50 changes: 50 additions & 0 deletions test/Lustre/parallel_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
#
# Copyright (C) 2026, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

# Exit immediately if a command exits with a non-zero status.
set -e

DRY_RUN=no
VERBOSE=no

run_cmd() {
local lineno=${BASH_LINENO[$((${#BASH_LINENO[@]} - 2))]}
if test "x$VERBOSE" = xyes || test "x$DRY_RUN" = xyes ; then
echo "Line $lineno CMD: $MPIRUN $@"
fi
if test "x$DRY_RUN" = xno ; then
$MPIRUN $@
fi
}

MPIRUN=`echo ${TESTMPIRUN} | ${SED} -e "s/NP/$1/g"`
# echo "MPIRUN = ${MPIRUN}"
# echo "check_PROGRAMS=${check_PROGRAMS}"

# prevent user environment setting of PNETCDF_HINTS to interfere
unset PNETCDF_HINTS

if test "x$MIMIC_LUSTRE" != x1 ; then
PNETCDF_HINTS="cb_nodes=2"
fi

for i in ${check_PROGRAMS} ; do

# SECONDS=0
# start_ns=$(date +%s.%4N)

exe_name=`basename $i`

run_cmd ./$i -q -o ${TESTOUTDIR}/${exe_name}.nc

# # echo "Elapsed: $SECONDS seconds"
# end_ns=$(date +%s.%4N)
# # Calculate difference (requires bc for floating point math)
# elapsed_ns=$(echo "$end_ns - $start_ns" | bc)
# echo "Elapsed time: ${elapsed_ns} seconds"

done # check_PROGRAMS

29 changes: 29 additions & 0 deletions test/Lustre/seq_runs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
#
# Copyright (C) 2026, Northwestern University and Argonne National Laboratory
# See COPYRIGHT notice in top-level directory.
#

# Exit immediately if a command exits with a non-zero status.
set -e

DRY_RUN=no
VERBOSE=no

run_cmd() {
local lineno=${BASH_LINENO[$((${#BASH_LINENO[@]} - 2))]}
if test "x$VERBOSE" = xyes || test "x$DRY_RUN" = xyes ; then
echo "Line $lineno CMD: $TESTSEQRUN $@"
fi
if test "x$DRY_RUN" = xno ; then
$TESTSEQRUN $@
fi
}

exe_name=`basename $1`

# prevent user environment setting of PNETCDF_HINTS to interfere
unset PNETCDF_HINTS

run_cmd ./$1 -q -o ${TESTOUTDIR}/${exe_name}.nc

Loading
Loading