-
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
81bd94d
c781676
a952116
8deda1d
bd9a05d
8971e5e
027bb40
df13728
238a878
c11e5df
0a15657
094a3b6
427ade6
7260557
e106beb
7e2def8
f7c3db2
5b77cfa
073e933
8797d3d
29fcc32
48e8979
f6ef93a
901cdc6
e6f7d57
b9d3598
730a90c
c8f5930
4d17512
e5b95fa
6dcad59
a2c729f
3918fba
ae0f60d
be1fc96
fe41946
f9c24e1
4f21372
206a706
c7ada35
47c4405
186c374
b3acc9c
efe2d4d
30aeb06
4cc2f9e
4a3e674
3594f01
2a48741
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
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 | ||
|
|
||
|
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.
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). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,18 +35,32 @@ set -xe | |
|
|
||
| # Make our work dirs | ||
|
|
||
| SRCDIR="${PWD}" | ||
| # Set SRCDIR only if not provided | ||
| if [[ -z "${SRCDIR:-}" ]]; then | ||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| SRCDIR="$(cd "$SCRIPT_DIR/.." && pwd)" | ||
| fi | ||
|
|
||
| TEST_DIR="${TEST_DIR:-${PWD}}" | ||
| cd "${TEST_DIR}" | ||
| # Prepare working directories | ||
| TEST_DIR_WITH_PDI="${TEST_DIR_WITH_PDI:-${PWD}}" | ||
| cd "${TEST_DIR_WITH_PDI}" | ||
| cd "$(mktemp -d pdibuild.XXXXX)" | ||
| TEST_DIR="${PWD}" | ||
| TEST_DIR_ROOT="${PWD}" | ||
|
|
||
| mkdir no_pdi | ||
| cd no_pdi | ||
| TEST_DIR_NO_PDI="${PWD}" | ||
|
|
||
| cd "${TEST_DIR_ROOT}" | ||
| mkdir with_pdi | ||
| cd with_pdi | ||
| TEST_DIR_WITH_PDI="${PWD}" | ||
|
|
||
| cd "${SRCDIR}" | ||
| cd "$(dirname "$0")/.." | ||
| SRCDIR="${PWD}" | ||
| cd "${TEST_DIR_ROOT}" | ||
| mkdir api_pdi | ||
| cd api_pdi | ||
| TEST_DIR_API="${PWD}" | ||
|
|
||
| cd "${TEST_DIR}" | ||
|
|
||
|
|
||
|
|
||
|
|
@@ -122,8 +136,28 @@ fi | |
|
|
||
|
|
||
|
|
||
| # Configure, build & test | ||
| # Configure, build & test for pdi | ||
|
|
||
| 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} | ||
|
|
||
| RELATIVE_NO_PDI_PATH="no-pdi" | ||
| if ldconfig -p | grep -q libparaconf; then | ||
| # Configure, build & test for pdi's example with CMAKE_PREFIX_PATH (find_package) for no-pdi, with Paraconf | ||
|
|
||
| cd "${TEST_DIR_NO_PDI}" | ||
| cmake -DBUILD_FORTRAN=OFF -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/example" | ||
|
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 deactivate fortran, hdf5 and netcdf plugins ? 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. Example's CMakeLists does not use or account for those options, the cmake command here returns a warning of ignored option. |
||
| make ${MAKEFLAGS} | ||
| ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R PDI_example_trace_C | ||
| fi | ||
|
|
||
| # Configure, build & test for no-pdi's specific tests with CMAKE_PREFIX_PATH (find_package), with or without Paraconf | ||
|
|
||
| cd "${TEST_DIR_API}" | ||
| NO_PDI_TESTS="test_api_C test_api_CXX" | ||
| cmake -DBUILD_DECL_HDF5_PLUGIN=OFF -DBUILD_DECL_NETCDF_PLUGIN=OFF -DCMAKE_PREFIX_PATH="${SRCDIR}/${RELATIVE_NO_PDI_PATH}" "${SRCDIR}/tests" | ||
|
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 deactivate dhf5 and netcdf plugins ? 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. Tests' CMakeLists does not use or account for those options, the cmake command here returns a warning of ignored option. |
||
| make ${MAKEFLAGS} | ||
| ctest --output-on-failure --timeout 90 ${CTEST_FLAGS} -R ${NO_PDI_TESTS} | ||
| rm -rf CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile | ||
JAuriac marked this conversation as resolved.
Show resolved
Hide resolved
|
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 CXX) | ||
|
|
||
| include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/PDIConfig.cmake") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| #============================================================================= | ||
| # 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 1.0.0 COMPONENTS C) | ||
|
|
||
| if(paraconf_FOUND) | ||
| add_compile_definitions(PARACONF_FOUND) | ||
| endif() | ||
|
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 ? 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.
I don't see the example being run here. It should, with pdi and no-pdi.
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.
The example is now run with "PDI_example_trace_C" as part of the PDI tests, then on its own for no-PDI.