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

rsat fixes (2nd attempt) #38

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Conversation

juanlucasrey
Copy link
Contributor

Hi Max, I recently compiled CoDiPack with an rsat checker and had to change these 3 places to make it work.

for include/codi/tapes/commonTapeImplementation.hpp I get the error:
error: both branches of 'if' statement marked as 'unlikely' [-Werror=attributes]
394 | #define CODI_Unlikely [[unlikely]]
note: in expansion of macro 'CODI_Unlikely'
538 | } else if (LowLevelFunctionEntryCallKind::Delete == callType) CODI_Unlikely {

for include/codi/tapes/jacobianBaseTape.hpp I get the error:
error: conversion from 'long unsigned int' to 'codi::LocalAdjoints<double, int, codi::JacobianLinearTape<codi::JacobianTapeTypes<double, double, codi::LinearIndexManager, codi::DefaultChunkedData, codi::LocalAdjoints> > >::Identifier' {aka 'int'} may change value [-Werror=conversion]
[build] 870 | adjoints.resize(getNextMultiple((size_t)indexManager.get().getLargestCreatedIndex() + 1, Config::ChunkSize));

for include/codi/tapes/jacobianLinearTape.hpp I get the error:
error: conversion from 'size_t' {aka 'long unsigned int'} to 'codi::EventSystem<codi::JacobianLinearTape<codi::JacobianTapeTypes<double, double, codi::LinearIndexManager, codi::DefaultChunkedData, codi::LocalAdjoints> > >::Identifier' {aka 'int'} may change value [-Werror=conversion]
203 | tape, curAdjointPos, GradientTraits::dim(), GradientTraits::toArray(lhsAdjoint).data());

These changes make it work.

@MaxSagebaum MaxSagebaum merged commit 22507e9 into SciCompKL:master Jul 9, 2024
2 checks passed
@MaxSagebaum
Copy link
Contributor

Thanks now everything is fine.

@MaxSagebaum MaxSagebaum mentioned this pull request Jul 9, 2024
bowenzhang23 pushed a commit to bowenzhang23/CoDiPack that referenced this pull request Aug 12, 2024
Improved parallel preaccumulation performance.

Merge pull request SciCompKL#38 from 'feature/moreOptionalBoundsChecking'
Reviewed-by: Max Sagebaum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants