Bug fixes for netcdf-c cmake build#2384
Conversation
…ind MPI functions when build system is cmake
|
"@when" is not working as expected, will fix together with the style errors. |
|
Reverting to draft while I am still working on this |
…ith intel-oneapi-compilers+intel-oneapi-mpi and gcc+openmpi
…o bugfix/netcdf_c_cmake_build_spack_pkgs
|
@skosukhin @WardF This is ready for your review. I found that the original logic to check if the function exists in CMake was not working reliably. It worked for gcc + openmpi when I included the MPI link libraries as in my original attempt. It didn't work for Intel OneAPI. And I think it wouldn't work for many other MPI providers, because there is no way add an I will give this a test on one of the Cray machines that I have access to, but the caveat is that the machine doesn't use they Cray compiler wrappers in our spack config (it uses the vendor compilers like on non-Cray machines). |
Update. I tested this on a number of machines, including Cray systems with at least two compilers (GNU and Intel LLVM). For each system/compiler/mpi combination the symbols |
|
Pinging the reviewers to take a look at this PR, please. Thanks! |
Pinging all the reviewers once more before asking the spack developers to proceed w/o approval. Thanks very much in advance! |
Explicitly set CMAKE_INSTALL_RPATH_USE_LINK_PATH to TRUE
|
@johnwparent Is there anything I can do to move this PR forward? Thanks! |
Nothing from your end, more a bandwidth issue from my end, will be getting to this shortly! |
Thanks, very much appreciated! |
|
@johnwparent Did you have a chance to look at this? Thank you. |
Otherwise CMake will choke on a Windows escape character if based in the C: drive Signed-off-by: John Parent <john.parent@kitware.com>
Thanks for the ping, resolved by #4293 |
This PR does more/other stuff than #4293. Which part of this PR #2384 is resolved by #4293? |
Sorry, should have been clear, the CI failure I promised to look into is fixed by that PR |
Ahh, that makes sense. I'll wait for #4293 to be merged then. Thanks! |
…o bugfix/netcdf_c_cmake_build_spack_pkgs
…johnwparent/spack-packages into bugfix/netcdf_c_cmake_build_spack_pkgs
|
@johnwparent I pulled in your changes from #4293 and the basic unit tests now pass for Windows. The gitlab-ci tests are still being queued. |
|
@johnwparent What do we need to do to move your PR forward so that I can update this PR and we can review & merge? |
@climbfuji I just need to be able to successfully reproduce the paraview build failure locally. So far no dice. I'll let you know as soon as that's ready |
|
Blocker fix is merged, let's rebase and LGTM |
…o bugfix/netcdf_c_cmake_build_spack_pkgs
Thanks, done! Please take another look. |
|
This error is new, I haven't changed anything, though, just pulled in develop: |
…o bugfix/netcdf_c_cmake_build_spack_pkgs
…o bugfix/netcdf_c_cmake_build_spack_pkgs
Description
This PR fixes two bugs in the netcdf-c cmake build that we identified and fixed in our fork.
ncgenis missing rpaths for hdf5 and won't run - see JCSDA@27bc9e5MPI_Comm_f2cresulting in unsafe cast innc_create_par_fortranUnidata/netcdf-c#3199 for details. The solution adopted here is the same as the suggestion made in CMake can't findMPI_Comm_f2cresulting in unsafe cast innc_create_par_fortranUnidata/netcdf-c#3199, which looks like will make its way into the authoritative codebase soonNote. This patch is admittedly a bit of a hack. But given the overall state of the
netcdf-cCMake build system I believe that this duct-tape solution is good enough. I hope that a overhaul of the entire CMake build for the package will solve this problem in a better way.Testing
Both patches were tested in https://github.com/JCSDA/spack-stack branch
feature/update_to_spack_v1forintel-oneapi-compilers + intel-oneapi-mpiandgcc + openmpi.