Skip to content
Snippets Groups Projects
Commit 659456fb authored by Nicolas Richart's avatar Nicolas Richart
Browse files

Adding environment specific configurations

parent 3856254d
No related branches found
No related tags found
No related merge requests found
......@@ -82,20 +82,20 @@ set -o nounset
jq -Mrc '
.stack
| .system_arch as $arch
| .compilers
| map(select(.constraint != null))
| map(" - when: \(.constraint)\n compilers_specs: [\(.spec) \($arch)]")
| .[]
| .system_arch as $arch
| .compilers
| map(select(.constraint != null))
| map(" - when: \(.constraint)\n compilers_specs: [\(.spec) \($arch)]")
| .[]
' ${STACK_CONFIG} >> ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
jq -Mrc '
.stack
| .system_arch as $arch
| .compilers
| to_entries
| map(" - compiler_\(.key): [\(.value.compiler)@\(.value.version)]")
| .[]
| .system_arch as $arch
| .compilers
| to_entries
| map(" - compiler_\(.key): [\(.value.compiler)@\(.value.version)]")
| .[]
' ${STACK_CONFIG} >> ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
cat ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
......
......@@ -89,3 +89,27 @@ spack/bin/spack buildcache keys \
#spack/bin/spack buildcache update-index /buildcache
target=$(jq -Mrc --arg env "$environment" '
.environments.[$env].target
' ${STACK_CONFIG})
require=$(jq -Mrc --arg env "$environment" '
.environments.[$env]
| if has("require") then
.require
| map(" - spec: \(.spec)\n when: \(.when)")
| .[]
else
""
end' ${STACK_CONFIG})
cat <<EOF > ${SPACK_SYSTEM_CONFIG_PATH}/packages_env.yaml
packages:
all:
target: [$target]
EOF
if [ "x$require" != "x" ]
then
echo $require >> ${SPACK_SYSTEM_CONFIG_PATH}/packages_env.yaml
fi
......@@ -54,5 +54,17 @@
}
}
},
"environments": {
"jed": {
"target": "icelake",
"require": [ {
"spec": "cuda_arch=90",
"when": "~cuda"
}]
},
"helvetios": {
"target": "skylake_avx512"
}
}
}
......@@ -4,17 +4,6 @@ packages:
mpi: [openmpi, intel-oneapi-mpi]
jpeg: [libjpeg]
require:
- spec: cuda_arch=70
when: +cuda target=cascadelake
- spec: cuda_arch=70
when: +cuda target=skylake_avx512
- spec: cuda_arch=90
when: +cuda target=icelake
- spec: cuda_arch=90
when: +cuda target=cannonlake
# System dependencies # ----------------------------------------------------------------------------
rdma-core:
buildable: false
......
spack:
include:
- compiler_definitions.yaml
- packages_env.yaml
definitions:
# -------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment