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

Shapely patch for metrics with cdat #1093

Merged
merged 6 commits into from
May 2, 2024
Merged

Shapely patch for metrics with cdat #1093

merged 6 commits into from
May 2, 2024

Conversation

acordonez
Copy link
Collaborator

The PMP build is failing in conda-forge (conda-forge/pcmdi_metrics-feedstock#30) due to a segmentation fault that occurs on running driver_monsoon_sperber.py --help. I reproduced the issue locally, and using the faulthandler module I found that the issue is coming from the shapely library. I've added a temporary import shapely statement to the driver_monsoon_sperber.py code which occurs before any cdat packages are imported. Once these cdat packages are removed, the import shapely statement and related qa flags can be removed. This fix removes the segmentation fault.

@acordonez acordonez requested review from lee1043 and bosup May 2, 2024 16:18
@acordonez
Copy link
Collaborator Author

@bosup Just tagging you here as an FYI since you're working on the xCDAT update for monsoon sperber.

@acordonez acordonez self-assigned this May 2, 2024
Copy link
Contributor

@lee1043 lee1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acordonez thank you for the patch. I believe this was cdms related issue and shapely can be removed once we no longer import cdms utilities. Is that correct?

To deploy the updated, would it be efficient to release minor version patch -- 3.4.1?

@acordonez
Copy link
Collaborator Author

@lee1043 Yes that is correct. So Bo's work would not need to include this import because he is removing all cdms references.

A minor release would be perfect.

@acordonez
Copy link
Collaborator Author

@lee1043 I'm going to run through the rest of the --help calls locally just to make sure none of the other drivers are having this issue.

@acordonez
Copy link
Collaborator Author

@lee1043 I found that the precip distribution driver and enso driver would also fail with this issue, and I've added the shapely imports there as well. These imports can all be removed when cdat is removed from those drivers.

I also noticed that the monsoon_wang_driver.py is not included in setup.py. Is that new?

@acordonez acordonez changed the title Shapely patch for monsoon sperber Shapely patch for metrics with cdat May 2, 2024
@lee1043
Copy link
Contributor

lee1043 commented May 2, 2024

@acordonez thank you for the adds!

I don't think monsoon_wang metrics has been fully incorporated and tested with the current PMP setup (@gleckler1 please correct me if I am wrong), but @bosup will work on it with its xCDAT conversion. So, for now I think it is okay to not include monsoon_wang_driver.py in setup.py.

@lee1043 lee1043 added this to the 3.4.1 milestone May 2, 2024
@acordonez acordonez merged commit 3202b9e into main May 2, 2024
5 checks passed
@acordonez acordonez deleted the ao_sperber_patch branch May 2, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants