crest icon indicating copy to clipboard operation
crest copied to clipboard

QCG Example 4 - munmap_chunk(): invalid pointer

Open matteo-northvolt opened this issue 2 years ago • 5 comments

Good afternoon,

I am playing a bit with CREST, in particular I am trying to run this example but I get the following error.


       ==============================================
       |                                            |
       |                 C R E S T                  |
       |                                            |
       |  Conformer-Rotamer Ensemble Sampling Tool  |
       |          based on the GFN methods          |
       |             P.Pracht, S.Grimme             |
       |          Universitaet Bonn, MCTC           |
       ==============================================
       Version 2.12,   Thu 19. Mai 16:32:32 CEST 2022
  Using the xTB program. Compatible with xTB version 6.4.0

   Cite work conducted with this code as

   • P.Pracht, F.Bohle, S.Grimme, PCCP, 2020, 22, 7169-7192.
   • S.Grimme, JCTC, 2019, 15, 2847-2862.

   and for works involving QCG as

   • S.Spicher, C.Plett, P.Pracht, A.Hansen, S.Grimme,
     JCTC, 2022, 18 (5), 3174-3189.

   with help from:
   C.Bannwarth, F.Bohle, S.Ehlert, S.Grimme,
   C.Plett, P.Pracht, S.Spicher

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 Command line input:
 > crest pentanol.xyz --qcg benzene.coord --nsolv 25 --gsolv --nclus 4 --fscal 0.65 --gbsa benzene

 Solute-file: pentanol.xyz
 Solvent-file: benzene.coord
  --gbsa benzene : implicit solvation

  ========================================
  |           ----------------           |
  |                 Q C G                |
  |           ----------------           |
  |        Quantum Cluster Growth        |
  |       University of Bonn, MCTC       |
  ========================================
   S. Grimme, S. Spicher, C. Plett.

   Cite work conducted with this code as

   S. Spicher, C. Plett, P. Pracht, A. Hansen, S. Grimme, JCTC, 2022, 18, 3174-3189.


  =========================================
  |   quantum cluster growth: INPUT       |
  =========================================

  QCG: Calculation of delta G_solv
  Ensemble generated via CREST

  input parameters
  solute                 : pentanol.xyz
  charge                 : 0
  uhf                    : 0
  solvent                : benzene.coord
  # of solvents to add   : 25
  # of cluster generated : 4
  # of CPUs used         : 4
  Solvation model        : benzene
  xtb opt level          : normal
  System temperature [K] : 298.1
  RRHO scaling factor    : 0.75

 Solute geometry
munmap_chunk(): invalid pointer

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x7f68cd92108f in ???
#1  0x7f68cd92100b in ???
#2  0x7f68cd900858 in ???
#3  0x7f68cd96b26d in ???
#4  0x7f68cd9732fb in ???
#5  0x7f68cd97354b in ???
#6  0x56261764ff48 in ???
#7  0x562617658b6f in ???
#8  0x56261766fe9c in ???
#9  0x562617671612 in ???
#10  0x5626177b4c70 in ???
#11  0x56261764d340 in ???
#12  0x7f68cd902082 in ???
#13  0x56261764d370 in ???
Aborted

matteo-northvolt avatar Jul 14 '22 15:07 matteo-northvolt

Hi,

I couldn't reproduce the error yet, but it seems to be a problem with the geometry handling. Do other calculations work with the QCG and did you copy exactly the pentanol.xyz file from the example? Moreover, could you please let me know which operating system and xtb version you use?

cplett avatar Jul 14 '22 18:07 cplett

Hey, I tried to run the QCG Example 1, but I get the same error, whereas all the other examples (not the ones in the QCG subsection) are working well. I think I copied the structure correctly. I am running the examples using a conda environment I made under WLS. xtb version 6.4.1

UPDATE: I tried to run a simpler example and it works for --grow, there may be some issue with the geometry. crest molA.xyz --qcg molB.xyz

I tried to use the same solute/solvent couple to run --ensemble and --gsolv, the GROW part works well, but I get the following error when the ENSEMBLE part starts:

Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
ERROR STOP No (valid) solvent file! exit.

Error termination. Backtrace:
#0  0x55906bf4425d in ???
#1  0x55906bf46229 in ???
#2  0x55906befb5d0 in ???
#3  0x55906bf11771 in ???
#4  0x55906c052c70 in ???
#5  0x55906beeb340 in ???
#6  0x7f1c598e4082 in ???
#7  0x55906beeb370 in ???

Here is the log file:


________________________________________________________________________

  __________________     Solute Cluster Generation   _____________________

  ________________________________________________________________________


  =========================================
  |   quantum cluster growth: GROW        |
  =========================================

 Solute:
       unit ellipsoid axis a,b,c     :   0.333   0.333   0.333
 Solvent:
       unit ellipsoid axis a,b,c     :   0.497   0.253   0.251

  solvent anisotropy            :     1.319
  solute anisotropy             :     1.000
  roff inner wall               :     0.491
  solute max dist               :     0.000
  solvent max dist              :    18.672
  inner unit axis               :     0.333     0.333     0.333
  inner ellipsoid/Bohr          :     5.385     5.385     5.385
  scaling factor outer ellipsoid:     1.000
  outer ellipsoid/Bohr          :    16.424    16.424    16.424

  Size  E /Eh       De/kcal   Detot/kcal  Density   Efix         R   av/act. Surface   Opt
    1   -21.721961  -73.19     -73.19       0.819     -5.268      0.0   0.0    1328.5   normal
    2   -43.540401  -29.59    -102.78       0.944     -7.579      3.2   5.1    2223.1   normal
    3   -65.373986  -39.09    -141.87       1.036     -9.339      3.7   3.7    2999.0   normal

  Growth finished after 3 solvents added
  Results can be found in grow directory
  Energy list in file <qcg_energy.dat>
  Interaction energy in file <qcg_conv.dat>
  Growing process in <qcg_grow.xyz>
  Final geometry after grow in <cluster.coord> and <cluster.xyz>
  Potentials and geometry written in <cluster_cavity.coord> and <twopot_cavity.coord>

  =========================================
  |   quantum cluster growth: ENSEMBLE    |
  =========================================

matteo-northvolt avatar Jul 20 '22 07:07 matteo-northvolt

Hi, somehow this seems to occur only with the conda environment. Thank you for pointing this out. I will try to fix this.

cplett avatar Jul 20 '22 13:07 cplett

Good morning,

I made some test and the issue seems to be related to the dimension of the input solvent/solute.

I am using the following command: crest xtbopt.xyz --qcg xtbopt.xyz -gfn2 --nsolv 1 --keepdir --chrg 0 --uhf 0 --nofix -T 8

(solvent and solute are the same molecue)

If xtbopt.xyz it is small enough I don't get any error, otherwise I get the following:

Solute geometry                                                                                                                                             
free(): invalid size                                                                                                                                                                                                                                                                                                      

Program received signal SIGABRT: Process abort signal.                                                                                                                                                                                                                                                                    

Backtrace for this error:                                                                                                                                    
#0  0x7efca26263ff in ???                                                                                                                                    
#1  0x7efca262637f in ???                                                                                                                                   
#2  0x7efca2610db4 in ???                                                                                                                                   
#3  0x7efca26694e6 in ???                                                                                                                                    
#4  0x7efca26705eb in ???                                                                                                                                    
#5  0x7efca2671efb in ???                                                                                                                                   
#6  0x562c04fbeece in ???                                                                                                                                    
#7  0x562c04fc7b6f in ???                                                                                                                                    
#8  0x562c04fdee9c in ???                                                                                                                                    
#9  0x562c04fe0612 in ???                                                                                                                                    
#10  0x562c05123c70 in ???                                                                                                                                   
#11  0x562c04fbc340 in ???                                                                                                                                   
#12  0x7efca2612492 in ???                                                                                                                                  
#13  0x562c04fbc370 in ???                                                                                                                                   
Aborted (core dumped)

I hope this can help!

matteo-northvolt avatar Aug 29 '22 07:08 matteo-northvolt

Hi, Thanks for checking on this. It indicates problems with the usable memory. I noticed that such errors do only occur for certain conda environments. Could you please tell me, which conda you use so that I can check on this further?

cplett avatar Aug 29 '22 17:08 cplett

