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

Segmentation fault #8

Closed
jp78fr opened this issue Jan 15, 2024 · 5 comments
Closed

Segmentation fault #8

jp78fr opened this issue Jan 15, 2024 · 5 comments

Comments

@jp78fr
Copy link

jp78fr commented Jan 15, 2024

Hi,
I'm having small problems with the gcc version of Multiwfn. The compilers used are gcc and gfortran (version 13) installed with HomeBrew on a MacBook Air 2020 (Intel) and on a MacPro 2023 (M3 Pro chip).
On the Intel, the version with GUI (or without) stops on certain functions calculating a grid (e.g. 20 // 4 // 2) due to an error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x11b790aae
#1 0x11b78fc8d
#2 0x7ff800b0537c
#3 0x103ccb3d5
#4 0x103398bb9
#5 0x103aed80c
#6 0x103d8c754
#7 0x10306027f
#8 0x103065aa6
#9 0x7ff80074c385
zsh: segmentation fault

I have the same problem with the non-GUI version on M3. Same error also, when I install the version via HomeBrew.
In both cases, I initialized :
export OMP_STACKSIZE=64000000

IF, on my intel mac, I compile with OneAPi I don't have this problem. But I had to add -heap-arrays to the compilation options to avoid this type of error.
Could you give me an idea?

Thank you,
Jean-Pierre

@jp78fr
Copy link
Author

jp78fr commented Jan 15, 2024

I forgot, the installation or compilation is fine. The error is at runtime

@kjelljorner
Copy link
Collaborator

I'm not too familiar with this problem, but generally it would be that you run out of stack memory. Generally you cannot increase the OMP_STACKSIZE on Mac, but you would need to increase the size at compile time. You can maybe check out this issue and see if you can get something working?

grimme-lab/xtb#303

Here's a similar recipe.
https://github.com/awvwgk/homebrew-qc/blob/main/Formula/xtb.rb

@kjelljorner
Copy link
Collaborator

I cannot reproduce your problem even with a quite large calculation (286 MB molden file). Could you share the file that you are running?

@kjelljorner
Copy link
Collaborator

Have you set ulimit -s unlimited before launching Multiwfn?

@kjelljorner
Copy link
Collaborator

Closing this as fixed with the latest bug fix of Multiwfn and per our correspondence @jp78fr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants