climlab / climlab-rrtmg

MIT License
7 stars 4 forks source link

Windows builds are failing #11

Open brian-rose opened 2 years ago

brian-rose commented 2 years ago

As of last week, all the Windows builds are failing, e.g. https://github.com/climlab/climlab-rrtmg/actions/runs/2573863846

Haven't started to look at why.

brian-rose commented 2 years ago

The failure occurs after the build step and during the import climlab_rrtmg step:

Run python -c "import climlab_rrtmg"
[2](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:2)
  python -c "import climlab_rrtmg"
[3](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:3)
  python -c "from climlab_rrtmg import rrtmg_lw, rrtmg_sw"
[4](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:4)
  shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.EXE -command ". '{0}'"
[5](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:5)
  env:
[6](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:6)
    CONDA: C:\Miniconda3
[7](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:7)
    CONDA_PKGS_DIR: C:\Users\runneradmin\conda_pkgs_dir
[8](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:9)
Traceback (most recent call last):
[9](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:10)
  File "<string>", line 1, in <module>
[10](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:11)
  File "D:\a\climlab-rrtmg\climlab-rrtmg\climlab_rrtmg\rrtmg_lw\__init__.py", line 2, in <module>
[11](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:12)
    from ._rrtmg_lw import *
[12](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:13)
ImportError: DLL load failed while importing _rrtmg_lw: The specified module could not be found.
[13](https://github.com/climlab/climlab-rrtmg/runs/7086194845?check_suite_focus=true#step:6:14)
Error: Process completed with exit code 1.
brian-rose commented 2 years ago

In #13 I tried removing the Windows compiler step

echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg

(which used to be necessary)

Get exactly the same failure as above.

Something must have changed upstream so that a different configuration command is necessary. That's as far as I've gotten.

brian-rose commented 2 years ago

I may be clueing into the fact that, although we include flang in the environment, we are not actually using it for the f2py build. Instead using some version of mingw that is pre-installed on the Windows runner.

May need to include some code to instruct f2py to use flang instead.

dorrih commented 1 year ago

Hello, I see that this issue is open since July 2022. I tried to build today (end of June 2023), and the build was successful (no indication of any warning or error), but the tests fail (missing dll's). Is there any news about this issue? Thank you

brian-rose commented 1 year ago

No news, sorry. Unfortunately I don't use windows myself so I have very little useful knowledge about how to solve this. I would love some help!

There are working binaries available on conda-forge though, so most users don't need to build from source.

dorrih commented 1 year ago

Thank you very much for the quick reply and for this remarkable project. I can just as well attempt a build on wsl (Ubuntu emulator). Would that work? Are there instructions for building there?

On Wed, Jun 28, 2023, 18:01 Brian Rose @.***> wrote:

No news, sorry. Unfortunately I don't use windows myself so I have very little useful knowledge about how to solve this. I would love some help!

There are working binaries available on conda-forge though, so most users don't need to build from source.

— Reply to this email directly, view it on GitHub https://github.com/climlab/climlab-rrtmg/issues/11#issuecomment-1611608038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3S4IOT3FXIKLBPPT5GXTTXNRBLTANCNFSM52WL73HQ . You are receiving this because you commented.Message ID: @.***>

brian-rose commented 1 year ago

You could try following these build instructions and use ./ci/requirements-linux.yml. I would be curious to hear if it works.

dorrih commented 1 year ago

I followed the instructions on a WSL (ubuntu emulator on Windows) and it seems to work. The tests passed successfully. Thank you

On Wed, Jun 28, 2023 at 6:21 PM Brian Rose @.***> wrote:

You could try following these build instructions https://github.com/climlab/climlab-rrtmg#building-from-source and use ./ci/requirements-linux.yml. I would be curious to hear if it works.

— Reply to this email directly, view it on GitHub https://github.com/climlab/climlab-rrtmg/issues/11#issuecomment-1611640128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3S4II3KNPE7OSBV76PVU3XNRDXFANCNFSM52WL73HQ . You are receiving this because you commented.Message ID: @.***>

brian-rose commented 1 year ago

Great! Thanks @dorrih for reporting this workaround.