BAMresearch / FenicsXConcrete

MIT License
0 stars 2 forks source link

Set dolfinx version to 0.6.0 #144

Closed srosenbu closed 10 months ago

pdiercks commented 10 months ago

@srosenbu maybe we can add a version for each package in the environment.yml and also a conda-lock.yml?

pdiercks commented 10 months ago

@srosenbu I added conda-lock.yml created via

 ❯ conda-lock lock -f environment.yml -p linux-64 --mamba
Warning: editable pip dep '-e .' will not be included in the lock file. You will need to install it separately.
Locking dependencies for ['linux-64']...
INFO:conda_lock.conda_solver:linux-64 using specs ['python >=3.10', 'fenics-dolfinx 0.6.0.*', 'mpi4py 3.1.4.*', 'scipy', 'pint', 'matplotlib', 'python-gmsh 4.11.1.*', 'meshio 5.3.4.*', 'jsonschema', 'pytest', 'coverage', 'toml', 'sphinx', 'sphinx-gallery', 'myst-parser', 'sphinx_rtd_theme', 'conda-ecosystem-user-package-isolation', 'black', 'isort', 'pip *']
 - Install lock using: conda-lock install --name YOURENV conda-lock.yml

Note that fenicsxconcrete itself is not included. Do we want to have another version of the lockfile where this is included (not in editable mode because this does not seem to be possible)?

So far I have tested using conda-lock to install the env via

 ❯ conda-lock install -n test_fxconcr conda-lock.yml --mamba          
INFO:root:Downloading and Extracting Packages: ...working... done
INFO:root:
INFO:root:Downloading and Extracting Packages: ...working... done
INFO:root:Preparing transaction: ...working... done
INFO:root:Verifying transaction: ...working... done
INFO:root:Executing transaction: ...working...
INFO:root:For Linux 64, Open MPI is built with CUDA awareness but this support is disabled by default.
INFO:root:To enable it, please set the environment variable OMPI_MCA_opal_cuda_support=true before
INFO:root:launching your MPI processes. Equivalently, you can set the MCA parameter in the command line:
INFO:root:mpiexec --mca opal_cuda_support 1 ...
INFO:root:
INFO:root:In addition, the UCX support is also built but disabled by default.
INFO:root:To enable it, first install UCX (conda install -c conda-forge ucx). Then, set the environment
INFO:root:variables OMPI_MCA_pml="ucx" OMPI_MCA_osc="ucx" before launching your MPI processes.
INFO:root:Equivalently, you can set the MCA parameters in the command line:
INFO:root:mpiexec --mca pml ucx --mca osc ucx ...
INFO:root:Note that you might also need to set UCX_MEMTYPE_CACHE=n for CUDA awareness via UCX.
INFO:root:Please consult UCX's documentation for detail.
INFO:root:
INFO:root:
INFO:root:done

Then

mamba activate test_fxconcr
pip install -e .
pytest # tests pass

Locally everything is working as expected.

Do you want to integrate this into the CI in this or another PR?

srosenbu commented 10 months ago

@pdiercks , Thank you. I will merge this now and we open a new issue for the CI integration