Hello, I am having the same issue running the aforementioned example. CREST output is:


       ==============================================
       |                                            |
       |                 C R E S T                  |
       |                                            |
       |  Conformer-Rotamer Ensemble Sampling Tool  |
       |          based on the GFN methods          |
       |             P.Pracht, S.Grimme             |
       |          Universitaet Bonn, MCTC           |
       ==============================================
       Version 2.12,   Thu 19. Mai 16:32:32 CEST 2022
  Using the xTB program. Compatible with xTB version 6.4.0

   Cite work conducted with this code as

   • P.Pracht, F.Bohle, S.Grimme, PCCP, 2020, 22, 7169-7192.
   • S.Grimme, JCTC, 2019, 15, 2847-2862.

   and for works involving QCG as

   • S.Spicher, C.Plett, P.Pracht, A.Hansen, S.Grimme,
     JCTC, 2022, 18 (5), 3174-3189.

   with help from:
   C.Bannwarth, F.Bohle, S.Ehlert, S.Grimme,
   C.Plett, P.Pracht, S.Spicher

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 Command line input:
 > crest pentanol.xyz --qcg benzene.coord --nsolv 25 --T 12 --gsolv --nclus 4 --fscal 0.65 --gbsa benzene

 Solute-file: pentanol.xyz
 Solvent-file: benzene.coord
  --T 12 (CPUs/Threads selected)
  --gbsa benzene : implicit solvation

  ========================================
  |           ----------------           |
  |                 Q C G                |
  |           ----------------           |
  |        Quantum Cluster Growth        |
  |       University of Bonn, MCTC       |
  ========================================
   S. Grimme, S. Spicher, C. Plett.

   Cite work conducted with this code as

   S. Spicher, C. Plett, P. Pracht, A. Hansen, S. Grimme, JCTC, 2022, 18, 3174-3189.


  =========================================
  |   quantum cluster growth: INPUT       |
  =========================================

  QCG: Calculation of delta G_solv
  Ensemble generated via CREST

  input parameters
  solute                 : pentanol.xyz
  charge                 : 0
  uhf                    : 0
  solvent                : benzene.coord
  # of solvents to add   : 25
  # of cluster generated : 4
  # of CPUs used         : 12
  Solvation model        : benzene
  xtb opt level          : normal
  System temperature [K] : 298.1
  RRHO scaling factor    : 0.75

 Solute geometry
munmap_chunk(): invalid pointer

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x7f5b9ee350bf in ???
#1  0x7f5b9ee3503b in ???
#2  0x7f5b9ee14858 in ???
#3  0x7f5b9ee7f29d in ???
#4  0x7f5b9ee8732b in ???
#5  0x7f5b9ee8757b in ???
#6  0x558fa1812ece in ???
#7  0x558fa181bb6f in ???
#8  0x558fa1832e9c in ???
#9  0x558fa1834612 in ???
#10  0x558fa1977c70 in ???
#11  0x558fa1810340 in ???
#12  0x7f5b9ee160b2 in ???
#13  0x558fa1810370 in ???

What information do you need for the Conda environment? I'm on conda 4.14.0 on Ubuntu 20.04 LTS. conda info returns the following:

     active environment : compchem
    active env location : /home/lbabetto/.anaconda3/envs/compchem
            shell level : 2
       user config file : /home/lbabetto/.condarc
 populated config files : /home/lbabetto/.condarc
          conda version : 4.14.0
    conda-build version : 3.21.4
         python version : 3.8.8.final.0
       virtual packages : __cuda=11.4=0
                          __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/lbabetto/.anaconda3  (writable)
      conda av data dir : /home/lbabetto/.anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/lbabetto/.anaconda3/pkgs
                          /home/lbabetto/.conda/pkgs
       envs directories : /home/lbabetto/.anaconda3/envs
                          /home/lbabetto/.conda/envs
               platform : linux-64
             user-agent : conda/4.14.0 requests/2.25.1 CPython/3.8.8 Linux/5.4.0-26-generic ubuntu/20.04.3 glibc/2.31
                UID:GID : 1002:1002
             netrc file : None
           offline mode : False

lbabetto avatar Sep 12 '22 09:09 lbabetto

Hi, thank you for the detailed information. I will try to fix this.

cplett avatar Sep 12 '22 15:09 cplett

A short update: I could reproduce the bug with conda. It was related to the compiling with gfortran instead of ifort that lead to a crash of the QCG run. I fixed the bug with the pull request #139 and as soon as a new version of crest will be out, the build with conda also in combination with gfortran should lead to a working QCG. Thanks again for all the contributions to this problem.

cplett avatar Sep 15 '22 14:09 cplett

Thank you for your help @cplett!

matteo-northvolt avatar Sep 26 '22 11:09 matteo-northvolt