A Spack repository for the Dune core, staging and extension modules.
Go to file
Dominic Kempf ce341af06e [!19] Introduce variant dependency
Merge branch 'feature/variant-dependencies' into 'master'

ref:spack/dune-spack\> The previous approach had the big downside of bypassing
the specified variants through the specified dependencies of variants. E.g.
dune+pdelab~functions would silently ignore the ~functions aspect, because
+pdelab enforces the installation of dune-functions. This introduces even more
subtle bugs as more Dune modules are added to the package as any
Dune-module-dependent logic in the package needs to be duplicated for each
Dune module that depends on the module that originally introduced that logic
(yuck!).

There is no direct mechanism in Spack to specify such dependencies in a way
that enforces the correct variants on dependent modules. I have now added
conflicts between variants that reflect the Dune module dependencies. In that
case dune+pdelab~functions would throw an error.

This comes at the cost that a command such as

    spack install dune+pdelab

is not possible anymore. Instead the user needs to specify the dependent
modules as well:

    spack install dune+pdelab+functions+typetree

Note that in order to remove some burden from users, I removed the variants
for the core modules - they are always installed.

See merge request [spack/dune-spack!19]

  [spack/dune-spack!19]: gitlab.dune-project.org/spack/dune-spack/merge_requests/19
2020-05-20 07:32:17 +00:00
packages/dune Introduce variant dependency 2020-05-19 16:11:46 +02:00
.gitignore Initial commit 2020-03-30 22:20:53 +02:00
.gitlab-ci.yml Concretize both master and 2.7 release in CI job 2020-05-13 18:40:15 +02:00
Dockerfile Make sure we use Python3 in testing Docker container 2020-05-18 12:52:30 +02:00
README.md Add a disclaimer 2020-05-13 12:22:31 +02:00
build_ci_images.sh Build docker images with spack inside 2020-05-13 16:38:17 +00:00
repo.yaml Some cleaning and missing file for spack repo 2020-03-31 17:27:00 +02:00

README.md

DISCLAIMER

This repository is in early experimental stage. As soon as it is mature, this disclaimer will be removed and the project will be publicly announced through the mailing list. Until then, you are invited to try this and report your experiences, but you might experience some problems.

Dune Spack repository

Installation

Clone spack git

git clone https://github.com/spack/spack.git
source ./share/spack/setup-env.sh
spack bootstrap

add dune spack repo

cd $HOME
git clone https://github.com/gauthier12/dune_spack_repo.git
spack repo add dune_spack_repo

Install dune with desired modules

spack install dune+desired+modules+.....

by example

spack install dune+uggrid+grid+functions

modules dependencies wil be automatically downloaded and added

Use

To use dune, load the module

source /PATH/TO/SPACK/share/spack/setup-env.sh
spack load dune

if python module was installed, python bindings are avalaible after loading the module

Build a new module

Load the dune module

source /PATH/TO/SPACK/share/spack/setup-env.sh
spack load dune

Initialize dune project

duneproject

Answer the questions about the new modules, enter the project folder and compile with standard cmake

mkdir build
cd build 
cmake ..
cmake --build .