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

galaxy_galaxy_lensing_cls Stuck for Specific Redshift Range and Resolution Combinations with include_all_correlations=True #10

Open
nikosarcevic opened this issue Nov 5, 2024 · 1 comment

Comments

@nikosarcevic
Copy link
Collaborator

nikosarcevic commented Nov 5, 2024

Description:
When running the galaxy_galaxy_lensing_cls method with include_all_correlations=True, the computation does not start for specific combinations of redshift_max and redshift_resolution. The process appears to be stuck, with no output or error message, and does not proceed with any calculations. This issue is specifically observed when all correlation pairs are included, but the method runs without issues if include_all_correlations=False.

Parameters Triggering the Issue:
The issue occurs for the following parameter combinations (and potentially others):

  • redshift_max = 3.4, redshift_resolution = 800
  • redshift_max = 3.3, redshift_resolution = 350

Expected Behavior:
The galaxy_galaxy_lensing_cls method should calculate the angular power spectra (Cls) for all pairs of lens and source bins when include_all_correlations=True, just as it does when include_all_correlations=False for specific pairs.

Steps to Reproduce:

  1. Set up the DataVectors instance with:
    redshift_max = 3.4
    redshift_resolution = 800 
    # or try these
    # redshift_max = 3.3
    # redshift_resolution = 350  
    forecast_year = "10"
    presets = Presets(redshift_max=redshift_max,
                     redshift_resolution=redshift_resolution,
                     forecast_year=forecast_year)
     dv = DataVectors(presets)
    
     ggl_cls = dv.galaxy_galaxy_lensing_cls(include_all_correlations=True)
  2. Call galaxy_galaxy_lensing_cls(include_all_correlations=True).
  3. Observe that the method does not start calculating Cls and does not produce output.

Observations:

  • The method works fine with other combinations of redshift_max and redshift_resolution, such as redshift_max=4 and redshift_resolution=550.
  • Setting include_all_correlations=False allows the computation to complete without issues for the affected redshift_max and redshift_resolution combinations, suggesting the problem may be specific to certain pairs of bins or the total number of pairs being calculated.

Possible Causes:
The problem may be related to:

  • Numerical instabilities or memory limitations when using a high redshift resolution over a broad range.
  • Issues in ccl.angular_cl when calculating certain combinations of closely spaced redshift bins.
  • High computational complexity when all correlation pairs are included.

Environment:

  • pyccl version: 2.8.0
  • Python version: Python 3.11.5
  • Operating System: macOS 15.1 BuildVersion 24B83

Additional Information:
Debugging outputs show that the code fails to initiate calculations or print statements within the loop for the affected parameter combinations. There is no indication of memory overflow or warnings from ccl.angular_cl, which suggests the issue may lie in initialization when all correlations are requested.

@nikosarcevic
Copy link
Collaborator Author

update: the issue disappears for me when I switch to ccl v3.0.3 BUT the gsl integration error warning is present. this needs to be investigated.

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

1 participant