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

Adding optional compilers

parent 69230558
No related branches found
No related tags found
No related merge requests found
Pipeline #194610 failed
......@@ -68,9 +68,10 @@ done
compilers_specs=$(jq -Mr '.stack | .system_arch as $arch | .core_compilers + .compilers | map("\(.spec) \($arch)")' ${STACK_CONFIG})
system_compiler=$(jq -Mrc '.stack | .system_arch as $arch | .system_compiler | map("\(.compiler)@\(.version) \($arch)")' ${STACK_CONFIG})
core_compilers=$(jq -Mrc '.stack | .system_compiler + .core_compilers | map("\(.compiler)@\(.version)")' ${STACK_CONFIG})
compilers=$(jq -Mrc '.stack | .compilers | map("\(.compiler)@\(.version)")' ${STACK_CONFIG})
compilers=$(jq -Mrc '.stack | .compilers | map(select(.constraint == null) | map("\(.compiler)@\(.version)")' ${STACK_CONFIG})
echo "definitions:" > ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
set +o nounset
for c in "compilers_specs" "system_compiler" "core_compilers" "compilers"; do
if [ "x${!c}" != "x" ]; then
......@@ -79,7 +80,16 @@ for c in "compilers_specs" "system_compiler" "core_compilers" "compilers"; do
done
set -o nounset
jq -Mrc '
.stack
| .system_arch as $arch
| .compilers
| map(select(.constraint != null))
| map(" - {when: \(.constraint), compilers_spec: [\(.spec) \($arch)]}")
| .[]
' stacks/pinot-noir/config.json >> ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
cat ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml
yq -y -s ".[0].spack.definitions = .[1].definitions + .[0].spack.definitions | .[0]" ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml > ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml.new
#yq -y -s ".[0].spack.definitions = .[1].definitions + .[0].spack.definitions | .[0]" ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml ${SPACK_SYSTEM_CONFIG_PATH}/compiler_definitions.yaml > ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml.new
mv ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml.new ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml
#mv ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml.new ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml
......@@ -39,7 +39,20 @@
"compiler": "oneapi",
"spec": "intel-oneapi-compilers@2024.0.2 %gcc@11.4.1",
"version": "2024.0.2"
},
"nvhpc": {
"compiler": "nvhpc",
"spec": "nvhpc@23.3 %gcc@12.2.0",
"version": "23.3",
"constraint": "env['environment'] in ['jed']"
},
"aocc": {
"compiler": "aocc",
"spec": "aocc@4.2.0 %gcc@12.2.0",
"version": "4.2.0",
"constraint": "env['environment'] in ['jed']"
}
}
}
}
spack:
include:
- compiler_definitions.yaml
definitions:
- serial_codes_per_cluster:
- python
......
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