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

Fail CMake on Windows when sub-filing VFD is enabled #3636

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,9 @@ set (HDF5_SRC_INCLUDE_DIRS
)
option (HDF5_ENABLE_SUBFILING_VFD "Build Parallel HDF5 Subfiling VFD" OFF)
if (HDF5_ENABLE_SUBFILING_VFD)
if (WIN32)
Copy link
Contributor

Choose a reason for hiding this comment

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

No this is not right, there is already a check:
-- Looking for stdatomic.h - not found
CMake Error at CMakeLists.txt:749 (message):
Subfiling VFD requires atomic operations support. C11 stdatomic.h NOT
available.

This should disable subfiling.

Copy link
Contributor

Choose a reason for hiding this comment

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

Intel MPI does support atomic, but not posix. Currently, subfiling does not work with windows. See https://jira.hdfgroup.org/browse/OESS-388

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why this check is necessary - because the stdatomic.h check will fail on windows. Right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand why this check is necessary - because the stdatomic.h check will fail on windows. Right?

https://devblogs.microsoft.com/cppblog/c11-atomics-in-visual-studio-2022-version-17-5-preview-2/

message (FATAL_ERROR " **** Subfiling is not supported on Windows **** ")
endif ()
if (NOT HDF5_ENABLE_PARALLEL)
message (FATAL_ERROR "Subfiling VFD requires a parallel HDF5 build")
else ()
Expand All @@ -731,7 +734,7 @@ if (HDF5_ENABLE_SUBFILING_VFD)
if (NOT H5_HAVE_MPI_Comm_split_type)
message (FATAL_ERROR "Subfiling VFD requires MPI-3 support for MPI_Comm_split_type")
endif ()
endif()
endif ()

if (NOT DEFINED Threads_FOUND)
set (THREADS_PREFER_PTHREAD_FLAG ON)
Expand Down
Loading