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

Updated to 6.4.4 -- added windows build #31

Closed
wants to merge 19 commits into from

Conversation

scharlton2
Copy link
Contributor

@scharlton2 scharlton2 commented Feb 16, 2024

@conda-forge-admin, please rerender

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/modflow6-feedstock/actions/runs/7935584201.

@jdhughes-usgs
Copy link
Contributor

@scharlton2 It does not look like the windows build is starting on Azure

Copy link
Contributor

@jdhughes-usgs jdhughes-usgs left a comment

Choose a reason for hiding this comment

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

Work be good to add yourself (@scharlton2) as a maintainer.

recipe/meta.yaml Outdated

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/MODFLOW-USGS/modflow6/releases/download/{{ version }}/mf{{ version }}_linux.zip
sha256: 8dcd832f33f992a9935c473fc3d695aac9250d4b34c944e54a7d44122df8e876
sha256: a737521126efc3295b818acc951a745d7b914446836c7931b0b52998f3934e2d

build:
number: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Update the build number from 0 -> 1.

Sorry for not merging the previous PR before now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem

@scharlton2
Copy link
Contributor Author

@conda-forge-admin, please rerender

conda-forge-webservices[bot] and others added 3 commits February 16, 2024 23:02
@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [16, 17]

recipe/meta.yaml Outdated Show resolved Hide resolved
@mwtoews
Copy link
Member

mwtoews commented Feb 21, 2024

I've just checked compiling the latest modflow6 code locally on a Windows computer with m2w64-gcc-fortran, and I see the same error on CI:

ninja: Entering directory `D:/src/modflow6/_build'
[13/448] Compiling Fortran object src/libmf6core.a.p/Utilities_CharString.f90.obj
FAILED: src/libmf6core.a.p/Utilities_CharString.f90.obj src/libmf6core.a.p/characterstringmodule.mod
"gfortran" "-Isrc\libmf6core.a.p" "-Isrc" "-I..\src" "-Isrc\libmf6_external.a.p" "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-std=f2008" "-O0" "-g" "-fall-intrinsics" "-pedantic" "-cpp" "-Wcharacter-truncation" "-Wno-unused-dummy-argument" "-Wno-intrinsic-shadow" "-Wno-maybe-uninitialized" "-Wno-uninitialized" "-fcheck=all" "-ffpe-trap=overflow,zero,invalid" "-D_WIN32" "-Jsrc\libmf6core.a.p" -o src/libmf6core.a.p/Utilities_CharString.f90.obj "-c" ../src/Utilities/CharString.f90
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
[14/448] Compiling Fortran object src/libmf6core.a.p/Utilities_kind.f90.obj
ninja: build stopped: subcommand failed.

or simply with running a basic gfortran command:

D:\src\modflow6>gfortran -c src\Utilities\CharString.f90
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.

This is a compiler bug. It might be possible to investigate and "fix" modflow6 to work with this old gfortran version for Windows.

Unfortunately, I'm not yet aware of a more modern Fortran version for Windows in conda-forge. The only other Windows compiler is flang, and I've not had much success using it.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@mwtoews
Copy link
Member

mwtoews commented Feb 21, 2024

@conda-forge-admin, please rerender

@scharlton2
Copy link
Contributor Author

Sorry, didn't see your rerender

@mwtoews
Copy link
Member

mwtoews commented Feb 22, 2024

Doesn't seem to matter, it's the same old gfortran compiler bug. However I can confirm that at local build can be made by using the newer Fortran compilers:

mamba install conda-forge/label/m2w64-experimental::mingw-w64-ucrt-x86_64-gcc-fortran

this installs a modern gfortran (gcc 13.2.0) which works nicely with modflow6.

The challenge, which I see you've already made an attempt at, is to get this into the recipe...

@scharlton2
Copy link
Contributor Author

@scharlton2
Copy link
Contributor Author

scharlton2 commented Feb 22, 2024

Sorry again, just saw your latest comment

This worked on my local windows machine:

❯ micromamba env export --from-history

name: test2
channels:
- conda-forge
- conda-forge/label/m2w64-experimental
dependencies:
- conda-forge::meson
- conda-forge/label/m2w64-experimental::mingw-w64-ucrt-x86_64-gcc-fortran

But I couldn't figure out how to add the conda-forge/label/m2w64-experimental to the meta.yaml file

@mwtoews
Copy link
Member

mwtoews commented Feb 22, 2024

@conda-forge-admin, please rerender

@mwtoews
Copy link
Member

mwtoews commented Feb 22, 2024

Enabling the conda-forge/label/m2w64-experimental channel would be a good solution. I'm trying again, but I'm not sure if it's possible, see conda/conda-build#532

@scharlton2
Copy link
Contributor Author

We might be able to use recipe/conda_build_config.yaml to override channel resolution see .ci_support/README and recipe/conda_build_config

@scharlton2
Copy link
Contributor Author

@conda-forge-admin, please rerender

Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/modflow6-feedstock/actions/runs/8008118793.

Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/modflow6-feedstock/actions/runs/8008118319.

Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/modflow6-feedstock/actions/runs/8008120092.

Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/modflow6-feedstock/actions/runs/8008118952.

ie
Needed DSO Library/bin/api-ms-win-crt-environment-l1-1-0.dll
...
Needed DSO Library/bin/api-ms-win-crt-time-l1-1-0.dll
…-libgfortran to reqs/run

deps:
mingw-w64-ucrt-x86_64-libwinpthread-git
mingw-w64-ucrt-x86_64-gcc-libs
@scharlton2
Copy link
Contributor Author

@jdhughes-usgs, @mwtoews, @scopatz, and @Hofer-Julian if there are no objections, I think this PR is ready to go.

@mwtoews
Copy link
Member

mwtoews commented Feb 23, 2024

I'm doing a few things locally. With this PR, I'm able to use a minimal environment with conda-build and conda-verify, then run:

conda build path/to/recipe -c conda-forge/label/m2w64-experimental

(the -c channel arg is needed, otherwise an error is raised: "mingw-w64-ucrt-x86_64-gcc-fortran does not exist")

The local build and test appear to be successful. However,

mamba install --dry-run modflow6

has error:

Could not solve for environment specs
The following packages are incompatible
├─ m2-conda-epoch is installable and it requires
│  └─ msys2-conda-epoch <0.0a0 , which can be installed;
└─ modflow6 is not installable because it requires
   └─ m2w64-gcc-libs, which requires
      └─ msys2-conda-epoch 20160418 , which conflicts with any installable versions previously reported.

It might not be possible to install this package without adding/modifying channels.

@scharlton2
Copy link
Contributor Author

Thanks @mwtoews. I'll try building locally tomorrow.

@scharlton2
Copy link
Contributor Author

scharlton2 commented Feb 23, 2024

Sorry, just re-read your comment please ignore.

@mwtoews How did you build locally? Here's what I tried:

micromamba create -n modflow-local-build
micromamba activate modflow-local-build
micromamba install conda-build conda-verify
micromamba activate modflow-local-build
git clone [email protected]:scharlton2/modflow6-feedstock.git
cd modflow6-feedstock
git switch main-with-windows-build
python .\build-locally.py

choosing 6. win_64_ config yields:

selected win_64_
Traceback (most recent call last):
  File "C:\Users\charlton\source\repos\feedstocks\modflow6-feedstock\build-locally.py", line 106, in <module>
    main()
  File "C:\Users\charlton\source\repos\feedstocks\modflow6-feedstock\build-locally.py", line 87, in main
    verify_config(ns)
  File "C:\Users\charlton\source\repos\feedstocks\modflow6-feedstock\build-locally.py", line 61, in verify_config
    raise ValueError(
ValueError: only Linux/macOS configs currently supported, got win_64_

@scharlton2
Copy link
Contributor Author

Replaced by #33

@scharlton2 scharlton2 closed this Apr 30, 2024
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

Successfully merging this pull request may close these issues.

3 participants