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

Encountering segmentation fault while running PySM #161

Closed
erussier opened this issue May 23, 2023 · 4 comments
Closed

Encountering segmentation fault while running PySM #161

erussier opened this issue May 23, 2023 · 4 comments

Comments

@erussier
Copy link

I am having issues generating dust models (d10 and d12) with the PySM. In the following code “dust_bandpass.ipynb” which I run on NERSC Perlmutter through Jupyter, when I run the ### d9 cell it works fine. However, when I run the ###d10 cell or ###d12 cell, I get a segmentation fault.

This same code works for d10 and d12 when used by @1cosmologist, with the same version of the “pysm3” module so I don’t think the problem comes directly from the pysm.

I know that it appears when I execute this line: dustmap_10 = dust_10.get_emission(nus_in_GHz * u.GHz, transmission). But I cannot see what directly causes this segmentation fault, even with logging. When I don’t do the band integration (by removing “transmission” in the previous line), I still get the same segmentation fault.

I have tried to uninstall my conda environment and anaconda several times but I am still getting this segmentation fault.

These are the different ways I have been trying to install pysm on NERSC:

  1. Installing the pysm and my conda environment as said here and then doing a pip install to get the 3.4.0b8 version.

  2. Installing my conda environment and then installing pysm3 directly through pip

I am using python 3.9.16, numba 0.56.4, pip 23.0.1.

Do you have an idea of what could be generating this segmentation error?

@1cosmologist
Copy link

I can confirm that I too encounter a segmentation fault while running pysm3 get_emission for dust model d12 on NERSC Perlmutter, for the same code that runs on my Macbook. The versions installed on Perlmutter: numba = 0.56.4 and pysm = 3.4.0b8.

@zonca
Copy link
Member

zonca commented May 24, 2023

It is probably an issue with numba.
Try to disable threading with numba.
That is a environmental variable to set. You can find it in the documentation of numba or maybe pysm itself.

@zonca
Copy link
Member

zonca commented May 24, 2023 via email

@erussier
Copy link
Author

Thank you very much, I disabled threading with numba and it worked. Then, I created a new conda environment as shown in your post and I don't get a segmentation fault anymore. I'll close this issue.

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

3 participants