| 
|  Build openmx-3.962 with AOCC compiler error |  | 
 Date: 2025/04/14 04:46
 Name: hlajungo
  <hlajungo@gmail.com>
 
I am trying to build openmx with amd tool chain (aocc compiler + aocl library), I want to ask is it supported?
 I build openmx succeccfully with following makefile setting
 ```
 CC = mpicc -Dkcomp -O3 -march=znver2 -mtune=znver2 -mfma -mavx2 -fomit-frame-pointer -fopenmp -fPIC
 FC = mpif90 -Dkcomp -O3 -march=znver2 -mtune=znver2 -mfma -mavx2 -fomit-frame-pointer -fopenmp \
 -fallow-argument-mismatch -fPIC
 
 LIB = -lscalapack -lflame -lblis-mt -lblis \
 -lmpi_mpifh -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi \
 -lfftw3_mpi -lfftw3_omp -lfftw3 \
 -lgfortran -lamdlibm -fopenmp \
 -Wl,--allow-multiple-definition -Wl,--allow-shlib-undefined
 ```
 and these packages.
 ```
 aocc/5.0.0
 aocl/5.0
 ucx/1.18.0
 gcc/10.2.0 (provide gfortran)
 openmpi/4.1.6
 ```
 
 But when I trying to run `mpirun -n 8 ./openmx Methane.dat`
 
 
 ```
 *******************************************************
 *******************************************************
 Welcome to OpenMX  Ver. 3.9.23
 Copyright (C), 2002-2019, T. Ozaki
 OpenMX comes with ABSOLUTELY NO WARRANTY.
 This is free software, and you are welcome to
 redistribute it under the constitution of the GNU-GPL.
 *******************************************************
 *******************************************************
 
 
 
 <Input_std>  Your input file was normally read.
 <Input_std>  The system includes 2 species and 5 atoms.
 
 *******************************************************
 PAO and VPS
 *******************************************************
 
 <SetPara_DFT>  PAOs of species H were normally found.
 <SetPara_DFT>  PAOs of species C were normally found.
 <SetPara_DFT>  VPSs of species H were normally found.
 H_PBE19.vps is j-dependent.
 In case of scf.SpinOrbit.Coupling=off,
 j-dependent pseudo potentials are averaged by j-degeneracy,
 which corresponds to a scalar relativistic treatment.
 <SetPara_DFT>  VPSs of species C were normally found.
 C_PBE19.vps is j-dependent.
 In case of scf.SpinOrbit.Coupling=off,
 j-dependent pseudo potentials are averaged by j-degeneracy,
 which corresponds to a scalar relativistic treatment.
 
 *******************************************************
 Fourier transform of PAO and projectors of VNL
 *******************************************************
 
 <FT_PAO>          Fourier transform of pseudo atomic orbitals
 <FT_NLP>          Fourier transform of non-local projectors
 <FT_ProExpn_VNA>  Fourier transform of VNA separable projectors
 <FT_VNA>          Fourier transform of VNA potentials
 <FT_ProductPAO>  Fourier transform of product of PAOs
 
 *******************************************************
 Allocation of atoms to processors at MD_iter=    1
 *******************************************************
 
 proc =  0  # of atoms=  1  estimated weight=        1.00000
 proc =  1  # of atoms=  1  estimated weight=        1.00000
 proc =  2  # of atoms=  1  estimated weight=        1.00000
 proc =  3  # of atoms=  1  estimated weight=        1.00000
 proc =  4  # of atoms=  1  estimated weight=        1.00000
 proc =  5  # of atoms=  0  estimated weight=        0.00000
 proc =  6  # of atoms=  0  estimated weight=        0.00000
 proc =  7  # of atoms=  0  estimated weight=        0.00000
 
 
 
 
 *******************************************************
 Analysis of neighbors and setting of grids
 *******************************************************
 
 TFNAN=      20  Average FNAN=  4.00000
 TSNAN=      0  Average SNAN=  0.00000
 <truncation> CpyCell= 1 ct_AN=  1 FNAN SNAN  4  0
 <truncation> CpyCell= 1 ct_AN=  2 FNAN SNAN  4  0
 <truncation> CpyCell= 1 ct_AN=  3 FNAN SNAN  4  0
 <truncation> CpyCell= 1 ct_AN=  4 FNAN SNAN  4  0
 <truncation> CpyCell= 1 ct_AN=  5 FNAN SNAN  4  0
 TFNAN=      20  Average FNAN=  4.00000
 TSNAN=      0  Average SNAN=  0.00000
 <truncation> CpyCell= 2 ct_AN=  1 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  2 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  3 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  4 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  5 FNAN SNAN  4  0
 TFNAN=      20  Average FNAN=  4.00000
 TSNAN=      0  Average SNAN=  0.00000
 <truncation> CpyCell= 2 ct_AN=  1 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  2 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  3 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  4 FNAN SNAN  4  0
 <truncation> CpyCell= 2 ct_AN=  5 FNAN SNAN  4  0
 <Check_System> The system is molecule.
 lattice vectors (bohr)
 A  = 18.897259885789,  0.000000000000,  0.000000000000
 B  =  0.000000000000, 18.897259885789,  0.000000000000
 C  =  0.000000000000,  0.000000000000, 18.897259885789
 reciprocal lattice vectors (bohr^-1)
 RA =  0.332491871581,  0.000000000000,  0.000000000000
 RB =  0.000000000000,  0.332491871581,  0.000000000000
 RC =  0.000000000000,  0.000000000000,  0.332491871581
 Grid_Origin -9.300995100037 -9.300995100037 -9.300995100037
 Cell_Volume =  6748.333037104149 (Bohr^3)
 GridVol    =      0.025742847584 (Bohr^3)
 Grid_Origin -9.300995100037 -9.300995100037 -9.300995100037
 Cell_Volume =  6748.333037104149 (Bohr^3)
 GridVol    =      0.025742847584 (Bohr^3)
 <UCell_Box> Info. of cutoff energy and num. of grids
 lattice vectors (bohr)
 A  = 18.897259885789,  0.000000000000,  0.000000000000
 B  =  0.000000000000, 18.897259885789,  0.000000000000
 C  =  0.000000000000,  0.000000000000, 18.897259885789
 reciprocal lattice vectors (bohr^-1)
 RA =  0.332491871581,  0.000000000000,  0.000000000000
 RB =  0.000000000000,  0.332491871581,  0.000000000000
 RC =  0.000000000000,  0.000000000000,  0.332491871581
 Required cutoff energy (Ryd) for 3D-grids = 120.0000
 Used cutoff energy (Ryd) for 3D-grids = 113.2041, 113.2041, 113.2041
 Num. of grids of a-, b-, and c-axes = 64, 64, 64
 Grid_Origin -9.300995100037 -9.300995100037 -9.300995100037
 Cell_Volume =  6748.333037104149 (Bohr^3)
 GridVol    =      0.025742847584 (Bohr^3)
 Cell vectors (bohr) of the grid cell (gtv)
 gtv_a =  0.295269685715,  0.000000000000,  0.000000000000
 gtv_b =  0.000000000000,  0.295269685715,  0.000000000000
 gtv_c =  0.000000000000,  0.000000000000,  0.295269685715
 |gtv_a| =  0.295269685715
 |gtv_b| =  0.295269685715
 |gtv_c| =  0.295269685715
 Num. of grids overlapping with atom    1 = 20336
 Num. of grids overlapping with atom    2 = 20346
 Num. of grids overlapping with atom    3 = 20346
 Num. of grids overlapping with atom    4 = 20346
 Num. of grids overlapping with atom    5 = 20346
 
 *******************************************************
 SCF calculation at MD = 1
 *******************************************************
 
 <MD= 1>  Calculation of the overlap matrix
 <MD= 1>  Calculation of the nonlocal matrix
 <MD= 1>  Calculation of the VNA projector matrix
 
 ******************* MD= 1  SCF= 1 *******************
 <Poisson>  Poisson's equation using FFT...
 <Cluster>  Solving the eigenvalue problem...
 1    C  MulP    -nan    -nan sum    -nan
 2    H  MulP    -nan    -nan sum    -nan
 3    H  MulP    -nan    -nan sum    -nan
 4    H  MulP    -nan    -nan sum    -nan
 5    H  MulP    -nan    -nan sum    -nan
 Sum of MulP: up  =        -nan down          =        -nan
 total=        -nan ideal(neutral)=    8.00000
 <DFT>  Total Spin Moment (muB) =            -nan
 <DFT>  Mixing_weight= 0.200000000000
 <DFT>  Uele  =              -nan  dUele    =  1.000000000000
 <DFT>  NormRD =    1.000000000000  Criterion =  0.000000000100
 
 ******************* MD= 1  SCF= 2 *******************
 <Poisson>  Poisson's equation using FFT...
 <Set_Hamiltonian>  Hamiltonian matrix for VNA+dVH+Vxc...
 <Cluster>  Solving the eigenvalue problem...
 1    C  MulP    -nan    -nan sum    -nan
 2    H  MulP    -nan    -nan sum    -nan
 3    H  MulP    -nan    -nan sum    -nan
 4    H  MulP    -nan    -nan sum    -nan
 5    H  MulP    -nan    -nan sum    -nan
 Sum of MulP: up  =        -nan down          =        -nan
 total=        -nan ideal(neutral)=    8.00000
 <DFT>  Total Spin Moment (muB) =            -nan
 <DFT>  Mixing_weight= 0.200000000000
 <DFT>  Uele  =              -nan  dUele    =              nan
 <DFT>  NormRD =              nan  Criterion =  0.000000000100
 
 
 *******************************************************
 Computational times (s) at MD = 1
 *******************************************************
 
 DFT in total      =    1.62580
 
 Set_OLP_Kin      =    0.03440
 Set_Nonlocal      =    0.01761
 Set_ProExpn_VNA  =    0.08201
 Set_Hamiltonian  =    0.69188
 Poisson          =    0.33737
 diagonalization  =    0.09697
 Mixing_DM        =    0.00953
 Force            =    0.01528
 Total_Energy      =    0.05745
 Set_Aden_Grid    =    0.03306
 Set_Orbitals_Grid =    0.00997
 Set_Density_Grid  =    0.13632
 RestartFileDFT    =    0.01717
 Mulliken_Charge  =    0.00432
 FFT(2D)_Density  =    0.00000
 The calculation was terminated due to the illegal SCF calculation.
 ```
 
 There are full of `nan` and wrong output, and there are no information on internet I can found.
  |  |