-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
HDF5 does not build with CMake and NAG Fortran compiler and MPI #5168
Comments
Out of curiosity, what compiler did you use to build mpich? What is NAG? We usually recommend using the mpi compile wrappers since they will contain all the necessary links and includes. I don't think we've ever checked enabled parallel with NAG. Can you enable tests and check if all the fortran tests pass with your autotools build? I'm just wondering if it works. |
I used the same compilers to build MPICH as I attempted to use for HDF5. For autotools, I set Just now, I also compiled the tests with autotools, and ran Edit: Discovered I did a mistake in my testing, I will follow up with a new post later. |
A follow-up: Everything works when using the compiler wrappers I tested building HDF5 both with and without MPI, and did a I look forward to version 2.0, and hope the removal of autotools (CMake is so much better...) makes it easier to spend time efficiently on improving the library! |
@hakostra, thank you for following up and testing it. We plan on adding testing with NAG and MPI soon. I'm glad we could help. |
Describe the bug
I have an issue building the HDF5 library with the NAG Fortran compiler
nagfor
. Details on the system is given below.In a
build
-subdirectory, I execute:FC=nagfor cmake -DBUILD_TESTING=OFF -DHDF5_BUILD_FORTRAN=ON -DHDF5_ENABLE_PARALLEL=ON -DHDF5_BUILD_EXAMPLES=OFF ..
, and this fails:So CMake believe the
nagfor
does not work (trust me, it does) and it refuse to continue. The reason nagfor fails is that it is given invalid flags.I have digged a bit around in the CMake lists for HDF5, and in the main
CMakeLists.txt
there is the lines:I believe what happens is that the MPI_C_LINK_FLAGS, which works for
gcc
, is applied to thenagfor
Fortran tests that are executed byinclude (CheckFortranSourceRuns)
, CMake believe the Fortran compiler does not run and stop. As far as I know no Fortran executables are linked by HDF5 and CMAKE_EXE_LINKER_FLAGS is only ever actually used on C executables, so the behavior is not wrong per se, but the resulting outcome is that I'm not able to proceed building HDF5.Expected behavior
On this system, Autotools works and build HDF5 just fine with MPI and Fortran wrappers. When autotools are removed from HDF5 there will be no ways to build Fortran wrappers with the NAG compiler.
Platform (please complete the following information)
Additional context
Ref. issue #5040, issue #5039 and PR #4961
The text was updated successfully, but these errors were encountered: