• Multiwfn forum

    Multiwfn official website: http://www.shanxitv.org/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn. E-mail of admin: sobereva[at]sina.com

    You are not logged in.

    #1 2022-05-12 04:04:30

    i.s.ger
    Member
    Registered: 2020-12-01
    Posts: 55

    Defensive compilation of O1.f90

    Dear Tian Lu,

    As I can see, O1.f90 has defensive compilation due to a possible compiler bug. How can I repeat your observation of zero or NaN?

    Best regards,
    Igor

    Offline

    #2 2022-05-12 16:39:19

    sobereva
    Tian Lu (Multiwfn developer)
    From: Beijing
    Registered: 2017-09-11
    Posts: 1,468
    Website

    Re: Defensive compilation of O1.f90

    Dear Igor,

    In Makefile, if "OPT1 = -O1" is replaced with "OPT1 = -O2", then after loading a wavefunction file and then run
    200
    11
    1
    The result will be mostly zero or NaN, for example: (The ifort version is 19.0.1.144)

     Multiwfn -- A Multifunctional Wavefunction Analyzer
     Version 3.8(dev), release date: 2022-May-9
     Developer: Tian Lu (Beijing Kein Research Center for Natural Sciences)
     Below paper ***MUST BE CITED*** if Multiwfn is utilized in your work:
              Tian Lu, Feiwu Chen, J. Comput. Chem., 33, 580-592 (2012)
     See "How to cite Multiwfn.pdf" in Multiwfn binary package for more information
     Multiwfn official website: http://www.shanxitv.org/multiwfn
     Multiwfn English forum: http://www.shanxitv.org/wfnbbs
     Multiwfn Chinese forum: http://bbs.keinsci.com/wfn
    
     ( Number of parallel threads:   4  Current date: 2022-05-13  Time: 00:35:51 )
     
     Please wait...
     
     Total energy:   -2611.994301127532 Hartree,   Virial ratio:  1.99994135
     Total/Alpha/Beta electrons:     44.0000     22.0000     22.0000
     Net charge:     0.00000    Expected multiplicity:    1
     The number of orbitals:    22,  Atoms:      5,  GTFs:    145
     This is a restricted closed-shell single-determinant wavefunction
     Title line of this file:  opt hf/6-311+g(d) 10f 6d out=wfn
    
     Loaded CH3Br.wfn successfully!
     
     Formula: H3 C1 Br1 
     Molecule weight:        94.93809 Da
     Point group: C3v
     
     "q": Exit program gracefully          "r": Load a new file
                        ************ Main function menu ************
     0 Show molecular structure and view orbitals
     1 Output all properties at a point       2 Topology analysis
     3 Output and plot specific property in a line
     4 Output and plot specific property in a plane
     5 Output and plot specific property within a spatial region (calc. grid data)
     6 Check & modify wavefunction
     7 Population analysis and calculation of atomic charges
     8 Orbital composition analysis           9 Bond order analysis
     10 Plot total DOS, partial DOS, OPDOS, local DOS and photoelectron spectrum
     11 Plot IR/Raman/UV-Vis/ECD/VCD/ROA/NMR spectrum
     12 Quantitative analysis of molecular surface
     13 Process grid data (No grid data is presented currently)
     14 Adaptive natural density partitioning (AdNDP) analysis
     15 Fuzzy atomic space analysis
     16 Charge decomposition analysis (CDA) and plot orbital interaction diagram
     17 Basin analysis                       18 Electron excitation analysis
     19 Orbital localization analysis        20 Visual study of weak interaction
     21 Energy decomposition analysis        22 Conceptual DFT (CDFT) analysis
     23 ETS-NOCV analysis                    24 (Hyper)polarizability analysis
     25 Electron delocalization and aromaticity analyses
     100 Other functions (Part 1)            200 Other functions (Part 2)
     300 Other functions (Part 3)
    200
     
                   ============ Other functions (Part 2) ============
     0 Return
     1 Calculate core-valence bifurcation (CVB) index and related quantities
     2 Calculate atomic and bond dipole moments in Hilbert space
     3 Generate cube file for multiple orbital wavefunctions
     4 Generate iso-chemical shielding surfaces (ICSS) and related quantities
     5 Plot radial distribution function for a real space function
     6 Analyze correspondence between orbitals in two wavefunctions
     7 Parse output of (hyper)polarizability task of Gaussian
     8 Study (hyper)polarizability by sum-over-states (SOS) method
     9 Calculate average bond length and average coordinate number
     10 Output various kinds of integral between orbitals
     11 Calculate center, first/second moments and radius of gyration of a function
     12 Calculate energy index (EI) or bond polarity index (BPI)
     13 Evaluate orbital contributions to density difference or other grid data
     14 Domain analysis (Obtaining properties within isosurfaces of a function)
     15 Calculate electron correlation index (PCCP, 18, 24015)
     16 Generate natural orbitals based on the density matrix in .fch/.fchk file
     17 Calculate Coulomb and exchange integrals between two orbitals
     18 Calculate bond length/order alternation (BLA/BOA)
     20 Bond order density (BOD) and natural adaptive orbital (NAdO) analyses
    11
     
     0 Return
     1 Calculate various quantities of the selected function
     2 Calculate center and integral of the selected function
     3 Select the function to be studied, current:    1
     4 Set the center for option 1, current:    0.00000    0.00000    0.00000 Ang
     5 Calculate center and integral of the absolute of the selected function
    1
     Radial points:   75    Angular points:  434   Total:     32550 per center
     Processing center     1(C )   /     5
     Processing center     2(H )   /     5
     Processing center     3(H )   /     5
     Processing center     4(H )   /     5
     Processing center     5(Br)   /     5
     Calculation took up wall clock time         0 s
    
     Note: All data shown below are in a.u.
    
     Integral over whole space:  0.00000000E+00
    
     The first moment:
     X=   0.00000000E+00   Y=   0.00000000E+00   Z=   0.00000000E+00
     Norm=   0.00000000E+00
    
     The second moment:
     XX=  0.00000000E+00   XY=  0.00000000E+00   XZ=  0.00000000E+00
     YX=  0.00000000E+00   YY=  0.00000000E+00   YZ=  0.00000000E+00
     ZX=  0.00000000E+00   ZY=  0.00000000E+00   ZZ=  0.00000000E+00
     Eigenvalues:  0.00000000E+00  0.00000000E+00  0.00000000E+00
     Sum of eigenvalues (trace of the second moment tensor):  0.00000000E+00
     Anisotropy:  0.00000000E+00
    
     Radius of gyration:             NaN
    
     Spatial extent of the function <r^2>:        0.000000
     
     The quadrupole moment of nuclear charges:
     XX=      5.62036577   XY=      0.00000000   XZ=      0.00000000
     YX=      0.00000000   YY=      5.62036573   YZ=      0.00000000
     ZX=      0.00000000   ZY=      0.00000000   ZZ=    108.86830814
     
     The quadrupole moment of the system:
     XX=      5.62036577   XY=      0.00000000   XZ=      0.00000000
     YX=      0.00000000   YY=      5.62036573   YZ=      0.00000000
     ZX=      0.00000000   ZY=      0.00000000   ZZ=    108.86830814
     

    The result is normal if using -O1 in Linux or use -O2 in Windows for compiling O1.f90:

    Integral over whole space:  4.39999897E+01
    
    The first moment:
    X=  -8.88178420E-15   Y=  -6.86588534E-06   Z=   8.96717848E-01
    Norm=   8.04102898E-01
    
    The second moment:
    XX=  2.50666385E+01   XY=  7.32920669E-15   XZ= -1.50990331E-14
    YX=  7.32920669E-15   YY=  2.50666353E+01   YZ=  1.39406886E-05
    ZX= -1.50990331E-14   ZY=  1.39406886E-05   ZZ=  1.25287900E+02
    Eigenvalues:  2.50666353E+01  2.50666385E+01  1.25287900E+02
    Sum of eigenvalues (trace of the second moment tensor):  1.75421173E+02
    Anisotropy:  1.00221263E+02
    
    Radius of gyration:  1.99670874E+00
    
    Spatial extent of the function <r^2>:      175.421173
    
    The quadrupole moment of nuclear charges:
    XX=      5.62036577   XY=      0.00000000   XZ=      0.00000000
    YX=      0.00000000   YY=      5.62036573   YZ=      0.00000000
    ZX=      0.00000000   ZY=      0.00000000   ZZ=    108.86830814
    
    The quadrupole moment of the system:
    XX=    -19.44627278   XY=     -0.00000000   XZ=      0.00000000
    YX=     -0.00000000   YY=    -19.44626957   YZ=     -0.00000000
    ZX=      0.00000000   ZY=     -0.00000000   ZZ=    -16.41959138

    The reason is unclear to me.

    Best regards,

    Tian

    Offline

    #3 2022-05-13 07:54:12

    i.s.ger
    Member
    Registered: 2020-12-01
    Posts: 55

    Re: Defensive compilation of O1.f90

    Dear Tian Lu,

    I found the problem that tmpval is over-optimized. Here, these is a patch that fixes this problem: 0001-Remove-defensive-compilation.patch.txt

    Sorry for my a little explicit code-style :-)
    I OMP-parallelized the problem cycle and the problem is gone away :-)

    Best regards,
    Igor

    Offline

    #4 2022-05-13 14:45:53

    sobereva
    Tian Lu (Multiwfn developer)
    From: Beijing
    Registered: 2017-09-11
    Posts: 1,468
    Website

    Re: Defensive compilation of O1.f90

    Dear Igor,

    Thank you very much for your modification, now this subroutine runs normally under Linux with -O2. I have applied the patch to official source code in the new version updated today. Although O1.f90 is empty now, considering that in the future it may still be used, I didn't delete it.

    Best regards,

    Tian

    Offline

    Board footer

    Powered by FluxBB

    久久精品国产99久久香蕉