Skip to content

Prolong CSSAIMS test - #72

Merged
danielhollas merged 11 commits into
mainfrom
cssaims-test
Jul 14, 2026
Merged

Prolong CSSAIMS test#72
danielhollas merged 11 commits into
mainfrom
cssaims-test

Conversation

@danielhollas

Copy link
Copy Markdown
Member

No description provided.

@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.25%. Comparing base (7291235) to head (7062e02).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   54.86%   55.25%   +0.39%     
==========================================
  Files          42       42              
  Lines        6183     6162      -21     
  Branches      836      832       -4     
==========================================
+ Hits         3392     3405      +13     
+ Misses       2432     2399      -33     
+ Partials      359      358       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielhollas

Copy link
Copy Markdown
Member Author

@yoricklassmann I've prolonged the CSSAIMS test. The good news is it no longer crashes. The bad news is that according to Codecov it still doesn't cover the code path in SelectionModule, and I don't understand why.

I verified this by applying this diff and the test still passes

diff --git a/src/modules/SelectionModule.f90 b/src/modules/SelectionModule.f90
index cb87f03..f3f123e 100644
--- a/src/modules/SelectionModule.f90
+++ b/src/modules/SelectionModule.f90
@@ -111,6 +111,7 @@ contains
 ! 2. Perform selections within those bundles
 ! 3. Convert the results into the original bundle.
       if (glzStoStateSpecific) then
+         error stop 1
 
          allocate (BundleSS(B1%NumStates))
          call fill_state_bundles(B1, BundleSS)

Comment thread tests/CSSAIMS/Control.dat
@yoricklassmann

Copy link
Copy Markdown
Collaborator

Test now covers the 4S path.

@yoricklassmann

Copy link
Copy Markdown
Collaborator

Yes CSSAIMS produces a lot of files!! But that is to be expected as it spawns continuously and selects whenever possible. Of course there is the LimitTraj keyword missing that controls the maximum number of TBFs before selection is initiated.

Comment thread tests/CSSAIMS/E.dat.ref Outdated
24.50 0.017574451 0.015763823 0.033338273 0.017338433 0.006081354 0.023419787
24.75 0.017558772 0.015785077 0.033343849 0.017340726 0.006108653 0.023449379
25.00 0.017541423 0.015803855 0.033345278 0.017300367 0.006122008 0.023422375
25.25 NaN 0.015825055 NaN 0.017300750 0.006148630 0.023449380

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, there are still Nan values in the E.dat file. ☹️

CC @yoricklassmann

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you have a clue where FMS_CGVTT is? It is called by the FMS_potentialB but I can't find it anywhere...

@danielhollas danielhollas Jul 12, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The code that is calling it is commented out, no?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You are absolutely correct, not sure why I didn't see that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So then my hunch would be that the NaNs are due to the dead TBFs being too plenty and on top of each other so the energy they contribute will overflow at some point. This might also explain why I didn't see any NaNs when I implemented CSSAIMS originally, where the graveyard is always empty.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh my god! The DeadH matrix elements are initialized wrongly... Whenever a new trajectory is added to the graveyard one would need to calculate matrix elements between all dead trajectories, but no that's not what happens. They are simply left uninitialized.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for figuring it out! 🙏 I'll have a closer look next week.

@yoricklassmann

Copy link
Copy Markdown
Collaborator

So I think we can't actually calculate the matrix elements for the trajectories in the graveyard as it stands currently. So what I've done is to initialize the matrix elements between a newcomer to the graveyard and the rest to 0. As you can see this doesn't affect the tests.

@danielhollas
danielhollas marked this pull request as ready for review July 12, 2026 21:13
@danielhollas

Copy link
Copy Markdown
Member Author

So I think we can't actually calculate the matrix elements for the trajectories in the graveyard as it stands currently. So what I've done is to initialize the matrix elements between a newcomer to the graveyard and the rest to 0. As you can see this doesn't affect the tests.

That sounds reasonable, thanks! Also thanks for opening #74

@danielhollas
danielhollas merged commit 8c3183b into main Jul 14, 2026
14 checks passed
@danielhollas
danielhollas deleted the cssaims-test branch July 14, 2026 10:32
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.

3 participants