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

Changing once again the file locations

parent a965c57d
No related branches found
No related tags found
No related merge requests found
Pipeline #194508 failed
...@@ -43,8 +43,8 @@ variables: ...@@ -43,8 +43,8 @@ variables:
variables: variables:
COMMAND_OPTIONS_SBATCH: ${slurm_options} COMMAND_OPTIONS_SBATCH: ${slurm_options}
STACK_CONFIG: ${CI_PROJECT_DIR}/stacks/${stack}/config.json STACK_CONFIG: ${CI_PROJECT_DIR}/stacks/${stack}/config.json
STACK_LOCATION: /stack MOUNT_POINT: /stack
APPTAINER_EXEC_OPTIONS: ${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --bind ${CI_PROJECT_DIR}:${STACK_LOCATION} APPTAINER_EXEC_OPTIONS: ${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --bind ${CI_PROJECT_DIR}:${MOUNT_POINT}
SPACK_USER_CACHE_PATH: "/tmp/spack_cache_${CI_JOB_ID}" SPACK_USER_CACHE_PATH: "/tmp/spack_cache_${CI_JOB_ID}"
SPACK_USER_CONFIG_PATH: "/tmp/spack_user_${CI_JOB_ID}" SPACK_USER_CONFIG_PATH: "/tmp/spack_user_${CI_JOB_ID}"
BUILDCACHE: "/work/scitas-ge/richart/ci/buildcache" BUILDCACHE: "/work/scitas-ge/richart/ci/buildcache"
...@@ -54,7 +54,7 @@ variables: ...@@ -54,7 +54,7 @@ variables:
key: ${environment}-spack-cache key: ${environment}-spack-cache
policy: pull-push policy: pull-push
paths: paths:
- stack - ${stack}
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
...@@ -71,8 +71,8 @@ spack:checkout: ...@@ -71,8 +71,8 @@ spack:checkout:
spack:setup: spack:setup:
stage: environment stage: environment
extends: extends:
- .spack_cache
- .parallel_job - .parallel_job
- .spack_cache
script: script:
- ci/setup_spack.sh - ci/setup_spack.sh
needs: needs:
...@@ -81,14 +81,15 @@ spack:setup: ...@@ -81,14 +81,15 @@ spack:setup:
spack:install_compilers: spack:install_compilers:
stage: compilers stage: compilers
extends: extends:
- .spack_cache
- .parallel_job - .parallel_job
- .spack_cache
script: script:
- ci/install_compilers.sh - ci/install_compilers.sh
- spack/bin/spack -e stacks/${stack} config blame compilers - cd ${STACK_LOCATION}
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} config blame compilers
after_script: after_script:
- if [ ! -e spack-install.xml ]; then - if [ ! -e spack-install.xml ]; then
echo "{}" > spack-install.xml echo "{}" > spack-install.xml
fi fi
artifacts: artifacts:
reports: reports:
...@@ -100,11 +101,11 @@ spack:install_compilers: ...@@ -100,11 +101,11 @@ spack:install_compilers:
spack:concretize: spack:concretize:
stage: concretize stage: concretize
extends: extends:
- .spack_cache
- .parallel_job - .parallel_job
- .spack_cache
script: script:
- source stack_env.sh - source stack_env.sh
- cd ${STACK_LOCATION}/${stack} - cd ${STACK_LOCATION}
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} config blame - spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} config blame
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} concretize - spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} concretize
needs: needs:
...@@ -117,11 +118,11 @@ spack:concretize: ...@@ -117,11 +118,11 @@ spack:concretize:
spack:install: spack:install:
stage: install stage: install
extends: extends:
- .spack_cache
- .parallel_job - .parallel_job
- .spack_cache
script: script:
- source stack_env.sh - source stack_env.sh
- cd ${STACK_LOCATION}/${stack} - cd ${STACK_LOCATION}
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} install - spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} install
--log-file spack-install.xml --log-file spack-install.xml
--log-format junit --log-format junit
...@@ -146,8 +147,8 @@ spack:install: ...@@ -146,8 +147,8 @@ spack:install:
spack:mksquashfs: spack:mksquashfs:
stage: deploy stage: deploy
extends: extends:
- .spack_cache
- .parallel_job - .parallel_job
- .spack_cache
script: script:
- "mksquashfs ${CI_PROJECT_DIR} stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs" - "mksquashfs ${CI_PROJECT_DIR} stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'
......
...@@ -6,10 +6,8 @@ set -o nounset ...@@ -6,10 +6,8 @@ set -o nounset
source ${CI_PROJECT_DIR}/ci/stack_env.sh source ${CI_PROJECT_DIR}/ci/stack_env.sh
export spack_location=${STACK_LOCATION}/${stack}
echo "Getting system compiler" echo "Getting system compiler"
${spack_location}/spack/bin/spack compiler find --scope system /usr ${STACK_LOCATION}/spack/bin/spack compiler find --scope system /usr
for c in "core_compilers" "compilers"; do for c in "core_compilers" "compilers"; do
echo "Installing $c" echo "Installing $c"
...@@ -19,14 +17,14 @@ for c in "core_compilers" "compilers"; do ...@@ -19,14 +17,14 @@ for c in "core_compilers" "compilers"; do
echo "${_specs}" echo "${_specs}"
if [ "x${_specs}" != "x" ]; then if [ "x${_specs}" != "x" ]; then
${spack_location}/spack/bin/spack spec \ ${STACK_LOCATION}/spack/bin/spack spec \
--install-status \ --install-status \
--namespaces \ --namespaces \
--long \ --long \
--types \ --types \
${_specs} ${_specs}
${spack_location}/spack/bin/spack spec \ ${STACK_LOCATION}/spack/bin/spack spec \
--install-status \ --install-status \
--namespaces \ --namespaces \
--long \ --long \
...@@ -34,7 +32,7 @@ for c in "core_compilers" "compilers"; do ...@@ -34,7 +32,7 @@ for c in "core_compilers" "compilers"; do
--json \ --json \
${_specs} > compilers_spec.json ${_specs} > compilers_spec.json
${spack_location}/spack/bin/spack install \ ${STACK_LOCATION}/spack/bin/spack install \
--log-file spack-install.xml \ --log-file spack-install.xml \
--log-format junit \ --log-format junit \
--fail-fast \ --fail-fast \
...@@ -44,20 +42,20 @@ for c in "core_compilers" "compilers"; do ...@@ -44,20 +42,20 @@ for c in "core_compilers" "compilers"; do
hashes=$(jq -Mr '.spec.nodes | map("/\(.hash)") | join(" ")' compilers_spec.json) hashes=$(jq -Mr '.spec.nodes | map("/\(.hash)") | join(" ")' compilers_spec.json)
echo "Adding packages to buildcache" echo "Adding packages to buildcache"
${spack_location}/spack/bin/spack buildcache create \ ${STACK_LOCATION}/spack/bin/spack buildcache create \
--update-index \ --update-index \
--key EDC904DCE3D2E84E \ --key EDC904DCE3D2E84E \
/buildcache ${hashes} /buildcache ${hashes}
for compiler_hash in $(echo ${hashes}); do for compiler_hash in $(echo ${hashes}); do
location=$(${spack_location}/spack/bin/spack location -i ${compiler_hash}) location=$(${STACK_LOCATION}/spack/bin/spack location -i ${compiler_hash})
# echo "Checking for compiler" # echo "Checking for compiler"
# echo " - ${location}" # echo " - ${location}"
# echo " - ${location}/compiler/latest" # echo " - ${location}/compiler/latest"
# echo " - ${location}/compiler/latest/linux" # echo " - ${location}/compiler/latest/linux"
# echo " - ${location}/Linux_x86_64/2024/compilers" # echo " - ${location}/Linux_x86_64/2024/compilers"
${spack_location}/spack/bin/spack compiler find \ ${STACK_LOCATION}/spack/bin/spack compiler find \
--scope system \ --scope system \
${location} \ ${location} \
${location}/compiler/latest \ ${location}/compiler/latest \
......
...@@ -6,8 +6,8 @@ set -o nounset ...@@ -6,8 +6,8 @@ set -o nounset
source ${CI_PROJECT_DIR}/ci/stack_env.sh source ${CI_PROJECT_DIR}/ci/stack_env.sh
mkdir -p ${STACK_LOCATION}/${stack} mkdir -p ${STACK_LOCATION}
cd ${STACK_LOCATION}/${stack} cd ${STACK_LOCATION}
echo "Setting up spack" echo "Setting up spack"
if [ ! -d spack/.git ]; then if [ ! -d spack/.git ]; then
......
#!/usr/bin/env sh #!/usr/bin/env sh
SPACK_VERSION=$(jq -r .spack.version ${STACK_CONFIG}) SPACK_VERSION=$(jq -r .spack.version ${STACK_CONFIG})
STACK_LOCATION=$(jq -r .stack.mount_point ${STACK_CONFIG}) MOUNT_POINT=$(jq -r .stack.mount_point ${STACK_CONFIG})
SPACK_SYSTEM_CONFIG_PATH=${STACK_LOCATION}/stack/${stack}/environment STACK_LOCATION=${MOUNT_POINT}/${stack}
STACK_CONFIG_PATH=${STACK_LOCATION}/stacks/${stack} SPACK_SYSTEM_CONFIG_PATH=${STACK_LOCATION}/environment
STACK_CONFIG_PATH=${MOUNT_POINT}/stacks/${stack}
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