[ase-users] MPI error in writing a trajectory file

Glen Jenness glenjenness at gmail.com
Tue Jul 16 16:41:11 CEST 2024


Dear users,
I have been trying to get GPAW-24.6.0 and ASE-3.23.0 working on a new
system and whilst I have gotten several issues straightened out, I am
stumped on this last hurdle.

The error is:

rank=00 L00: Traceback (most recent call last):
rank=00 L01:   File
"/p/home/gjenness/programs/gpaw-rebuild/build/lib.linux-x86_64-3.8/gpaw/__init__.py",
line 161, in main
rank=00 L02:     runpy.run_path(gpaw_args.script, run_name='__main__')
rank=00 L03:   File
"/p/app/projects/erdc-cct/programs/anaconda3.8/lib/python3.8/runpy.py",
line 265, in run_path
rank=00 L04:     return _run_module_code(code, init_globals, run_name,
rank=00 L05:   File
"/p/app/projects/erdc-cct/programs/anaconda3.8/lib/python3.8/runpy.py",
line 97, in _run_module_code
rank=00 L06:     _run_code(code, mod_globals, init_globals,
rank=00 L07:   File
"/p/app/projects/erdc-cct/programs/anaconda3.8/lib/python3.8/runpy.py",
line 87, in _run_code
rank=00 L08:     exec(code, run_globals)
rank=00 L09:   File "mwe.py", line 16, in <module>
rank=00 L10:     opt.run(fmax=0.05)
rank=00 L11:   File
"/p/app/projects/erdc-cct/programs/ase/3.23.0/ase/optimize/optimize.py",
line 430, in run
rank=00 L12:     return Dynamics.run(self, steps=steps)
rank=00 L13:   File
"/p/app/projects/erdc-cct/programs/ase/3.23.0/ase/optimize/optimize.py",
line 275, in run
rank=00 L14:     for converged in Dynamics.irun(self, steps=steps):
rank=00 L15:   File
"/p/app/projects/erdc-cct/programs/ase/3.23.0/ase/optimize/optimize.py",
line 236, in irun
rank=00 L16:     elif len(self.trajectory) == 0:
rank=00 L17:   File
"/p/app/projects/erdc-cct/programs/ase/3.23.0/ase/io/trajectory.py", line
225, in __len__
rank=00 L18:     return self.comm.sum_scalar(len(self.backend))
rank=00 L19: AttributeError: 'MPI' object has no attribute 'sum_scalar'


Looking at the code, it should be pulling the MPI setup from the
gpaw-python interpreter; however I am not an MPI expert so I am not sure
what is going on.

GPAW is compiled with AMD's AOCC and openmp (which now runs fine).

I have attached a MWE that produces the problem. I have tried the optimizer
with both trajectory='initial2.traj' and calling the Trajectory class
directly, both with the same result (the MWE has the former).

Thank you for any assistance.
-- 
Dr. Glen Jenness
Environmental Lab
Engineering Research and Development Center (ERDC)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20240716/476a94d9/attachment-0001.htm>
-------------- next part --------------

  ___ ___ ___ _ _ _  
 |   |   |_  | | | | 
 | | | | | . | | | | 
 |__ |  _|___|_____|  22.8.1b1
 |___|_|             

User:   gjenness at r02u18n01.navydsrc.hpc.local
Date:   Tue Jul 16 14:34:24 2024
Arch:   x86_64
Pid:    241242
CWD:    /p/work1/gjenness/climb_internals_test
Python: 3.8.5
gpaw:   /p/home/gjenness/programs/gpaw-rebuild/build/lib.linux-x86_64-3.8/gpaw
_gpaw:  /p/home/gjenness/programs/gpaw-rebuild/build/bin.linux-x86_64-3.8/
        gpaw-python (79eb7a4772)
ase:    /p/app/projects/erdc-cct/programs/ase/3.23.0/ase (version 3.23.0-73cecb28dd)
numpy:  /p/app/projects/erdc-cct/programs/anaconda3.8/lib/python3.8/site-packages/numpy (version 1.19.2)
scipy:  /p/app/projects/erdc-cct/programs/anaconda3.8/lib/python3.8/site-packages/scipy (version 1.5.2)
libxc:  6.2.2
units:  Angstrom and eV
cores: 64
OpenMP: False
OMP_NUM_THREADS: 1

Input parameters:
  basis: dzp
  mode: lcao

System changes: positions, numbers, cell, pbc, initial_charges, initial_magmoms 

Initialize ...

species:
  Pt:
    name: Platinum
    id: 5a6399afde4becbffda6f57f3efd9534
    Z: 78.0
    valence: 16
    core: 62
    charge: 0.0
    file: /p/app/projects/erdc-cct/programs/gpaw-data/gpaw-setups-0.9.20000/Pt.LDA.gz
    compensation charges: {type: gauss,
                           rc: 0.41,
                           lmax: 2}
    cutoffs: {filter: 2.26,
              core: 2.26}
    valence states:
      #              energy  rcut
      - 6s(1.00)    -5.930   1.307
      - 5p(6.00)   -56.318   1.371
      - 6p(0.00)    -0.962   1.371
      - 5d(9.00)    -6.387   1.307
      -  s          21.281   1.307
      -  d          20.825   1.307
  
    # LCAO basis set for Pt:
    #   Name: dzp
    #   File: /p/app/projects/erdc-cct/programs/gpaw-data/gpaw-setups-0.9.20000/Pt.dzp.basis.gz
    #   Number of radial functions: 9
    #   Number of spherical harmonics: 27
    #     l=0, rc=8.5938 Bohr: 6s-sz confined orbital
    #     l=1, rc=3.5781 Bohr: 5p-sz confined orbital
    #     l=1, rc=13.6250 Bohr: 6p-sz confined orbital
    #     l=2, rc=6.0938 Bohr: 5d-sz confined orbital
    #     l=0, rc=5.0625 Bohr: 6s-dz split-valence wave
    #     l=1, rc=2.4219 Bohr: 5p-dz split-valence wave
    #     l=1, rc=8.3281 Bohr: 6p-dz split-valence wave
    #     l=2, rc=3.6406 Bohr: 5d-dz split-valence wave
    #     l=1, rc=8.5938 Bohr: p-type Gaussian polarization
    #   Number of RI-basis functions 0

Reference energy: -8501644.730769  # eV

Spin-paired calculation

Convergence criteria:
 Maximum [total energy] change in last 3 cyles: 0.0005 eV / electron
 Maximum integral of absolute [dens]ity change: 0.0001 electrons / valence electron
 Maximum integral of absolute [eigenst]ate change: 4e-08 eV^2 / valence electron
 Maximum number of scf [iter]ations: 333
 (Square brackets indicate name in SCF output, whereas a 'c' in
 the SCF output indicates the quantity has converged.)

Symmetries present (total): 2

  ( 1  0  0)  ( 0  1  0)
  ( 0  1  0)  ( 1  0  0)
  ( 0  0  1)  ( 0  0  1)

1 k-point (Gamma)
1 k-point in the irreducible part of the Brillouin zone
       k-points in crystal coordinates                weights
   0:     0.00000000    0.00000000    0.00000000          1/1

Wave functions: LCAO
  Diagonalizer: Serial LAPACK
  Atomic Correction: dense with blas
  Data-type: float
 

Occupation numbers: Fermi-Dirac:
  width: 0.1000  # eV
 

Eigensolver
   LCAO using direct dense diagonalizer 

Densities:
  Coarse grid: 28*28*128 grid
  Fine grid: 56*56*256 grid
  Total Charge: 0.000000 

Density mixing:
  Method: separate
  Backend: pulay
  Linear mixing parameter: 0.05
  old densities: 5
  Damping of long wavelength oscillations: 50 

Hamiltonian:
  XC and Coulomb potentials evaluated on a 56*56*256 grid
  Using the LDA Exchange-Correlation functional
  Interpolation: tri-quintic (5. degree polynomial)
  Poisson solver: FastPoissonSolver using
    Stencil: 6*3+1=19 point O(h^6) finite-difference Laplacian
    FFT axes: [0, 1]
    FST axes: [2]
 

Memory estimate:
  Process memory now: 226.86 MiB
  Calculator: 8.24 MiB
    Density: 2.00 MiB
      Arrays: 0.29 MiB
      Localized functions: 1.60 MiB
      Mixer: 0.10 MiB
    Hamiltonian: 0.29 MiB
      Arrays: 0.19 MiB
      XC: 0.00 MiB
      Poisson: 0.00 MiB
      vbar: 0.10 MiB
    Wavefunctions: 5.95 MiB
      C [qnM]: 0.59 MiB
      S, T [2 x qmm]: 3.21 MiB
      P [aqMi]: 0.00 MiB
      BasisFunctions: 2.15 MiB
      Eigensolver: 0.00 MiB

Total number of cores used: 64
Domain decomposition: 2 x 2 x 16

Number of atoms: 17
Number of atomic orbitals: 459
Number of bands in calculation: 168
Number of valence electrons: 272
Bands to converge: occupied

... initialized

Initializing position-dependent things.

Density initialized from atomic densities
    .-------------.  
   /|             |  
  / |             |  
 *  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |Pt           |  
 |Pt|    Pt       |  
 Pt |   Pt        |  
 |  |  Pt     Pt  |  
 |  |Pt     Pt    |  
 |  |             |  
 |Pt|    Pt       |  
 Pt |  PPt    Pt  |  
 |  |             |  
 |  |Pt     Pt    |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  |             |  
 |  .-------------.  
 | /             /   
 |/             /    
 *-------------*     

Positions:
   0 Pt     1.385929    1.385929   10.000000    ( 0.0000,  0.0000,  0.0000)
   1 Pt     4.157788    1.385929   10.000000    ( 0.0000,  0.0000,  0.0000)
   2 Pt     1.385929    4.157788   10.000000    ( 0.0000,  0.0000,  0.0000)
   3 Pt     4.157788    4.157788   10.000000    ( 0.0000,  0.0000,  0.0000)
   4 Pt     0.000000    0.000000   11.960000    ( 0.0000,  0.0000,  0.0000)
   5 Pt     2.771859    0.000000   11.960000    ( 0.0000,  0.0000,  0.0000)
   6 Pt     0.000000    2.771859   11.960000    ( 0.0000,  0.0000,  0.0000)
   7 Pt     2.771859    2.771859   11.960000    ( 0.0000,  0.0000,  0.0000)
   8 Pt     1.385929    1.385929   13.920000    ( 0.0000,  0.0000,  0.0000)
   9 Pt     4.157788    1.385929   13.920000    ( 0.0000,  0.0000,  0.0000)
  10 Pt     1.385929    4.157788   13.920000    ( 0.0000,  0.0000,  0.0000)
  11 Pt     4.157788    4.157788   13.920000    ( 0.0000,  0.0000,  0.0000)
  12 Pt     0.000000    0.000000   15.880000    ( 0.0000,  0.0000,  0.0000)
  13 Pt     2.771859    0.000000   15.880000    ( 0.0000,  0.0000,  0.0000)
  14 Pt     0.000000    2.771859   15.880000    ( 0.0000,  0.0000,  0.0000)
  15 Pt     2.771859    2.771859   15.880000    ( 0.0000,  0.0000,  0.0000)
  16 Pt     1.385929    1.385929   17.491000    ( 0.0000,  0.0000,  0.0000)

Unit cell:
           periodic     x           y           z      points  spacing
  1. axis:    yes    5.543717    0.000000    0.000000    28     0.1980
  2. axis:    yes    0.000000    5.543717    0.000000    28     0.1980
  3. axis:    no     0.000000    0.000000   25.880000   128     0.2022

  Lengths:   5.543717   5.543717  25.880000
  Angles:   90.000000  90.000000  90.000000

Effective grid spacing dv^(1/3) = 0.1994

     iter     time        total  log10-change:
                         energy  eigst   dens
iter:   1 14:34:27  -108.010272       c
iter:   2 14:34:28  -102.864982       c -1.18
iter:   3 14:34:29   -99.914862       c -1.28
iter:   4 14:34:30   -98.247526       c -1.34
iter:   5 14:34:31   -96.131520       c -1.56
iter:   6 14:34:32   -95.038136       c -1.71
iter:   7 14:34:33   -93.813680       c -1.76
iter:   8 14:34:34   -93.730740       c -1.94
iter:   9 14:34:35   -93.598249       c -2.01
iter:  10 14:34:36   -93.272552       c -2.07
iter:  11 14:34:37   -93.201964       c -2.32
iter:  12 14:34:38   -93.170538c      c -2.41
iter:  13 14:34:39   -93.192315c      c -2.52
iter:  14 14:34:40   -93.135898c      c -2.44
iter:  15 14:34:41   -93.116586c      c -2.69
iter:  16 14:34:42   -93.113105c      c -2.68
iter:  17 14:34:43   -93.114605c      c -2.90
iter:  18 14:34:44   -93.115324c      c -3.04
iter:  19 14:34:46   -93.120765c      c -3.15
iter:  20 14:34:47   -93.117184c      c -3.09
iter:  21 14:34:48   -93.115396c      c -3.32
iter:  22 14:34:49   -93.115650c      c -3.51
iter:  23 14:34:50   -93.113249c      c -3.61
iter:  24 14:34:51   -93.113691c      c -3.67
iter:  25 14:34:52   -93.113566c      c -3.87
iter:  26 14:34:53   -93.113520c      c -3.85
iter:  27 14:34:54   -93.113698c      c -3.93
iter:  28 14:34:55   -93.113683c      c -4.03c

Converged after 28 iterations.

Dipole moment: (-6.399275, -6.399275, 0.056909) |e|*Ang

Energy contributions relative to reference atoms: (reference = -8501644.730769)

Kinetic:       +115.280615
Potential:     -113.440948
External:        +0.000000
XC:             -94.643446
Entropy (-ST):   -1.195455
Local:           +0.287824
--------------------------
Free energy:    -93.711410
Extrapolated:   -93.113683

 Band  Eigenvalues  Occupancy
    0    -58.61462    2.00000
    1    -58.61462    2.00000
    2    -58.53997    2.00000
    3    -58.48216    2.00000
    4    -58.45808    2.00000
    5    -58.45808    2.00000
    6    -58.44469    2.00000
    7    -58.43486    2.00000
    8    -58.43486    2.00000
    9    -58.40108    2.00000
   10    -58.34265    2.00000
   11    -58.34265    2.00000
   12    -58.28446    2.00000
   13    -58.28446    2.00000
   14    -58.22181    2.00000
   15    -58.22181    2.00000
   16    -58.21742    2.00000
   17    -58.20769    2.00000
   18    -58.20769    2.00000
   19    -58.19738    2.00000
   20    -58.18624    2.00000
   21    -58.18624    2.00000
   22    -58.18236    2.00000
   23    -58.13885    2.00000
   24    -58.11746    2.00000
   25    -58.10882    2.00000
   26    -58.10882    2.00000
   27    -58.06948    2.00000
   28    -58.06948    2.00000
   29    -58.05652    2.00000
   30    -57.99932    2.00000
   31    -57.98206    2.00000
   32    -57.98206    2.00000
   33    -57.97106    2.00000
   34    -57.97106    2.00000
   35    -57.96835    2.00000
   36    -57.94478    2.00000
   37    -57.94478    2.00000
   38    -57.90514    2.00000
   39    -57.90514    2.00000
   40    -57.89320    2.00000
   41    -57.85125    2.00000
   42    -57.75776    2.00000
   43    -57.73836    2.00000
   44    -57.60515    2.00000
   45    -57.52126    2.00000
   46    -57.46086    2.00000
   47    -57.45800    2.00000
   48    -57.44127    2.00000
   49    -57.44127    2.00000
   50    -57.31372    2.00000
   51    -15.42736    2.00000
   52    -13.92075    2.00000
   53    -12.68575    2.00000
   54    -12.62850    2.00000
   55    -12.62850    2.00000
   56    -12.62322    2.00000
   57    -12.60305    2.00000
   58    -12.34555    2.00000
   59    -12.25862    2.00000
   60    -12.23330    2.00000
   61    -12.23014    2.00000
   62    -11.85420    2.00000
   63    -11.85420    2.00000
   64    -11.64714    2.00000
   65    -11.64714    2.00000
   66    -11.59723    2.00000
   67    -11.54448    2.00000
   68    -11.49424    2.00000
   69    -11.45180    2.00000
   70    -11.17383    2.00000
   71    -10.71770    2.00000
   72    -10.54024    2.00000
   73    -10.54024    2.00000
   74    -10.05650    2.00000
   75     -9.98872    2.00000
   76     -9.74764    2.00000
   77     -9.74764    2.00000
   78     -9.72811    2.00000
   79     -9.61541    2.00000
   80     -9.61541    2.00000
   81     -9.56325    2.00000
   82     -9.47099    2.00000
   83     -9.40723    2.00000
   84     -9.27486    2.00000
   85     -9.27486    2.00000
   86     -9.21248    2.00000
   87     -9.01531    2.00000
   88     -8.96961    2.00000
   89     -8.96961    2.00000
   90     -8.93963    2.00000
   91     -8.87006    2.00000
   92     -8.83501    2.00000
   93     -8.83501    2.00000
   94     -8.78002    2.00000
   95     -8.78002    2.00000
   96     -8.71882    2.00000
   97     -8.35694    2.00000
   98     -8.35694    2.00000
   99     -8.14983    2.00000
  100     -8.14526    2.00000
  101     -7.97085    2.00000
  102     -7.90008    2.00000
  103     -7.90008    2.00000
  104     -7.65710    2.00000
  105     -7.63203    2.00000
  106     -7.38339    2.00000
  107     -7.33235    2.00000
  108     -7.33235    2.00000
  109     -7.03633    2.00000
  110     -6.83100    2.00000
  111     -6.79120    2.00000
  112     -6.70566    2.00000
  113     -6.70566    2.00000
  114     -6.66922    2.00000
  115     -6.59981    2.00000
  116     -6.55398    2.00000
  117     -6.44520    1.99999
  118     -6.44520    1.99999
  119     -6.36954    1.99998
  120     -6.36954    1.99998
  121     -6.26090    1.99993
  122     -6.07874    1.99957
  123     -6.00560    1.99910
  124     -5.95002    1.99843
  125     -5.80232    1.99313
  126     -5.76855    1.99038
  127     -5.76855    1.99038
  128     -5.71420    1.98350
  129     -5.70232    1.98143
  130     -5.63785    1.96492
  131     -5.56432    1.92818
  132     -5.56432    1.92818
  133     -5.23663    1.00669
  134     -5.22160    0.93162
  135     -5.21908    0.91911
  136     -5.20725    0.86070
  137     -5.20725    0.86070
  138     -5.20184    0.83429
  139     -5.09620    0.39851
  140     -5.00790    0.18661
  141     -5.00790    0.18661
  142     -4.87226    0.05165
  143     -4.65683    0.00613
  144     -4.35913    0.00031
  145     -3.93568    0.00000
  146     -3.93568    0.00000
  147     -3.88073    0.00000
  148     -3.82449    0.00000
  149     -2.68577    0.00000
  150     -2.68577    0.00000
  151     -2.38664    0.00000
  152     -2.38664    0.00000
  153     -1.79078    0.00000
  154     -1.67722    0.00000
  155     -1.66342    0.00000
  156      0.15403    0.00000
  157      0.15403    0.00000
  158      0.77901    0.00000
  159      0.86361    0.00000
  160      1.72743    0.00000
  161      1.72743    0.00000
  162      1.91979    0.00000
  163      2.04273    0.00000
  164      2.07468    0.00000
  165      2.08416    0.00000
  166      2.81501    0.00000
  167      2.85100    0.00000

Fermi level: -5.23529

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwe.py
Type: application/octet-stream
Size: 573 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20240716/476a94d9/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwe.out
Type: application/octet-stream
Size: 108244 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20240716/476a94d9/attachment-0003.obj>


More information about the ase-users mailing list