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

Command-line control over scalar-valued set routines #662

Open
wants to merge 53 commits into
base: develop
Choose a base branch
from

Conversation

drreynolds
Copy link
Collaborator

I'm opening this up as a draft PR to get feedback on the approach before I update the other packages (CVODE, CVODES, IDA, IDAS, KINSOL), and the various class implementations (SUNLinearSolver, SUNAdaptController, SUNNonlinearSolver, etc).

We can discuss this during an upcoming group meeting, if desired. @balos1 and I have scaled back the previous plans to account for the reduced manpower allocated to the task, so we're only focusing on command-line control for now (YAML or other file-based inputs have been deferred).

Copy link
Collaborator

@Steven-Roberts Steven-Roberts left a comment

Choose a reason for hiding this comment

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

I like how clean this is! I'm ok with the public API aside from the handling of boolean settings.

@drreynolds
Copy link
Collaborator Author

I think I've finished revising the previous implementation according to the initial feedback. It would be great if folks who looked at this previously would give it another look. Once you're happy with the structure, I'll get started on the ARKODE stepper-specific functions, other integrators, linear solvers, nonlinear solvers, etc.

drreynolds and others added 2 commits February 27, 2025 12:39
…ber of options in each category.

Co-authored-by: Steven Roberts <roberts115@llnl.gov>
@@ -0,0 +1,148 @@
/* -----------------------------------------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be moved to src/sundials/sundials_cli.h to limit scope? I don't think any of the declarations are used in include.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The functions in this file need to be called by each package (ARKODE, CVODE, etc.), so I emulated the structure as we have for sundials_errors.h -- since it's in include/priv it is accessible to all of SUNDIALS but it is not installed for users to call.

Copy link
Collaborator

Choose a reason for hiding this comment

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

accessible to all of SUNDIALS but it is not installed for users to call.

But it is part of the installed header files (in a subdirectory we hope users ignore).

I would argue that any header for private functions should be in src unless headers in include rely on it. In src, the headers should be just as accessible across the packages. src/sundials/sundials_utils.h is an example of this.

Copy link
Collaborator Author

@drreynolds drreynolds Mar 12, 2025

Choose a reason for hiding this comment

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

I hadn't realized that include/sundials/priv/ was actually installed, and I agree that this would optimally not be accessible to users. @balos1 and @gardner48: can you explain why that folder needs to be installed (as opposed to putting these in src/)?

In any case, I'll move this file when I get around to the next batch of command-line updates.

Copy link
Member

Choose a reason for hiding this comment

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

include/sundials/priv is installed because some header files include function implementations so the "private" error handling functions and macros need to be installed so they're accessible in these functions. If these implementations were made internal then include/sundials/priv could be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants