You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any plans to use conda, or another packaging tool to distribute and install MODFLOW binaries? I would be willing to give this a shot to make the binaries available through conda-forge.
@langevin-usgs, my thought was to create recipes using the conda-build compiler toolchains to compile for each platform from source. I’m not sure, but it may be possible to pull them directly from this repo.
Having looked at https://github.com/conda-forge/modflow6-feedstock for a few weeks, I can say that the conda-forge ecosystem is not that great, as it has old and unmaintained Fortran compilers. (Only Linux has modern compilers on conda-forge). Until there are better Fortran compilers, I don't think conda is a suitable platform to build and distribute Fortran-based applications for all platforms.
I'm planning to submit a PR for a simple Python script that could install executables using the Releases API, which would replace the manual "choose download", "click download", "unzip to folder" steps in a command-line fashion.
With the advent of pixi it would be interesting to see if it could be viable to expose the executables via a conda feedstock. Pixi is a (very fast!) conda replacement with decent pypi integration, mostly based around conda-forge, but more importantly creates a lock file with the current versions that are installed in a project specific environment. This can then be committed to version control to allow reproducibility of conda environments (also cross platform!). Should these executables be installable via conda-forge this would allow projects to pin the exact set of binaries used, and then requiring only a pixi install to recreate the project with the same binaries.
It is already possible to pin the version in pixi using a task that calls get-modflow to download the executables which is then set as a dependency of the tasks that use the executables, but that feels a little hacky and requires to run that task at least once before the environment can be used.
We have already begun to use pixi internally for MF6 development, indeed. And we have started to investigate putting MF6 on conda forge as well. I am not directly involved in the latter but AFAIK the main challenge is to find a compatible compiler in the conda ecosystem, the GCC available is too old and flang still seems too immature.
would it be possible to, instead of building on conda forge, to keep the current build train, but make a conda feedstock that exposes the precompiled binaries that currently reside on this repo? The conda build would then only need to download and extract the zip, and wrap it in a conda package such that they are automatically extracted to the correct location in the environment.
@Hugovdberg At first, I thought this might not pass the initial conda-forge submission due to potential malware risks. However, it's similar to the Panoply feedstock (https://github.com/conda-forge/panoply-feedstock), where we add a JDK dependency, download pre-compiled Java classes from NASA (https://www.giss.nasa.gov/tools/panoply/download), and create scripts to run the JAR files. So, I think it could possible. And since you're a member of conda-forge you may be able to approve the initial submission yourself.
UPDATE: The latest version of gfortran available on conda-forge (14.2.0) successfully compiles and runs the latest release of MODFLOW 6 (6.6.0) on Windows. However, the default Fortran compiler for Windows specified in conda-forge ({{ compiler('fortran') }}) is flang 5.0.0 (as defined in conda-forge-pinning-feedstock), which is unable to compile MODFLOW 6 (6.6.0).
The current conda-forge build of MODFLOW 6 can be found at modflow6-feedstock.
Activity
christianlangevin commentedon Jul 13, 2019
@jentjr, how would this work? Would the installer just pull them out of this repo? Or would it actually handle the compiling as well?
jentjr commentedon Jul 14, 2019
@langevin-usgs, my thought was to create recipes using the conda-build compiler toolchains to compile for each platform from source. I’m not sure, but it may be possible to pull them directly from this repo.
mwtoews commentedon Jul 7, 2022
Having looked at https://github.com/conda-forge/modflow6-feedstock for a few weeks, I can say that the conda-forge ecosystem is not that great, as it has old and unmaintained Fortran compilers. (Only Linux has modern compilers on conda-forge). Until there are better Fortran compilers, I don't think conda is a suitable platform to build and distribute Fortran-based applications for all platforms.
I'm planning to submit a PR for a simple Python script that could install executables using the Releases API, which would replace the manual "choose download", "click download", "unzip to folder" steps in a command-line fashion.
wpbonelli commentedon Dec 15, 2022
@jentjr the
get-modflowtool contributed by @mwtoews is included with FloPy3.3.6released today, there is more info herejentjr commentedon Dec 16, 2022
Great. Thank you!
Hugovdberg commentedon Jan 14, 2025
With the advent of pixi it would be interesting to see if it could be viable to expose the executables via a conda feedstock. Pixi is a (very fast!) conda replacement with decent pypi integration, mostly based around conda-forge, but more importantly creates a lock file with the current versions that are installed in a project specific environment. This can then be committed to version control to allow reproducibility of conda environments (also cross platform!). Should these executables be installable via conda-forge this would allow projects to pin the exact set of binaries used, and then requiring only a
pixi installto recreate the project with the same binaries.It is already possible to pin the version in pixi using a task that calls
get-modflowto download the executables which is then set as a dependency of the tasks that use the executables, but that feels a little hacky and requires to run that task at least once before the environment can be used.wpbonelli commentedon Jan 14, 2025
We have already begun to use pixi internally for MF6 development, indeed. And we have started to investigate putting MF6 on conda forge as well. I am not directly involved in the latter but AFAIK the main challenge is to find a compatible compiler in the conda ecosystem, the GCC available is too old and flang still seems too immature.
Hugovdberg commentedon Jan 14, 2025
would it be possible to, instead of building on conda forge, to keep the current build train, but make a conda feedstock that exposes the precompiled binaries that currently reside on this repo? The conda build would then only need to download and extract the zip, and wrap it in a conda package such that they are automatically extracted to the correct location in the environment.
wpbonelli commentedon Jan 14, 2025
@scharlton2
scharlton2 commentedon Jan 14, 2025
@Hugovdberg At first, I thought this might not pass the initial conda-forge submission due to potential malware risks. However, it's similar to the Panoply feedstock (https://github.com/conda-forge/panoply-feedstock), where we add a JDK dependency, download pre-compiled Java classes from NASA (https://www.giss.nasa.gov/tools/panoply/download), and create scripts to run the JAR files. So, I think it could possible. And since you're a member of conda-forge you may be able to approve the initial submission yourself.
scharlton2 commentedon Jan 23, 2025
UPDATE: The latest version of
gfortranavailable on conda-forge (14.2.0) successfully compiles and runs the latest release of MODFLOW 6 (6.6.0) on Windows. However, the default Fortran compiler for Windows specified in conda-forge ({{ compiler('fortran') }}) isflang5.0.0 (as defined in conda-forge-pinning-feedstock), which is unable to compile MODFLOW 6 (6.6.0).The current conda-forge build of MODFLOW 6 can be found at modflow6-feedstock.