Skip to content

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Jul 10, 2024

This was initially prototyped in PIConGPU, search for "extended format for JSON options" on this documentation page.

This moves that functionality over into openPMD.
Look at the diff on examples/13_write_dynamic_configuration.cpp for an example use case.
Bringing this to openPMD makes this functionality available in codes other than PIConGPU, and makes it available from TOML as well as from JSON.

TODO:

@franzpoeschel franzpoeschel added the api: new additions to the API label Jul 10, 2024
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch 2 times, most recently from 3d5b70a to 37d57ab Compare July 10, 2024 11:23
and is interpreted as a regular expression against which the dataset name
(full path or path within an iteration) must match.)END";
auto throw_up = [&](std::string const &additional_info,
auto &&...additional_path) {

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable additional_path is not used.
and is interpreted as a regular expression against which the dataset name
(full path or path within an iteration) must match.)END";
auto throw_up = [&](std::string const &additional_info,
auto &&...additional_path) {

Check notice

Code scanning / CodeQL

Unused static variable Note

Static variable additional_path is never read.
and is interpreted as a regular expression against which the dataset name
(full path or path within an iteration) must match.)END";
auto throw_up = [&](std::string const &additional_info,
auto &&...additional_path) {

Check notice

Code scanning / CodeQL

Declaration hides parameter Note

Local variable 'additional_path' hides a
parameter of the same name
.

namespace
{
auto readPattern(

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 101 lines.
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch 4 times, most recently from c95a953 to 68dc005 Compare July 16, 2024 11:12
std::string merge_impl(
std::string const &defaultValue,
std::string const &overwrite,
MPI_Comm_t &&...comm)

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable comm is not used.
std::string merge_impl(
std::string const &defaultValue,
std::string const &overwrite,
MPI_Comm_t &&...comm)

Check notice

Code scanning / CodeQL

Unused static variable Note

Static variable comm is never read.
@ax3l ax3l modified the milestones: 0.16.0, 0.17.0 Jul 16, 2024
@ax3l ax3l self-requested a review July 16, 2024 17:23
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch 2 times, most recently from c0f942e to fb7a28e Compare July 19, 2024 09:39
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch from fb7a28e to 5f77a13 Compare August 5, 2024 09:30
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch from 5f77a13 to 64b006d Compare October 1, 2024 13:38
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch from 64b006d to 8852258 Compare October 29, 2024 08:19
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch from 8852258 to a162e8d Compare November 15, 2024 15:01
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch 2 times, most recently from 7dda24d to 83e436c Compare December 17, 2024 11:19
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch 2 times, most recently from bdc319f to 0650789 Compare February 12, 2025 13:17
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch 2 times, most recently from 6b2b5ee to 71536e6 Compare February 18, 2025 18:09
@ax3l ax3l self-assigned this Feb 18, 2025
@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch from 71536e6 to 5e87f47 Compare February 20, 2025 18:16

using position_t = double;

#if !__NVCOMPILER // see https://github.com/ToruNiina/toml11/issues/205
Copy link
Member

@ax3l ax3l Mar 20, 2025

Choose a reason for hiding this comment

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

Do you want to filter by NVHPC version, since the issue is fixed in newer releases?
ToruNiina/toml11#205 (comment)

Also, I think you meant to write

Suggested change
#if !__NVCOMPILER // see https://github.com/ToruNiina/toml11/issues/205
#if !defined(__NVCOMPILER) // see https://github.com/ToruNiina/toml11/issues/205

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll replace it with the macro used in src/config.cpp:

#if !defined(__NVCOMPILER_MAJOR__) || __NVCOMPILER_MAJOR__ >= 23

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

LGTM - thank you! 🎉

Please review the changes to docs I made.
Please see last inline comment on NVHPC.

@franzpoeschel franzpoeschel force-pushed the dataset-specific-config branch from 3167802 to 5e1e176 Compare March 25, 2025 17:18
@franzpoeschel franzpoeschel enabled auto-merge (squash) March 25, 2025 17:18
@franzpoeschel franzpoeschel merged commit 12e1bb6 into openPMD:dev Mar 25, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: new additions to the API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants