crest-lab / crest

CREST - A program for the automated exploration of low-energy molecular chemical space.
https://crest-lab.github.io/crest-docs/
GNU Lesser General Public License v3.0
182 stars 42 forks source link

segfault with Intel OneAPI 2022.2.1 #238

Closed sassy-crick closed 7 months ago

sassy-crick commented 7 months ago

I am experiencing a segfault, when running a simple input file a user provided, with the Intel OneAPI version 2022.2.1 (ifort (IFORT) 2021.7.1 20221019, icc (ICC) 2021.7.1 20221019):

$ crest  C5H12.xyz
       ==============================================
       |                                            |
       |                 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 C5H12.xyz

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
libpthread-2.31.s  00007F8F78E91140  Unknown               Unknown  Unknown
crest              00000000006A8850  Unknown               Unknown  Unknown
crest              00000000006A818F  Unknown               Unknown  Unknown
crest              0000000000685BDB  Unknown               Unknown  Unknown
crest              0000000000684AEB  Unknown               Unknown  Unknown
crest              00000000004A5B26  Unknown               Unknown  Unknown
crest              000000000048EFE9  Unknown               Unknown  Unknown
crest              0000000000697037  Unknown               Unknown  Unknown
crest              000000000040652D  Unknown               Unknown  Unknown
libc-2.31.so       00007F8F78819D0A  __libc_start_main     Unknown  Unknown
crest              000000000040644A  Unknown               Unknown  Unknown

This does not happen when I am using GCC-12.2.0. I don't think it as anything to do with the way xtb got compiled, as swapping from Intel to GCC compiled versions do not create that segfault.

I am currently having an PR open with the EasyBuild project: PR #19148 As these compilers are quite new, is there a chance that could be fixed? Note: I was using the ifort, not the new ifx compiler, but the new icx compiler. So I think it would be useful for the future to address this issue.

Thanks.

sassy-crick commented 7 months ago

Just to add on this: I got the same issue even if I am going down to -O2, using -mavx2 and make sure I am using icc instead of icx. I hope that helps a bit. Thanks.

pprcht commented 7 months ago

Hello, I think you've picked one of the few recent oneAPI versions that wasn't able to compile the program. For a while we had the same issue and implemented a workaround (reverting to an older version) for the continuous release GitHub build exactly because of that. With even newer versions of oneAPI, Intel seems to have fixed whatever caused it. For example, I'm using oneAPI 2023.1.0 (ifort 2021.9.0 20230302) and have no issues. Luckily, we also were able to remove the workaround again. The meson build should work with both icc and icx.

sassy-crick commented 7 months ago

Thanks for your quick reply, much appreciated. I was somehow expecting that answer. Thing is: this program is only part of a whole set of programs I need to compile for a user so going back to a different compiler version is quite a bit of work, given how far I got so far. That said: it is good to see that it is all working with a newer release. I did not try that, simply due to time restrictions. I will close the issue as the resolution is to not use this particular Intel compiler version. Thanks again.