Repository navigation
Conversation
|
I am so sorry for the delay in getting to this! I was on leave when the PR came in and it fell off my radar. Will review this today or tomorrow. |
|
@whahnsr this looks good! Can you just run |
|
Thanks for the review! I've run make depend and pushed the updated src/cpptrajdepend file. Action_PairDist.o now correctly depends on Dcalc.h instead of DistRoutines.h. |
|
The latest CodeQL Analyze (cpp) workflow failed while compiling the bundled Readline library, before completing the CPPTRAJ build. The compiler errors are in src/readline/signals.c at lines 221, 254, and 269, involving incompatible signal-handler function-pointer types. The failure occurs during ./configure --buildlibs gnu and appears unrelated to the Action_PairDist optimization or the updated cpptrajdepend file. Could you please advise whether this is a known compatibility issue with the current GitHub runner/compiler environment? Thanks! |
|
Sorry, just got back from a trip. Let me look into this as soon as I can.
Might be tomorrow
…On Sun, Nov 15, 2026 at 1:24 AM whahnsr ***@***.***> wrote:
*whahnsr* left a comment (Amber-MD/cpptraj#1204)
<#1204 (comment)>
The latest CodeQL Analyze (cpp) workflow failed while compiling the
bundled Readline library, before completing the CPPTRAJ build.
The compiler errors are in src/readline/signals.c at lines 221, 254, and
269, involving incompatible signal-handler function-pointer types.
The failure occurs during ./configure --buildlibs gnu and appears
unrelated to the Action_PairDist optimization or the updated cpptrajdepend
file.
Could you please advise whether this is a known compatibility issue with
the current GitHub runner/compiler environment?
Thanks!
—
Reply to this email directly, view it on GitHub
<#1204?email_source=notifications&email_token=ACNMTNYJ4EUN2CRHQTLCDWT5ZFDZLA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTMOBZGAZTENBRGQZKM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-6890324142>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNMTN7EXYY5F7OZDT56LLD5ZFDZLAVCNFSNUABEKJSXA33TNF2G64TZHMZDOOBSHAYDSNZ3JFZXG5LFHM3DCMJSGUYTSMBSGKQXMAQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
So I had some time to look into it today. I did get it to build, but now I'm running into some issues with tests that appear to be related to slightly different handling of numbers by the latest compilers on GH (see #1205), i.e. things like denormalization are being handled differently leading to slightly different outcomes. I think the solution is going to be to modify the tests in question so they are not so sensitive to those things, but that will take a bit longer. So still looks like it won't be resolved until tomorrow. |
Summary
Use the existing
Cpptraj::Dcalcclass inAction_PairDistto avoid redundant calculations when evaluating atom-pair distances.
The change:
Dcalconce per frame.SetXYZ1()once per outer-loop atom.Dist2()in the inner loop.This builds on the distance-calculation improvements
introduced in #1198.
Validation
identical benchmark output.
Performance
Benchmarks were run on an Intel i5-6600, pinned to CPU 2,
using single-threaded execution and five repetitions
with
perf stat.Independent MDAnalysis adenylate kinase trajectory:
47,681 atoms, 4 million atom pairs per frame.
The orthogonal benchmark repeats 10 distinct trajectory
frames ten times. Its box angles were changed to 90 degrees
for a controlled orthogonal imaging comparison.
A separate CPPTRAJ truncated-octahedral benchmark showed
a 32.8% reduction in elapsed time.
Maintainer note
Thank you for reviewing and merging our earlier related
optimizations. I particularly appreciate the subsequent
work on distance calculations in #1198, which provided
the basis for this change.
I hope this is a useful extension of that work. If it
overlaps with anything already underway or planned,
please feel entirely free to close the PR. I certainly
don't want to duplicate effort or interfere with your
development plans.
Thanks again for your time and for maintaining CPPTRAJ.
Additional benchmark — November 9, 2026
After moving active development to the SSD, the optimization
was benchmarked again on Cecilia.
Test configuration:
Observed elapsed-time reduction: 10.4%.
Both executables completed successfully and produced
byte-for-byte identical output.
SHA256 (both outputs):
27cc665dc8c864aac3c3a57a46ca31470db374d9e47fbddf1370227e11dcad8e
These measurements supplement the earlier benchmarks
reported above.