[AMBER] Possible problems with GaMD calculations in pmemd26 (of length = 513Failed an illegal memory access was encountered)

From: Semen Baldin via AMBER <amber.ambermd.org>
Date: Sat, 4 Jul 2026 15:33:05 +0500

Dear members of the AMBER community!

I am using the academic version of pmemd26 and have encountered an error in
my GaMD calculations similar to the one reported in these threads:

http://archive.ambermd.org/202606/0017.html
http://archive.ambermd.org/202606/0022.html


I am running LiGaMD3 with the igamd=28 flag. The ntcmd steps complete
without any issues, but immediately afterward the following error appears:
"of length = 513 Failed: an illegal memory access was encountered"
The same systems run without any problems under pmemd24.
My first thought was that this might be a compilation issue related to
building pmemd.cuda on a Blackwell GPU, so I recompiled pmemd26 on several
different systems in our lab using different GCC and CUDA versions:

--------------------------------------------------------
PC 1:
CPU: AMD Ryzen 9900X
GPU: RTX 5070 Ti
OS: Arch Linux
GCC: 14.3.1 and 13.4.1 (I compiled pmemd26 using both)
CUDA: 12.8
Results of make test.cuda.serial: 317 file comparisons passed, 8 file
comparisons failed (8 of which can be ignored), 0 tests experienced errors
--------------------------------------------------------
PC 2:
CPU: AMD Ryzen 5600X
GPU: RTX 4060 Ti
OS: Ubuntu 24.04 LTS
GCC: 12.4.0
CUDA: 12.4
Results of make test.cuda.serial: 317 file comparisons passed, 8 file
comparisons failed (8 of which can be ignored), 0 tests experienced errors
--------------------------------------------------------
PC 3:
CPU: Intel Core i9-9900
GPU: RTX 2080 Super
OS: Ubuntu 22.04 LTS
GCC: 11.4.0
CUDA: 12.4
Results of make test.cuda.serial: 325 file comparisons passed, 8 file
comparisons failed (8 of which can be ignored), 0 tests experienced errors

However, in all four builds I again encountered the same "of length = 513
Failed: an illegal memory access was encountered" error immediately after
the ntcmd steps.
I then tried adjusting several simulation parameters:

-Doubling the number of cMD steps (no improvement)
-Changing ntf=1/2 (no improvement)
-Switching the barostat from Berendsen to Monte Carlo (barostat=2)
this allowed the calculation to proceed past the ntcmd steps,
but the gamd.log file now shows "Infinity" for Total-Force-Weight and
Boost-Energy-Potential,
 which does not seem correct. Here is the head of the gamd.log file:

 Gaussian Accelerated Molecular Dynamics log file
  # All energy terms stored in units of kcal/mol
  # ntwx,total_nstep,Unboosted-Potential-Energy,
Unboosted-Dihedral-Energy,Total-Force-Weight,Dihedral-Force-Weight,Boost-Energy-Potential,Boost-Energy-Dihedral
        1000 1001000 -57.396859039553 -144291.239091419149
    -Infinity 0.961782040894 Infinity
13.936257305838
        1000 1002000 -59.365112314001 -144282.673910071375
    -Infinity 0.962230884863 Infinity
13.610835770348
        1000 1003000 -60.307008345611 -144401.152912320336
    -Infinity 0.956022191387 Infinity
18.453482751771
        1000 1004000 -62.587347196415 -144254.107002160279
    -Infinity 0.963727885777 Infinity
12.553271279974
        1000 1005000 -57.123168380931 -144192.894501683302
    -Infinity 0.966935624238 Infinity
10.431141316862
        1000 1006000 -60.609116119333 -143980.131881692912
    -Infinity 0.978085092629 Infinity
 4.582373154645
        1000 1007000 -62.920564869419 -144284.683534865966
    -Infinity 0.962125573845 Infinity
13.686843338414
        1000 1008000 -59.541478231549 -144311.947555264924
    -Infinity 0.960696848565 Infinity
14.738928863294
        1000 1009000 -44.579076320864 -144290.744813154684
    -Infinity 0.961807942718 Infinity
13.917373400694
        1000 1010000 -57.325214843266 -144374.258709531976
    -Infinity 0.957431536995 Infinity
17.289686262031
        1000 1011000 -59.819814560004 -144315.068430196727
    -Infinity 0.960533304347 Infinity
14.861844283873
        1000 1012000 -61.525809343904 -144204.584809763590
    -Infinity 0.966323013243 Infinity
10.821254861632


Here is my input file for LiGaMD3 equilibration step:

LiGaMD3 equilibration simulation 52ns (2ns cMD, 50ns GaMD)
 &cntrl

  imin = 0, ! No minimization
  ntx = 1, ! Read coordinates only
  irest = 0, ! This is a new MD simulation

! Control how often information is printed
  ntpr = 1000, ! Print energies every ntpr steps
  ntwr = 5000, ! Print restart file every ntwr steps
  ntwx = 1000, ! Print coordinates every ntwx steps,
  ntxo = 2, ! Write NetCDF
  ioutfm = 1, ! Write NetCDF

  nstlim = 26000000, ! Simulation lenght 52 ns
  dt = 0.002, ! Time step 2 ps

! Temperature control
  ntt = 3, ! Langevin dynamics
  tempi = 300.0, ! Initial temperature
  temp0 = 300.0, ! Target temperature
  gamma_ln = 1.0, ! Friction coefficient (ps^-1)
  ig = -1, ! Random seed for speeds

! Pressure control
  barostat = 1, ! Berendsen barostat
  ntp = 1, ! 1=isotropic barostat
  pres0 = 1.0, ! Target external pressure in bars

  taup = 0.5, ! Berendsen coupling constant (ps)

! SHAKE control
  ntc = 2, ! Constrain bonds containing hydrogen
  ntf = 1, ! Calculate all forces

! Nonbonded cutoff control
  cut = 9.0, ! Nonbonded cutoff in angstroms

! ntwprt is the number of atoms to include in trajectory files
  iwrap = 1, ! Wrap coordinates when printing them to the same unit
cell
  ntwprt = 1616, ! Print coordinates only for ntwprt first atoms

! GaMD parameters
  igamd = 28, irest_gamd = 0,
  ntcmd = 1000000, nteb = 25000000, ntave = 200000,
  ntcmdprep = 400000, ntebprep = 400000,
  sigma0P = 2.0, sigma0D = 6.0, sigma0B=6.0, iEP=2, iED=2, iEB=1,
  bgpro2atm=1, edpro2atm=1546,
  gti_cpu_output = 0, gti_add_sc = 1,
  icfe = 1,
  ifsc = 1,
  timask1 = ':93',
  scmask1 = ':93',
  timask2 = '',
  scmask2='',
  nlig = 1,

 &end

 I would greatly appreciate any suggestions on how to resolve this issue.
 Thank you very much for your time and assistance.

 Best regards,
 Simon Baldin
 Research Assistant,
 School of Medicine,
 Nazarbayev University,
 Astana, Kazakhstan
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Jul 04 2026 - 04:00:02 PDT
Custom Search