Exclude EpetraExt/HDF5 test if EpetraExt_ENABLE_HDF5 is not true (#3484)
Created by: bartlettroscoe
@trilinos/epetraext
Description
The current ATDM Trilinos build sets EpetraExt_ENABLE_HDF5=OFF even though HDF5 is enabled. This test was being unconditionally added incorrectly. With EpetraExt_ENABLE_HDF5=OFF, TriBITS does not add the HDF5 include directories and therefore the test does not build.
This commit corrects the problem by only including this test if EpetraExt_ENABLE_HDF5 is TRUE.
Motivation and Context
This breaks the build in the ATDM-based build Trilinos-atdm-white-ride-cuda-9.2-debug-pt
(see #3484 (closed)) that we are trying to get cleaned up for a Trilinos PR CUDA build (see #2464 (closed)).
How Has This Been Tested?
I tested this locally on 'ride' using:
$ cd ~/Trilinos.base/BUILDS/RIDE/CUDA/ATDM_CUDA_OPT/
. ~/Trilinos.base/Trilinos/cmake/std/atdm/load-env.sh cuda-opt
Hostname 'ride6' matches known ATDM host 'ride' and system 'ride'
ATDM_CONFIG_TRILNOS_DIR = /home/rabartl/Trilinos.base/Trilinos
Setting default compiler and build options for JOB_NAME='cuda-opt'
No KOKKOS_ARCH specified so using system default
Using white/ride compiler stack CUDA to build RELEASE code with Kokkos node type CUDA and KOKKOS_ARCH=Power8,Kepler37
ModuleCmd_Switch.c(215):ERROR:105: Unable to locate a modulefile for 'openmpi/2.1.2/gcc/7.2.0/cuda/9.2.88'
$ rm -r CMake*
$ cmake \
-GNinja \
-DTrilinos_CONFIGURE_OPTIONS_FILE:STRING=cmake/std/atdm/ATDMDevEnvAllPtPackages.cmake \
-DTrilinos_ENABLE_TESTS=ON \
-DTrilinos_ENABLE_EpetraExt=ON
"$@" \
$HOME/Trilinos.base/Trilinos
$ make NP=16 &> make.out
$ bsub -x -Is -q rhel7F -n 16 ctest -j16 &> ctest.out
this built and gave the test results:
100% tests passed, 0 tests failed out of 10
Subproject Time Summary:
EpetraExt = 46.19 sec*proc (10 tests)
Total Test time (real) = 3.47 sec
The PR builds will test to see that this test runs when EpetraExt_ENABLE_HDF5
is not set to OFF
. (Therefore, I will not set AT: AUTOMERGE
because I want to inspect the test results before I merge.)
Checklist
-
My commit messages mention the appropriate GitHub issue numbers. -
All new and existing tests passed.