Skip to content

Commit

Permalink
Remove examples that have been moved to HDF5Examples folder (#3917)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Jan 3, 2024
1 parent 8f1a93f commit 772276e
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 3,489 deletions.
File renamed without changes.
24 changes: 19 additions & 5 deletions HDF5Examples/CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## # The following are required to use Dart and the CDash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")
set (CTEST_PROJECT_NAME "HDF5Examples")
set (CTEST_NIGHTLY_START_TIME "18:00:00 CST")

set (CTEST_DROP_METHOD "https")
if (CDASH_LOCAL)
set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org")
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Examples")
if (CTEST_DROP_SITE_INIT)
set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}")
else ()
set (CTEST_DROP_SITE "cdash.hdfgroup.org")
endif ()
if (CTEST_DROP_LOCATION_INIT)
set (CTEST_DROP_LOCATION "${CTEST_DROP_LOCATION_INIT}")
else ()
set (CTEST_DROP_LOCATION "/submit.php?project=HDF5Examples")
endif ()
set (CTEST_DROP_SITE_CDASH TRUE)
Expand Down
42 changes: 0 additions & 42 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,8 @@ set (examples
h5_elink_unix2win
h5_shared_mesg
h5_debug_trace
h5_vds
h5_vds-exc
h5_vds-exclim
h5_vds-eiger
h5_vds-simpleIO
h5_vds-percival
h5_vds-percival-unlim
h5_vds-percival-unlim-maxmin
)

if (H5_HAVE_PARALLEL)
set (parallel_examples
ph5example
ph5_filtered_writes
ph5_filtered_writes_no_sel
)

if (HDF5_ENABLE_SUBFILING_VFD)
list (APPEND parallel_examples ph5_subfiling)
endif ()
endif ()

foreach (example ${examples})
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
target_include_directories (${example} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
Expand All @@ -74,28 +54,6 @@ foreach (example ${examples})
endif ()
endforeach ()

if (H5_HAVE_PARALLEL)
foreach (parallel_example ${parallel_examples})
add_executable (${parallel_example} ${HDF5_EXAMPLES_SOURCE_DIR}/${parallel_example}.c)
target_include_directories (${parallel_example} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${parallel_example} STATIC)
target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIB_TARGET} MPI::MPI_C)
else ()
TARGET_C_PROPERTIES (${parallel_example} SHARED)
target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIBSH_TARGET} MPI::MPI_C)
endif ()
set_target_properties (${parallel_example} PROPERTIES FOLDER examples)

#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_EXAMPLES_${parallel_example}_FORMAT ${parallel_example})
endif ()
endforeach ()
endif ()

if (BUILD_TESTING AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
43 changes: 0 additions & 43 deletions examples/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ set (test_ex_CLEANFILES
group.h5
groups.h5
hard_link.h5
h5_subfiling_default_example.h5
h5_subfiling_custom_example.h5
mount1.h5
mount2.h5
one_index_file.h5
Expand All @@ -54,19 +52,6 @@ set (test_ex_CLEANFILES
blue/prefix_target.h5
red/prefix_target.h5
u2w/u2w_target.h5
vds.h5
vds-exc.h5
vds-excalibur.h5
vds-exclim.h5
vds-percival.h5
vds-percival-unlim.h5
vds-percival-unlim-maxmin.h5
a.h5
b.h5
c.h5
d.h5
vds-simpleIO.h5
vds-eiger.h5
)

if (HDF5_TEST_SERIAL)
Expand Down Expand Up @@ -110,31 +95,3 @@ if (HDF5_TEST_SERIAL)
set (last_test "EXAMPLES-${example}")
endforeach ()
endif ()

### Windows pops up a modal permission dialog on this test
if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND NOT WIN32)
# Ensure that 24 is a multiple of the number of processes.
# The number 24 corresponds to SPACE1_DIM1 and SPACE1_DIM2 defined in ph5example.c
math(EXPR NUMPROCS "24 / ((24 + ${MPIEXEC_MAX_NUMPROCS} - 1) / ${MPIEXEC_MAX_NUMPROCS})")

foreach (parallel_example ${parallel_examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME MPI_TEST_EXAMPLES-${parallel_example} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:${parallel_example}> ${MPIEXEC_POSTFLAGS})
else ()
add_test (NAME MPI_TEST_EXAMPLES-${parallel_example} COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=${MPIEXEC_EXECUTABLE}"
-D "TEST_ARGS:STRING=${MPIEXEC_NUMPROC_FLAG};${NUMPROCS};${MPIEXEC_PREFLAGS};$<TARGET_FILE:${parallel_example}>;${MPIEXEC_POSTFLAGS}"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=${parallel_example}.out"
-D "TEST_REFERENCE:STRING=PHDF5 example finished with no errors"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_DIR}/grepTest.cmake"
)
endif ()
if (last_test)
set_tests_properties (MPI_TEST_EXAMPLES-${parallel_example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "MPI_TEST_EXAMPLES-${parallel_example}")
endforeach ()
endif ()
33 changes: 2 additions & 31 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@

include $(top_srcdir)/config/commence.am

if BUILD_PARALLEL_CONDITIONAL
EXAMPLE_PROG_PARA = ph5example ph5_filtered_writes ph5_filtered_writes_no_sel

if SUBFILING_VFD_CONDITIONAL
EXAMPLE_PROG_PARA += ph5_subfiling
endif

endif

INSTALL_SCRIPT_FILES = run-c-ex.sh
INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
INSTALL_TOP_FILES = README
Expand All @@ -40,9 +31,7 @@ EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
h5_crtatt h5_crtgrp h5_crtdat \
h5_group h5_select h5_attribute h5_mount h5_drivers \
h5_reference_deprec h5_ref_extern h5_ref_compat h5_ref2reg_deprec \
h5_extlink h5_elink_unix2win h5_shared_mesg h5_debug_trace \
h5_vds h5_vds-exc h5_vds-exclim h5_vds-eiger h5_vds-simpleIO \
h5_vds-percival h5_vds-percival-unlim h5_vds-percival-unlim-maxmin
h5_extlink h5_elink_unix2win h5_shared_mesg h5_debug_trace
TEST_SCRIPT=testh5cc.sh
TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)

Expand All @@ -53,13 +42,7 @@ INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c h5_compou
h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
h5_group.c h5_select.c h5_attribute.c h5_mount.c h5_drivers.c \
h5_reference_deprec.c h5_ref_extern.c h5_ref_compat.c h5_ref2reg_deprec.c \
h5_extlink.c h5_elink_unix2win.c h5_shared_mesg.c h5_debug_trace.c \
ph5example.c ph5_filtered_writes.c ph5_filtered_writes_no_sel.c \
ph5_subfiling.c h5_vds.c h5_vds-exc.c h5_vds-exclim.c h5_vds-eiger.c \
h5_vds-simpleIO.c h5_vds-percival.c h5_vds-percival-unlim.c \
h5_vds-percival-unlim-maxmin.c


h5_extlink.c h5_elink_unix2win.c h5_shared_mesg.c h5_debug_trace.c

# How to build examples, using installed version of h5cc
if BUILD_PARALLEL_CONDITIONAL
Expand Down Expand Up @@ -123,22 +106,10 @@ h5_ref_extern: $(srcdir)/h5_ref_extern.c
h5_reference_deprec: $(srcdir)/h5_reference_deprec.c
h5_ref2reg_deprec: $(srcdir)/h5_ref2reg_deprec.c
h5_drivers: $(srcdir)/h5_drivers.c
ph5example: $(srcdir)/ph5example.c
ph5_filtered_writes: $(srcdir)/ph5_filtered_writes.c
ph5_filtered_writes_no_sel: $(srcdir)/ph5_filtered_writes_no_sel.c
ph5_subfiling: $(srcdir)/ph5_subfiling.c
h5_dtransform: $(srcdir)/h5_dtransform.c
h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS)
h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS)
h5_shared_mesg: $(srcdir)/h5_shared_mesg.c
h5_vds: $(srcdir)/h5_vds.c
h5_vds-exc: $(srcdir)/h5_vds-exc.c
h5_vds-exclim: $(srcdir)/h5_vds-exclim.c
h5_vds-eiger: $(srcdir)/h5_vds-eiger.c
h5_vds-simpleIO: $(srcdir)/h5_vds-simpleIO.c
h5_vds-percival: $(srcdir)/h5_vds-percival.c
h5_vds-percival-unlim: $(srcdir)/h5_vds-percival-unlim.c
h5_vds-percival-unlim-maxmin: $(srcdir)/h5_vds-percival-unlim-maxmin.c

if BUILD_SHARED_SZIP_CONDITIONAL
LD_LIBRARY_PATH=$(LL_PATH)
Expand Down
Loading

0 comments on commit 772276e

Please sign in to comment.