Open Luca-ggmb opened 3 years ago
I often get a ton of those warnings. These come from compiling the underlying Fortran code (IRI, MSIS, etc.) so it's not something we can control unfortunately.
The first issue regarding iri_sub is more critical and likely implies that IRI did not install correctly.
It looks like you used python2 to install but your local Python is running 3.8. Maybe that's (part of) the issue?
I have the same issue, can't get pyglow running.
ImportError: cannot import name 'iri_sub' from 'iri12py' (/home/mag-proc/.local/lib/python3.8/site-packages/iri12py.cpython-38-x86_64-linux-gnu.so
It's definitely installed in the correct Python 3.8 path. So what happened?
Does anything in the long installation output look like a fatal error during the IRI install? If the .so was created, it seems like it installed. If you can attach the log here I could see if anything pops out to me.
Did IRI16 install ok?
Ok, I found the reason. I was using Numpy 1.21. It seems something has changed from 1.20 to 1.21. f2py_rout_iri12py_iri_sub is missing in the new f2py compilation. Obviously the f2py interface is not included in the library and that's the reason why it's not being seen during Python import of pyglow. It is reproducible and concerns also IRI16. Maybe you could check that. I don't see errors during compilation and libraries are created and installed as expected. Maybe I have overseen something. Only the f2py interface is absent. It would be nice to use Pyglow also with most recent Numpy versions.
It would be nice to use Pyglow also with most recent Numpy versions.
I think this is actually critical. I'm changing the name of this issue to reflect this. Thanks for tracking this down. (And open to PRs or any tips)
Is there any progress on that issue?
It would be nice to use Pyglow also with most recent Numpy versions.
I think this is actually critical. I'm changing the name of this issue to reflect this. Thanks for tracking this down. (And open to PRs or any tips)
Is there any progress on that topic?
No progress yet. I'm very open to ideas and PRs.
@Vaylyn reports that pyglow is also incompatible with numpy 1.22, so it appears this problem will not solve itself. This is probably pyglow's most critical issue at this time.
Same issue encountered: can be fixed temporarily by including a version constraint in numpy in the requirement.txt
file
Confirmed pyglow works on python 3.9 but not on 3.10 since numpy 1.20 is only compatible up to python 3.9
The cause are the COMMON blocks in the signature file sig_file_patched.pyf. Obviously f2py (>v1.20, exactly crackfortran.py) has some trouble with compiling that. If one comment out the COMMONs compilation runs smoothly. What also seems to work is to modify the end of the enclosing data block: END BLOCK DATA -> END BLOCKDATA. Just simply remove the space between BLOCK and DATA and f2py is happy. ENDBLOCKDATA works too. Maybe one could add a patch for Pyglow until Numpy gets fixed. I also reported an issue to Numpy bug tracker.
I have managed to install pyglow with all the .so files appearing in the respective dl_models folders. After installing the python package I have tried to import into a Jupyter notebook and get the following error message:
cannot import name 'iri_sub' from 'iri12py' (/home/s1637615/.local/lib/python3.8/site-packages/iri12py.cpython-38-x86_64-linux-gnu.so)
Is this an issue with installation?
Also, when i executed the
python2 setup.py install --user
command hundreds of the following warnings came up:`Warning: Array reference at (1) is out of bounds (68 > 1) in dimension 1 src/pyglow/models/dl_models/hwm93/hwm93_modified.f:715:27:
715 | $ (PB(53)BT(3,2)+PB(99)BT(5,2)+PB(68)*BT(7,2))`
Is the best option to reinstall?
Thanks, Luca