Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hypre test #2431

Merged
merged 17 commits into from
Nov 15, 2021
Merged

Fix hypre test #2431

merged 17 commits into from
Nov 15, 2021

Conversation

jonesholger
Copy link
Collaborator

@jonesholger jonesholger commented Sep 20, 2021

The main purpose of the PR is to fix Hypre Vector Unit Test "Assemble" when linked against Hypre v2.22.0 (Cuda-Compiled)
Hypre v2.22.0 is needed while compiling with CUDA 11.1.1
CUDA 11.1.1 is needed because BOUT introduced recursive lambdas in Options processing.

change your tpl_prefix to tpl_11h to pick up this new version of Hypre

Built/Tested with RAJA off and Umpire off on lassen and Cori-GPU: we are really only exercising Hypre CUDA

Secondarily we have made some CMake changes:

Propagate Warning Flags to the Host Compiler through -Xcompiler when compiling with nvcc

See below for recommended script changes if you have trouble with either FindnetCDF or FindPETSc

@jonesholger
Copy link
Collaborator Author

Also hw3d BOUT.inp needs edits as BOUT will complain that some options are not correct.

@jonesholger jonesholger marked this pull request as draft September 20, 2021 03:53
@jonesholger
Copy link
Collaborator Author

jonesholger commented Sep 20, 2021

to avoid "system" provided netcdf consider the use of BOUT_NETCDF_VERSION (this works for me on Cori)
-DBOUT_NETCDF_VERSION=4.7.4 \

if (BOUT_NETCDF_VERSION)
find_package(netCDF ${BOUT_NETCDF_VERSION} EXACT QUIET CONFIG)
else()
find_package(netCDF QUIET CONFIG)
endif()

with script changes (note netCDF_ROOT is still needed to fully qualify search, since we'll fall thru initial find_package)
-DBOUT_USE_NETCDF=On
-DBOUT_NETCDF_VERSION=4.7.4
-DnetCDF_DEBUG=On
-DnetCDF_ROOT=${module_prefix}/netcdf-c-4.7.4-hpuuuxa5vze5qwvqhdzxlpkrigjghgtu/
-DNCXX4_CONFIG:FILEPATH=${module_prefix}/netcdf-cxx4-4.3.1-ptxvbr5iimq3lcapnzs5tw7heniv7mha/bin/ncxx4-config
-DNC_CONFIG:FILEPATH=${module_prefix}/netcdf-c-4.7.4-hpuuuxa5vze5qwvqhdzxlpkrigjghgtu/bin/nc-config

@jonesholger
Copy link
Collaborator Author

jonesholger commented Sep 20, 2021

PETSc find uses small code to test viability of install but this generates several HDF5 link errors such as
libpetsc.so: undefined reference to `H5Pset_dxpl_mpio' which now require RPATHS to resolve

which I can specify as follows
-DCMAKE_C_FLAGS="-w -Wl,-rpath,${module_prefix}/hdf5-1.10.6-twbl2egvtk5bmvx4bmlvpnugciapg46s/lib -Wl,-rpath,${module_prefix}/petsc-3.13.0-ym7gwgxfutg4m7ap3bz5tbvsitvfq2w2/lib" \

this gets picked up by check_c_source_runs

@jonesholger
Copy link
Collaborator Author

Just a reminder to build serial tests use : cmake --build . -j --target serial_tests

…_package; reverted FindPETSc to full version - change script to add RPATHS to CMAKE_C_FLAGS if you have trouble running mulitpass tests; keep a simple version of FindPETSc
@jonesholger jonesholger marked this pull request as ready for review September 20, 2021 22:13
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@@ -71,8 +72,8 @@ std::size_t CoordinatesAccessor::clear(const Coordinates* coords) {
std::size_t num_removed = coords_store.size();
coords_store.clear();
return num_removed;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: do not use else after return [readability-else-after-return]

} else {
  ^~~~~~

jonesholger and others added 7 commits November 14, 2021 11:00
Squash a Clang tidy warning
invert_laplace and invert_parderiv have declarations which are needed
for GCC & Clang, but cause multiple-definition errors with NVCC.
Keep this test for checks in Github actions
Need to override the cache, ensure that pthreads is disabled.
Fixes segfault (on my laptop anyway)
@bendudson bendudson merged commit ed1aec2 into next-hypre-outerloop-cuda-merged Nov 15, 2021
@ZedThree ZedThree deleted the fix_hypre_test branch November 30, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants