-
Notifications
You must be signed in to change notification settings - Fork 9
Fix #438, add three PDI deactivation option through CMake #543
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
base: main
Are you sure you want to change the base?
Changes from all commits
99f00ae
e9bdb05
156cd54
e6069e3
bb67cd3
f3f2416
958b8f9
56c0e4c
f41b5fa
8b74e76
c9b777c
1aba98b
3c59a69
1d728ab
1b563a3
e574751
22cdc98
58f2949
d9ab60d
431f0d8
028abff
f445425
f16cbc6
2aa2727
ac49bff
bbeab7f
48b32a5
dbe6931
e983a1f
c14a9fc
4910b2e
47de539
02af6ca
22547b0
2d78dd4
8316e3b
7378025
300fb45
8127fd1
c2a4f48
c70b0d7
509aa9f
0dcd4ab
56f2461
dc209a6
9f4125a
e9ea136
5c968df
11c9ea2
a3efa96
b9581a4
6a7589b
66668bf
3113270
15b4c16
d2d9c36
b6b5ff5
38b7ae6
31050c4
ea20ff5
6d68211
da9c288
61588f6
e1adc8f
1540e42
0a6f503
e49d902
2fd9df1
52eb0c6
85a35f3
1413e6b
1afb5b6
a7d1b48
7ddd06e
f0d8e66
fe80b8f
10077f8
c8c5131
7cff6d1
e46330d
4e5d297
a95da9e
979ce5b
eea8539
0945812
2587c06
395be5d
b8df51e
895b196
7c923a1
3a166d0
81a1294
5177b03
d541053
3e0f2a8
0fbe23c
0903ba8
4a8fbbd
4671f18
5099f08
d1d10d9
2ddea38
50ef0d3
a344e13
7cd09d0
a4dd216
d1fa96c
28e5e9f
dfa2c4a
53ca0e2
b4a0ffa
6656850
414e81c
0d820fb
c3fdb3a
dde8e78
1ae59da
437e4d9
9d3d531
5a7865e
c96f63a
6fe2479
5734392
046af3d
ea1273f
e4dfc1f
726300b
454028b
602bd2c
277ba83
853b68b
8b77f8b
3cdaca4
06452b9
2368539
2b44ba5
1d1fde0
a5fb4bf
2aa9a58
32a5f3f
139f523
b40afb1
1d18d32
909945e
54d6cf3
c23e586
b90fcd2
8002a56
a68ddfb
b21e9bc
fa33ee3
6773295
fc22cf3
2cf8c95
3a7c06a
4fedbd8
522da47
daa7017
3ef949c
0773e51
6a0b48f
ab3d747
be47571
c4ddac6
4f5598e
29b6f6a
0f8d31f
37157f8
d6c1c91
708c9c9
6bdb9b6
f34cdb0
370813c
82a222e
1e171ad
3d9e16d
c512904
bb29d9b
8e6decd
12e45f7
01faac8
b398efb
e700bfa
5d89837
e165c55
ec26672
5a89616
5d8842c
75b3052
063b0c3
e9380ba
6c2af6b
497b872
8b139d6
b31deef
c192dab
069ac76
252f4a2
7b554f2
ad35695
3ed9d85
c905f4d
23c6e1f
12175f9
f7c466f
6e40eef
8816811
e48a682
98c854b
9af74c8
a357171
1c08893
c274f02
39f1595
917377e
aa6e9ab
8ec2586
d8106aa
acf493a
6b21418
1f24f12
817b8d9
f74b935
b87eeca
022102b
a2d0dae
c303700
513501e
922f158
ea775f9
da0a6df
77b5d50
62bbf52
9b9e1ac
5512329
03a6db5
0c3b806
40338f3
2489a27
c40bb13
d264058
5fb8ca5
a0145e8
9cad52f
fb3239f
2e18f18
953da81
0b892a3
122b426
5a743f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,8 @@ each sub-project (including PDI itself) is located in the dedicated sub-project | |
| AUTHORS file. | ||
|
|
||
| Julian Auriac - CEA ([email protected]) | ||
| * fix CI bug where tests.xml file could not be written | ||
| * Add pdi deactivation option | ||
| * Fix CI bug where tests.xml file could not be written | ||
|
|
||
| Julien Bigot - CEA ([email protected]) | ||
| * Maintainer (Dec. 2014 - ...) | ||
|
|
@@ -25,7 +26,7 @@ François-Xavier Mordant - CEA ([email protected]) | |
| * Bug fix, JSON plugin | ||
|
|
||
| Jacques Morice - CEA ([email protected]) | ||
| * fix the directory of hdf5 library for rhel | ||
| * Fix the directory of hdf5 library for rhel | ||
|
|
||
| Thomas Padioleau - CEA ([email protected]) | ||
| * Added macOS CI | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see the example being run here. It should, with pdi and no-pdi.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example is now run with "PDI_example_trace_C" as part of the PDI tests, then on its own for no-PDI.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this is correct. It looks like the example is only run if paraconf is found on the system.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example is already included in the "test PDI" part (so the left column "PDI" is always run).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not what the
Am I wrong ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example is included in test_PDI, there can be no table cell here where "test_PDI" is not together with "example". The test_no_PDI is always only ran with no-pdi, and never pdi, because it's CMAKE_PREFIX_PATH is overwritten. The conditional statement check for an available paraconf without additional inputs or paths given, so if the system has a paraconf, the example is ran with no-pdi. If there is not, the example is not run with no-pdi (but still run with pdi). The original test_PDI and the test_no-pdi are always run, because they must run on every configuration of the CI, so they are in every cell of this table, and this is meant to. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -33,7 +33,7 @@ set -xe | |||||
|
|
||||||
|
|
||||||
|
|
||||||
| # Make our work dirs | ||||||
| # Make work directories | ||||||
|
|
||||||
| SRCDIR="${PWD}" | ||||||
|
|
||||||
|
|
@@ -42,12 +42,19 @@ cd "${TEST_DIR}" | |||||
| cd "$(mktemp -d pdibuild.XXXXX)" | ||||||
| TEST_DIR="${PWD}" | ||||||
|
|
||||||
| TEST_DIR_WITH_PDI="${TEST_DIR}/with_pdi" | ||||||
| mkdir "${TEST_DIR_WITH_PDI}" | ||||||
|
|
||||||
| TEST_DIR_NO_PDI="${TEST_DIR}/no_pdi" | ||||||
| mkdir "${TEST_DIR_NO_PDI}" | ||||||
|
|
||||||
| TEST_DIR_API="${TEST_DIR}/api" | ||||||
| mkdir "${TEST_DIR_API}" | ||||||
|
|
||||||
| cd "${SRCDIR}" | ||||||
| cd "$(dirname "$0")/.." | ||||||
| SRCDIR="${PWD}" | ||||||
|
|
||||||
| cd "${TEST_DIR}" | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| # Gather options | ||||||
|
|
@@ -122,8 +129,26 @@ fi | |||||
|
|
||||||
|
|
||||||
|
|
||||||
| # Configure, build & test | ||||||
| # Configure, build & test for pdi, including example and test_api | ||||||
|
|
||||||
| cd "${TEST_DIR_WITH_PDI}" | ||||||
| cmake -DDIST_PROFILE=Devel ${CMAKE_FLAGS} "${SRCDIR}" | ||||||
| make ${MAKEFLAGS} | ||||||
| ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} | ||||||
| ctest --output-on-failure --timeout 90 --output-junit /tmp/tests_pdi.xml ${EXCLUDED_PDI_TESTS:+-E $EXCLUDED_PDI_TESTS} | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please do not remove I am also not convinced about the fixed path for junit output. Maybe:
Suggested change
|
||||||
|
|
||||||
| # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, only with Paraconf | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| if [[ "x${PDI_LIBS}" = "xprovided" ]]; then | ||||||
|
|
||||||
| cd "${TEST_DIR_NO_PDI}" | ||||||
| cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/example" | ||||||
| make ${MAKEFLAGS} | ||||||
| ctest --output-on-failure --timeout 90 --output-junit /tmp/tests_no-pdi_example.xml -R PDI_example_trace_C | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why only run |
||||||
| fi | ||||||
|
|
||||||
| # Configure, build & test for pdi's API specific tests with CMAKE_PREFIX_PATH (find_package) for no-pdi, with or without Paraconf | ||||||
|
|
||||||
| cd "${TEST_DIR_API}" | ||||||
| cmake -DCMAKE_PREFIX_PATH="${SRCDIR}/no-pdi" "${SRCDIR}/test_api" | ||||||
| make ${MAKEFLAGS} | ||||||
| ctest --output-on-failure --timeout 90 --output-junit /tmp/tests_no-pdi_api.xml | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
JAuriac marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,3 +117,10 @@ Above instruction will share `iter` and `main_field`, call `newiter` event and t | |
| This is the place when plugins will read/write our data. | ||
|
|
||
| We have covered the logic behind the %PDI example. Now you can start the \ref Hands_on. | ||
|
|
||
| ## PDI deactivation {#pdi_deactivation} | ||
|
|
||
| Use `no-pdi` instead of `pdi` when building with: | ||
| ```bash | ||
| cmake -DCMAKE_MODULE_PATH=<ABSOLUTE_PATH_TO>/no-pdi .. | ||
| ``` | ||
|
Comment on lines
+120
to
+126
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this is really specific to the example and should be mentioned here, but why not |
||
JAuriac marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #============================================================================= | ||
| # Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) | ||
| # | ||
| # All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions are met: | ||
| # * Redistributions of source code must retain the above copyright notice, | ||
| # this list of conditions and the following disclaimer. | ||
| # * Redistributions in binary form must reproduce the above copyright notice, | ||
| # this list of conditions and the following disclaimer in the documentation | ||
| # and/or other materials provided with the distribution. | ||
| # * Neither the names of CEA, nor the names of the contributors may be used to | ||
| # endorse or promote products derived from this software without specific | ||
| # prior written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| # POSSIBILITY OF SUCH DAMAGE. | ||
| #============================================================================= | ||
|
|
||
| cmake_minimum_required(VERSION 3.16...3.29) | ||
| project(PDI LANGUAGES C) | ||
|
|
||
| include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, we'd want an error message if any component but the basic one is requested, as they are not supported |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #============================================================================= | ||
| # Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) | ||
| # | ||
| # All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions are met: | ||
| # * Redistributions of source code must retain the above copyright notice, | ||
| # this list of conditions and the following disclaimer. | ||
| # * Redistributions in binary form must reproduce the above copyright notice, | ||
| # this list of conditions and the following disclaimer in the documentation | ||
| # and/or other materials provided with the distribution. | ||
| # * Neither the names of CEA, nor the names of the contributors may be used to | ||
| # endorse or promote products derived from this software without specific | ||
| # prior written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| # POSSIBILITY OF SUCH DAMAGE. | ||
| #============================================================================= | ||
|
|
||
| add_library(PDI_C INTERFACE) | ||
| add_library(PDI::pdi ALIAS PDI_C) | ||
| add_library(PDI::PDI_C ALIAS PDI_C) | ||
|
|
||
| set_target_properties(PDI_C PROPERTIES | ||
| INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include" | ||
| ) | ||
JAuriac marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| find_package(paraconf QUIET COMPONENTS C) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a big fan of this automatic behaviour change... but OK |
||
|
|
||
| if(paraconf_FOUND) | ||
| target_link_libraries(PDI_C INTERFACE paraconf::paraconf) | ||
| target_compile_definitions(PDI_C INTERFACE PARACONF_FOUND) | ||
| endif() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this in this PR ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to me that it is for the purpose of ensuring a manual update of no-pdi, mentioned in the pull_request_template.md. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #============================================================================= | ||
| # Copyright (C) 2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) | ||
| # | ||
| # All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions are met: | ||
| # * Redistributions of source code must retain the above copyright notice, | ||
| # this list of conditions and the following disclaimer. | ||
| # * Redistributions in binary form must reproduce the above copyright notice, | ||
| # this list of conditions and the following disclaimer in the documentation | ||
| # and/or other materials provided with the distribution. | ||
| # * Neither the names of CEA, nor the names of the contributors may be used to | ||
| # endorse or promote products derived from this software without specific | ||
| # prior written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| # POSSIBILITY OF SUCH DAMAGE. | ||
| #============================================================================= | ||
|
|
||
| set(PDI_VERSION "1.9.2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.