Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid free when running cpcmx on methane, only for certain solvents #1115

Open
TyBalduf opened this issue Oct 9, 2024 · 1 comment
Open
Labels
unconfirmed This report has not yet been confirmed by the developers

Comments

@TyBalduf
Copy link
Contributor

TyBalduf commented Oct 9, 2024

Describe the bug
CPCM-X calculations on methane with certain solvents crash just after finishing the CPCM-X post-SCF solvation evaluation SCF iterations.

 -------------------------------------------------
  |      CPCM-X post-SCF solvation evaluation       |
 -------------------------------------------------

 iter      E             dE          RMSdq      gap      omega  full diag
   1     -4.2264158 -0.422642E+01  0.137E-02   15.60       0.0  T
   2     -4.2264164 -0.561220E-06  0.400E-04   15.60     111.9  T
   3     -4.2264164 -0.346902E-09  0.767E-05   15.60     583.0  T
     SCC iter.                  ...        0 min,  0.000 sec
     gradient                   ...        0 min,  0.000 sec
free(): invalid next size (fast)

To Reproduce
Run a xtb meth.sdf --cpcmx <solvent> with seemingly any other solvent, but water. I have at least seen this for acetonitrile, toluene, and benzene.

(Had to upload as txt)
meth_out.txt
meth_sdf.txt

Expected behaviour
Should run successfully consistently.

Additional context
Seems to be related to this other issue #1049. But in their case, they compiled with gfortran/gcc, while I used ifort/gcc on Linux and ifort/msvc on Windows.

Interestingly, the failure is somewhat sporadic and even subtle changes to the calculation can make it go away. For example, if I use -cpcmx in my submission, the output file warns about using a single dash, but the calculation actually proceeds to completion:
single_dash_meth_out.txt

On Windows, its even more sporadic, where if I run it repeatedly from the restart file, it will sometimes fail and sometimes not.

It doesn't seem to be related to the number of threads; while the attached outputs were run without OMP_NUM_THREADS or MKL_NUM_THREADS set, I reran these multiple times with both of these environment variables set to 1 and this did not resolve the failures.

@TyBalduf TyBalduf added the unconfirmed This report has not yet been confirmed by the developers label Oct 9, 2024
@corinwagen
Copy link

agreed that this seems related. running in verbose mode has suppressed the issue for us... which is weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed This report has not yet been confirmed by the developers
Projects
None yet
Development

No branches or pull requests

2 participants