Skip to content

Fix segmentation faults when reading in trajectories without forces/velocities after reading in trajectories with forces/velocities#1188

Merged
drroe merged 37 commits into
Amber-MD:masterfrom
drroe:moremath
Jul 16, 2026
Merged

Fix segmentation faults when reading in trajectories without forces/velocities after reading in trajectories with forces/velocities#1188
drroe merged 37 commits into
Amber-MD:masterfrom
drroe:moremath

Conversation

@drroe

@drroe drroe commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Version 7.10.0. Should address #1187.

In the case where loading in a trajectory with velocity/force information before a trajectory without velocity/force information, the output trajectory would be set up with that information expected. When encountering a trajectory without that information a segfault would occur. This PR fixes the behavior so that zeroes for forces/velocities are written instead of segfaulting when this occurs. This is fixed for both trajin and ensemble in serial and in parallel.

Adds a check that replica indices map to the same values when loading in multiple ensembles; otherwise sorting may not work properly.

Adds 3 new math functions: hyperbolic sin, cos, and tan.

Adds a new keyword for ensemble, bytemp to force sorting by replica temperature (instead of replica indices).

Adds more tests and updates the documentation.

Daniel R. Roe and others added 30 commits July 7, 2026 12:05
…o) differs from the coordinate info output trajectories were set up with. If set up for velocities/forces and no velocity/force info in the current frame, set all zeroes in the current frame.
…alue mapping is the same between different trajectories.
@drroe drroe self-assigned this Jul 15, 2026
@drroe drroe added bugfix New keywords New keywords for existing commands. labels Jul 15, 2026
@drroe

drroe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

According to git bisect, the first bad and last good commits:

commit 066c404e430670a427abe7d694e02f88802a673b (HEAD)
Author: Daniel R. Roe <daniel.r.roe@gmail.com>
Date:   Tue Jul 14 16:12:44 2026 -0400

    Version 7.10.0. Minor version bump for fixing handling remd ensembles with changing vel/frc info. Also added 3 math funcitons.

commit 784e9fd9fd0aa6a0c3abaa48bd8739082a86cf2a
Author: Daniel R. Roe <daniel.r.roe@gmail.com>
Date:   Tue Jul 14 15:40:43 2026 -0400

    Hide debug info

@drroe

drroe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Sometimes I am a complete dingdong...

Need to use NcTest() to compare NetCDF files, not DoTest() 🤦‍♂️ . The version bump was causing the files to look different.

@drroe

drroe commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

The Jenkins failure is a non-specific one for the CUDA build. Potentially the CUDA runner is having issues. Local CUDA compiles and tests fine so I am going to merge.

@drroe
drroe merged commit 19a0bb7 into Amber-MD:master Jul 16, 2026
12 of 13 checks passed
@drroe
drroe deleted the moremath branch July 16, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix New keywords New keywords for existing commands.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant