-
Notifications
You must be signed in to change notification settings - Fork 135
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
ASA core modules #641
base: develop
Are you sure you want to change the base?
ASA core modules #641
Conversation
… into feature/sunadjoint-core-modules
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.
Optional suggestion: use the graphviz extension to generate this
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.
Partway through src
@@ -283,7 +286,7 @@ instead of `SameMajorVersion`. This fixes the issue seen | |||
|
|||
Fixed a CMake bug that caused an MPI linking error for our C++ examples in some | |||
instances. Fixes [GitHub Issue | |||
#464](https://github.com/LLNL/sundials/issues/464). | |||
# 464](https://github.com/LLNL/sundials/issues/464). |
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.
# 464](https://github.com/LLNL/sundials/issues/464). | |
#464](https://github.com/LLNL/sundials/issues/464). |
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.
"indicate checkpoint" -> "indicate a checkpoint"
.. c:enumerator:: SUNDATAIOMODE_INMEM | ||
|
||
The IO mode for data that is stored in addressable random access memory. | ||
The location of the memory (e.g., CPU or GPU) is not specified by this mode. |
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.
.. c:enumerator:: SUNDATAIOMODE_INMEM | |
The IO mode for data that is stored in addressable random access memory. | |
The location of the memory (e.g., CPU or GPU) is not specified by this mode. | |
.. c:enumerator:: SUNDATAIOMODE_INMEM | |
The IO mode for data that is stored in addressable random access memory. | |
The location of the memory (e.g., CPU or GPU) is not specified by this mode. |
states during forward integration and accessing them as needed during the backwards integration | ||
of the adjoint model. | ||
|
||
.. c:enum:: SUNDataIOMode |
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.
.. c:enum:: SUNDataIOMode | |
.. c:enum:: SUNDataIOMode | |
IO modes for storing adjoint checkpoints |
The SUNDIALS simulation context. | ||
|
||
|
||
.. c:type:: struct SUNAdjointCheckpointScheme_Ops_ *SUNAdjointCheckpointScheme_Ops |
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.
.. c:type:: struct SUNAdjointCheckpointScheme_Ops_ *SUNAdjointCheckpointScheme_Ops | |
The virtual table structure is defined as | |
.. c:type:: struct SUNAdjointCheckpointScheme_Ops_ *SUNAdjointCheckpointScheme_Ops |
{ | ||
step_data_node = NULL; | ||
} | ||
else { SUNCheckCall(errcode); } |
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.
Why not have SUNCheckCall
on the call to SUNDataNode_GetNamedChild
?
|
||
SUNErrCode SUNAdjointCheckpointScheme_InsertVector_Fixed( | ||
SUNAdjointCheckpointScheme self, int64_t step_num, | ||
SUNDIALS_MAYBE_UNUSED int64_t stage_num, sunrealtype t, N_Vector y) |
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.
Looks like stage_num
is only used for logging, should it be removed?
stage_num); | ||
errcode = SUNDataNode_GetChild(step_data_node, stage_num, &solution_node); | ||
if (errcode == SUN_ERR_DATANODE_NODENOTFOUND) { solution_node = NULL; } | ||
else { SUNCheckCall(errcode); } |
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.
Why not have SUNCheckCall
on the call to SUNDataNode_GetChild
?
} | ||
|
||
SUNCheckCall(SUNDataNode_HasChildren(step_data_node, &has_children)); | ||
if (!has_children) |
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.
Couldn't this be
} | |
SUNCheckCall(SUNDataNode_HasChildren(step_data_node, &has_children)); | |
if (!has_children) | |
} | |
else |
|
||
SUNCheckCall(SUNDataNode_Destroy(&IMPL_MEMBER(self, root_node))); | ||
|
||
free(GET_CONTENT(self)); |
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 think this is slightly more clear in this case
free(GET_CONTENT(self)); | |
free(self->content); |
This PR adds the core modules that will support adjoint sensitivity analysis in a package-agnostic way.