Skip to content

[vtk] Add option ENABLE_HDF5_PARALLEL to fit hdf5 feature parallel#24740

Closed
JackBoosY wants to merge 10 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/22892
Closed

[vtk] Add option ENABLE_HDF5_PARALLEL to fit hdf5 feature parallel#24740
JackBoosY wants to merge 10 commits intomicrosoft:masterfrom
JackBoosY:dev/jack/22892

Conversation

@JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented May 17, 2022

After installing hdf5[parallel] first, installing vtk will report configure error:

-- VTK module debug building: VTK::hdf5 is being built
-- Checking for module 'mpi-c'
--   Package 'mpi-c', required by 'virtual:world', not found
-- Checking for module 'mpi-cxx'
--   Package 'mpi-cxx', required by 'virtual:world', not found
CMake Error at ThirdParty/hdf5/CMakeLists.txt:21 (message):
  An external MPI-aware HDF5 requires that VTK be built with MPI support as
  well.

This is caused by vtk calling FindHDF5.cmake and getting HDF5_IS_PARALLEL in it.
Since using hdf5[parallel] needs to enable mpi, and using mpi does not necessarily require hdf5[parallel], add an error message to remind the user. See more details in https://gitlab.kitware.com/vtk/vtk/-/issues/18552.
Add test port vcpkg-ci-vtk to avoid this error message from appearing in CI tests.

Fixes #22892 #24740.

@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support info:internal labels May 17, 2022
LilyWangLL
LilyWangLL previously approved these changes May 17, 2022
Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

IMO this PR is creating a configuration that upstream explicitly considers unsupported. And vcpkg is know to not run any tests, so it creates a completely untested configuration.

@JackBoosY
Copy link
Contributor Author

IMO this PR is creating a configuration that upstream explicitly considers unsupported.

Any link to the upstream?

@JackBoosY
Copy link
Contributor Author

This issue also exists in highfive:

CMake Warning at CMake/HighFiveTargetDeps.cmake:23 (message):
  Parallel HDF5 requested but libhdf5 doesnt support it
Call Stack (most recent call first):
  CMakeLists.txt:71 (include)

@dg0yt
Copy link
Contributor

dg0yt commented May 17, 2022

IMO this PR is creating a configuration that upstream explicitly considers unsupported.

Any link to the upstream?

Isn't it enough that upstream made it a FATAL_ERROR?

@dg0yt
Copy link
Contributor

dg0yt commented May 17, 2022

This issue also exists in highfive:

CMake Warning at CMake/HighFiveTargetDeps.cmake:23 (message):
  Parallel HDF5 requested but libhdf5 doesnt support it

You don't tell us the trigger, but the wording indicates a different, trivial issue.

@JackBoosY
Copy link
Contributor Author

From the upstream reply:
MPI must be turned on when using hdf5[parallel], and hdf5[parallel] does not need to be turned on when turning on mpi.
I think we have two solutions:

  1. Force feature mpi to depend on hdf5[parallel], but this is obviously not what upstream expects.
  2. Report an error when feature parallel is selected for hdf5 and mpi is not selected for vtk.

Copy link

@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.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for vtk have changed but the version was not updated
version: 9.0.3-pv5.9.1#11
old SHA: 277a83c960d3e5cddc283f65f9045b3664d071b7
new SHA: a4b3a0e5be24cb0c2ac714595e5d47e47f4e0139
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • scripts/test_ports/vcpkg-ci-vtk/vcpkg.json

Valid values for the license field can be found in the documentation

Copy link

@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.

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • scripts/test_ports/vcpkg-ci-vtk/vcpkg.json

Valid values for the license field can be found in the documentation

Copy link

@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.

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • scripts/test_ports/vcpkg-ci-vtk/vcpkg.json

Valid values for the license field can be found in the documentation

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Jun 1, 2022

hdf5[parallel]:x64-linux issue: https://gitlab.kitware.com/cmake/cmake/-/issues/23574

@dg0yt
Copy link
Contributor

dg0yt commented Jun 1, 2022

hdf5[parallel]:x64-linux issue: https://gitlab.kitware.com/cmake/cmake/-/issues/23574

I doubt it is a CMake bug. At least not the syntax issue you claim there. We use it everywhere here in vcpkg.

I can reproduce the x64-linux build error. This is from the end of CMakeErrror.log:

FAILED: cmTC_5afa2 
: && /usr/bin/cc -std=c99 -fPIC -Og -ftrapv -fno-common -fmessage-length=0  CMakeFiles/cmTC_5afa2.dir/test_mpi.c.o -o cmTC_5afa2   && :
CMakeFiles/cmTC_5afa2.dir/test_mpi.c.o: In function `main':
test_mpi.c:(.text+0x21): undefined reference to `MPI_Init'
test_mpi.c:(.text+0x26): undefined reference to `MPI_Finalize'
collect2: error: ld returned 1 exit status

AFAIU it lacks -lmpi, but FindMPI.cmake could know it from mpicc -showme:link.

@dg0yt
Copy link
Contributor

dg0yt commented Jun 1, 2022

With --trace-expand, I find this:

/home/kpa/dg0yt/vcpkg/vcpkg/buildtrees/hdf5/src/df5-1_12_1-859faf3d27.clean/config/cmake/ConfigureChecks.cmake(286):  set(0 1 CACHE INTERNAL Have C function maximum decimal precision for C )

Wow, it sets a variable named 0 to 1.
... and now if(NOT WRAPPER_RETURN EQUAL 0) means if(NOT WRAPPER_RETURN EQUAL "1").
(And yes, setting set(0 "0") on top of FindMPI.cmake "fixes" the build. But this can't be the final fix.)

@dg0yt
Copy link
Contributor

dg0yt commented Jun 1, 2022

HDFGroup/hdf5#833

@Neumann-A
Copy link
Contributor

Opened https://gitlab.kitware.com/cmake/cmake/-/issues/23580 since changing the meaning of stuff used for numeric comparisons should be disallowed by the build system.

Copy link

@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.

You have modified or added at least one vcpkg.json where you should check the license field.

Details

If you feel able to do so, please consider adding a "license" field to the following files:

  • scripts/test_ports/vcpkg-ci-vtk/vcpkg.json

Valid values for the license field can be found in the documentation

github-actions[bot]
github-actions bot previously approved these changes Jun 6, 2022
@JackBoosY JackBoosY added the depends:different-pr This PR or Issue depends on a PR which has been filed label Jun 6, 2022
@JackBoosY
Copy link
Contributor Author

vtk:x64-windows regression: related upstream issue: https://gitlab.kitware.com/vtk/vtk/-/issues/18567

@JackBoosY
Copy link
Contributor Author

Only the upstream bug remain.

@JackBoosY JackBoosY added depends:upstream-changes Waiting on a change to the upstream project and removed depends:different-pr This PR or Issue depends on a PR which has been filed labels Jun 16, 2022
@JackBoosY
Copy link
Contributor Author

Draft this PR until the upstream fix this.

@JackBoosY JackBoosY marked this pull request as draft June 29, 2022 02:37
@JackBoosY JackBoosY mentioned this pull request Jul 7, 2022
@JackBoosY
Copy link
Contributor Author

Depends on #25636

@JackBoosY
Copy link
Contributor Author

I think the features of vtk should be distinguished by components, not by dependencies.

Copy link

@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.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

error: checked-in files for vtk have changed but the version was not updated
version: 9.0.3-pv5.9.1#11
old SHA: a4b3a0e5be24cb0c2ac714595e5d47e47f4e0139
new SHA: 1f61c9a6e3896d1b8eba9de5830176a091cebcf1
Did you remember to update the version or port version?
Use --overwrite-version to bypass this check
***No files were updated***

"all": {
"description": "Build all vtk modules",
"dependencies": [
"boost-assign",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Requires by internal dependency xdmf3, which requires by component VTK::xdmf3, VTK::IOXdmf3 and VTK::IOParallelXdmf3.

@LilyWangLL
Copy link
Contributor

Closing this PR since it seems that no progress is being made. Please ping me to reopen if work is still being done.

@LilyWangLL LilyWangLL closed this Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-bug The issue is with a library, which is something the port should already support depends:upstream-changes Waiting on a change to the upstream project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vtk] Build error

4 participants