GithubHelp home page GithubHelp logo

Install with conda about schism HOT 35 CLOSED

schism-dev avatar schism-dev commented on July 17, 2024
Install with conda

from schism.

Comments (35)

brey avatar brey commented on July 17, 2024 2

Hi All. I have sorted out the issues with CMAKE and METIS/PARMETIS. The conda recipe avoids compiling the local library and uses the conda-forge version.

You can get both pschism and pschism-wwm with

conda install -c gbrey pschism=5.9

or

conda install -c gbrey pschism-wwm=5.9

However, I am having an issue with the wwm flavor on Linux (it compiles nicely on osx). I have traced the problem to the definition of constants in OPENMP. See https://stackoverflow.com/questions/63016641/cant-support-both-openmp-v4-and-v5-in-gcc.

Apparently such an issue doesn't affect clang that is why it works on osx. Let me know if you've seen this issue and how, in your opinion, should be addressed.

from schism.

brey avatar brey commented on July 17, 2024 2

I have pushed the final conda recipe. It includes instructions on how to build ones own package. At this point, I think it's better if the interested users build their own package with their own configuration. If the complexity of the modules/models improves or a way to initiate them in run time is developed we can consider conda-forge.

I don't believe there is a graceful way to build all the variants in conda-forge currently. Maybe also conda will offer some new ways going forward.

from schism.

jreniel avatar jreniel commented on July 17, 2024 1

FYI, if you want to deploy SCHISM anywhere and make sure it uses with modules then you can use any of these links:

https://github.com/jreniel/schism_deploy_v5.8.0
https://github.com/jreniel/schism_deploy_v5.9.0
https://github.com/jreniel/schism_deploy_master

from schism.

platipodium avatar platipodium commented on July 17, 2024 1

@gbrey Thanks for the update.

  • Yes, I think you should submit to conda-forge.
  • If needed, I can be a secondary maintainer.
  • Yes, we need OLDIO for all versions, as we need single-processor capability. (I know you can circumvent this with --oversubscribe, but that is much slower)

from schism.

platipodium avatar platipodium commented on July 17, 2024

I would like a conda install possibility, but be aware that conda is not recommended on HPC systems (we recently removed it from ours), see e.g. https://docs.computecanada.ca/wiki/Anaconda/en.

Also, with the current strategy of most dependencies resolved in-tree, the dependency management is not (yet) too complicated (mostly netcdf). This could become a more pressing issue if we get Joseph to accept more relying on external dependencies .. :=).

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

I think George B. also mentioned the possibility of conda install.

Too bad conda is now blacklisted as we are moving in that direction.

from schism.

jreniel avatar jreniel commented on July 17, 2024

Not being able to use conda is inconvenient, but not a game changer, as you are still allowed to use virtualenv. The main difference would be that with with virtualenv you might need to satisfy some dependencies manually, something that we still have to do anyways when we provision a machine with the SCHISM binaries.

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

Good to know; thx Jaime.

from schism.

brey avatar brey commented on July 17, 2024

Dear All, I do agree that for a production HPC env it would make sense to have a module based installation for efficiency but, in my opinion, for development and prototyping nothing beats the simplicity of conda. Having the same configuration on the HPC and my laptop (where the dev is happening) within minutes without the need of Admin rights is very productive. I am using conda on our HPC since I couldn't get SCHISM compiled with the available modules and I am only doing test runs anyway. Your mileage may vary. The above referenced conda command installs the 4.8 tagged version and works for me (let me know if you have any problems). It would take some efforts to have all options configured though. I have compiled mine with mpich but we need to have one with OpenMP as well. Not to mention all the variants of SCHISM modules. I will make a pull request with the conda recipe files asap.

from schism.

brey avatar brey commented on July 17, 2024

I am working in finalising the conda recipe. May I reiterate the possibility of having the metis/parmetis dependency covered independently from a stand alone installation.

Both packages are available in conda.

Any reason why they need to be included in the build process?

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

brey avatar brey commented on July 17, 2024

In that case, any ideas on how to mask the compilation of the local Metis folder from CMake (not my strong point)?

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

jreniel avatar jreniel commented on July 17, 2024

Not my strong point either, but my intuition tells me that you probably still need the parmetis headers to compile schism, and of course, they have to match whatever binary version is being bootstrapped through conda. Since you still need the parmetis headers, and since the parmetis source code is bundled inside the schism source code, doing full parmetis compilation might actually be better than using a conda one. In any case, it's your choice, it depends how much you want to leverage "flexibility" against complexity.

In any case, I think it might be possible to bootstrap the conda metis lib, as long as the headers used match versions (I'm not sure if conda will distribute the headers along with the binaries though, which would technically be the safest route). I would just compile the provided metis as part of the schism-conda recipe, but that's just me...

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

jreniel avatar jreniel commented on July 17, 2024

is the subject of this to compile parmetis and not metis or is the subject to drop the whole library.

The subject is whether the conda recipe should use the precompiled version that exists in the conda repo, or should it compile the one included with SCHISM. Technically you can do either, the question is what you gain and lose from chose one or the other. I don't think dropping the whole library is part of the conversation (I don't think that's even possible, since parmetis obviosuly plays a critical role!)

Easy and safe is to compiled the one bundled. Using the conda one would probably require to find and match the correct version of the headers, so while doable, might be more complicated than simply compiling the one provided.

One thing we discussed in the burst of activity around moving to GitHub was the possibility of automatically downloading parmetis if its location isn't named. I believe this required a version bump. I guess it isn't a very powerful idea though while the library is housed inside the schism source code.

I remember these conversations, and while we flirted with the idea of downloading on the fly, now that I have more experience, I think it is better to just keep it in the source code (for simplicity). But there are other formal alternatives, most notably git subtrees, which I would suggest to talk about in the event that we need to change the Parmetis version in the future.

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

jreniel avatar jreniel commented on July 17, 2024

FYI This isn't Eli talking. He hasn't actually responded. Eli probably knows by memory which CMake variables need to be overridden for using conda parmetis. I would have to dig a little to find them, but through CMake variables you certainly can override which Parmetis gets used.

from schism.

platipodium avatar platipodium commented on July 17, 2024

Thanks for the update. I think that we should deprecate the use of gcc < 9 / OpenMP < 5. The current stable version is 11, with version 12 expected in April 2021.

from schism.

jamal919 avatar jamal919 commented on July 17, 2024

However, I am having an issue with the wwm flavor on Linux (it compiles nicely on osx). I have traced the problem to the definition of constants in OPENMP. See https://stackoverflow.com/questions/63016641/cant-support-both-openmp-v4-and-v5-in-gcc.

Do you think #57 relates to this problem?

from schism.

platipodium avatar platipodium commented on July 17, 2024

@gbrey what is the status of the conda deployment?

from schism.

brey avatar brey commented on July 17, 2024

@platipodium I think it's done. I was wondering if there is a need to have the OLD IO option even with >5.10 but I think that having the 5.9 version should be enough. You can test both versions on my channel with

conda install -c gbrey pschism=5.10*=mpi_openmpi*
conda install -c gbrey pschism=5.10*=mpi_mpich*
conda install -c gbrey pschism=5.9*=mpi_openmpi*
conda install -c gbrey pschism=5.9*=mpi_mpich*

and

conda install -c gbrey pschism-wwm=5.10*=mpi_openmpi*
conda install -c gbrey pschism-wwm=5.10*=mpi_mpich*
conda install -c gbrey pschism-wwm=5.9*=mpi_openmpi*
conda install -c gbrey pschism-wwm=5.9*=mpi_mpich*

depending on your MPI flavour. I will do a last check and then I will push a PL to the repo and also one in the conda-forge channel if no one has an objection.

In fact someone should also be admin/maintainer on conda-forge besides me. Any volunteers?

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

brey avatar brey commented on July 17, 2024

@platipodium Keeping the OLDIO option creates a problem.

Currently there are 2 binaries (TVD-LD and WWM) and 2 MPI options (mpich and openmpi). Thus the 4 total versions/release above. However, if we include the OLDIO as an option it would create 8 versions and most importantly a naming issue. How are we going to call the OLDIO packages?

pschism, pschism-oldio
pschism-wwm, pschism-wwm-oldio

This will create some confusion. Is running on one core a long term requirement?

In fact, this is relevant to a more general question: How many conda versions we want to release (in terms of modules)? If there are many, the OLDIO option will increase the number. Ideally, the best option would be to have one binary and invoke the modules in runtime. Is this doable?

Also, maybe there is a way to speed up --oversubscribe.

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

brey avatar brey commented on July 17, 2024

Thanks Joseph. How about using only OpenMP and multithreading for running on one core without oversubscribing?

from schism.

platipodium avatar platipodium commented on July 17, 2024
  1. Hmm, I think we need to find a way to deal with multiple options. OLDIO is only one of them, WWM, TVD-VL, FABM, GEN and any of the others could also be relevant. In principle conda should be able to handle this, but I am no expert on the variants.

There could be a default variant
pschism (using openmpi, OLDIO=OFF and TVD-VL=SB, or any other)

And then many variants with positive selection in any way conceivable....
pschism+FABM+OLDIO+WWM+SB
pschism+VL+WWM+GEN+ICM+MPICH

We can use CD to create all of them and the respective conda packages.

  1. Not providing MPI (in both flavours openmpi/mpich) would deter users who need that capability, not offering single-processor options would deter first-timers or people who'd like to try the system or who have simple test cases.

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

brey avatar brey commented on July 17, 2024
not offering single-processor options would deter first-timers or people who'd like to try the system or who have simple test cases.

I am not sure I get this. Every computer now is multicore. So testing the code on a simple case, even with MPI, and at minimum 2 cores shouldn't be a problem. If you output a large number of vectors this could be an issue for, say, an 8 core laptop but this gets very specific.

Note that coda installation is good enough for prototyping but not necessarily for production (side note, @pmav99 achieved extremely good latency with a conda implementation on Azure HPC with InfiniBand) .

In addition, conda provides automatically the MPI without any issues for the user. I remember you've mentioned multiple 1 core experiments with FABM. Those become now 2+ cores experiments which is an issue but I would say poses no big constraint for a new user testing stuff. It would, however, require more resources for scaling up.

Did I miss something?

Another option would be to update the code on the 5.9 branch differentiating between OLDIO and the new one on the semantic versioning. I am not sure though if this is the right approach going forward.

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

Issue resolved per @brey

from schism.

brey avatar brey commented on July 17, 2024

Dear All, I am trying to finalise the matrix of binaries that will be offered via conda. From the cmake files, I have:

#   Algorithm choices
# TVD_LIM must be one of SB, VL, MM or OS for Superbee, Van Leer, Minmod, or Osher.")
set (TVD_LIM VL CACHE STRING "Flux limiter")
#Turn OLDIO off to use the new scribe based I/O
set (OLDIO OFF CACHE BOOLEAN "Old nc output (each rank dumps its own data)")
set (PREC_EVAP OFF CACHE BOOLEAN "Include precipitation and evaporation calculation")
set (USE_GOTM OFF CACHE BOOLEAN "Use GOTM turbulence model. This just enables the build -- GOTM must still be selected in param.nml")
set (USE_HA OFF CACHE BOOLEAN "Enable harmonic analysis output modules")   # Not implemented yet
set( USE_MARSH OFF CACHE BOOLEAN "Use marsh module")

#   Enable/Disable Modules
set( USE_SED2D OFF CACHE BOOLEAN "Use 2D sediment module")
set( USE_WWM OFF CACHE BOOLEAN "Use wind-wave module")
set( USE_ICE OFF CACHE BOOLEAN "Use ICE module")

#Tracer models
set( USE_GEN OFF  CACHE BOOLEAN "Use generic tracer module")
set( USE_AGE OFF  CACHE BOOLEAN "Use age module")
set( USE_ECO OFF   CACHE BOOLEAN "Use ECO-SIM module")
set( USE_ICM OFF   CACHE BOOLEAN "Use ICM module")
##pH model is active only if ICM is on
set( ICM_PH OFF   CACHE BOOLEAN "Use pH module inside ICM")
set( USE_COSINE OFF   CACHE BOOLEAN "Use CoSiNE module")
set( USE_FIB OFF   CACHE BOOLEAN "Use fecal indicating bacteria module")
set( USE_SED OFF    CACHE BOOLEAN "Use sediment module")
set( USE_FABM OFF  CACHE BOOLEAN "FABM BGC model interface")

set (DEBUG OFF CACHE BOOLEAN "Enable diagnostic output")
set (USE_ANALYSIS OFF CACHE BOOLEAN "Enable (somewhat costly) derviation of derived flow/stress quantities")

Q1. What are the options for TVD_LIM? I am bit confused with OS.
Q2. Are all module options compatible between them? That is, do all possible combinations of SED2, WWM & ICE work and therefore should be offered?
Q3. Should there be only one tracer model available per binary or more tracer modules can be present?
Q4. Same as Q2 for PH, COSINE, FIB, SED (different from SED2?) and FABM.

In a nutshell, if you can provide a matrix of the combinations we should provide, I can finalise the conda recipe.

from schism.

platipodium avatar platipodium commented on July 17, 2024

Hmm, I see how this could be very confusing for users who want to "Just download SCHISM". How about providing those that we (whoever) frequently use. My personal list is as matrix of all combinations of [SB, OLDIO, FABM, GEN]

from schism.

josephzhang8 avatar josephzhang8 commented on July 17, 2024

from schism.

platipodium avatar platipodium commented on July 17, 2024

Out of curiosity, how do you provide your own channel -c gbrey ?

from schism.

brey avatar brey commented on July 17, 2024

https://docs.anaconda.com/anacondaorg/user-guide/tasks/work-with-packages/#uploading-packages

from schism.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.