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

Test failure in recent numpy / python 3.9 versions #65

Open
gfabbian opened this issue Dec 21, 2022 · 1 comment
Open

Test failure in recent numpy / python 3.9 versions #65

gfabbian opened this issue Dec 21, 2022 · 1 comment

Comments

@gfabbian
Copy link
Collaborator

I have been trying to do a recent reinstall with a fresh environment using conda and MacOS Ventura. The following command installs an environment that still works.

conda create -n s4cmb-dev -c conda-forge python=3.7 camb openmpi ephem pyslalib jupyter healpy coverage coveralls mpi4py

However switching just the python version to 3.9 the compilation seems ok but there are multiple failures on the test level. The difference between the 2 environment in dumpy/f2py is the version that moves from 1.21 to 1.24.

**********************************************************************
File "/Users/gfabbian/Software/s4cmb-dev/s4cmb/s4cmb/tod.py", line 1321, in __main__.TimeOrderedDataPairDiff.tod2map
Failed example:
    for pair in tod.pair_list:
      d = np.array([tod.map2tod(det) for det in pair])
      tod.tod2map(d, m, gdeprojection=True)
Exception raised:
    Traceback (most recent call last):
      File "/Users/gfabbian/opt/anaconda3/envs/s4cmb-dev/lib/python3.9/doctest.py", line 1334, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest __main__.TimeOrderedDataPairDiff.tod2map[31]>", line 3, in <module>
        tod.tod2map(d, m, gdeprojection=True)
      File "/Users/gfabbian/Software/s4cmb-dev/s4cmb/s4cmb/tod.py", line 1406, in tod2map
        tod_f.tod2map_pair_f(
    tod_f.error: (shape(diff_weight, 0) == npix) failed for 14th argument npix: tod2map_pair_f:npix=139992

The behavior behavior seems connected to how f2py/numpy interpret data types with the current fortran code written in the repo. Suggestions welcome.

@JulienPeloton
Copy link
Owner

Thanks for the report! I opened a new PR to inspect this (#66). I'll keep you in touch.

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