Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a015cd7
Latest preliminary CARE environment
tldahlgren Jul 3, 2021
fa36499
Comment out use of quartz
tldahlgren Jul 3, 2021
e48f436
Initial pass at supporting sha-based clones
tldahlgren Jul 3, 2021
836d0be
Small fix and clean-up
adrienbernede Jul 7, 2021
2c064d6
Several fixes, and ask for care@develop to workaround concretization …
adrienbernede Jul 8, 2021
36914b2
Simplify get spack logic
adrienbernede Jul 8, 2021
e732f6c
Add debug option to spack env activate command
adrienbernede Jul 9, 2021
086ca78
Try activation from project subdir
tldahlgren Jul 14, 2021
898ee78
Disable env view and show spack version
tldahlgren Jul 14, 2021
70917af
Skip spack version, show install share root
tldahlgren Jul 14, 2021
e7078d4
Use expected temp vars and consistent if format
tldahlgren Jul 14, 2021
24c1453
Another get-spack pass
tldahlgren Jul 15, 2021
84736ba
Fix get-spack script
adrienbernede Jul 15, 2021
e3cd19a
Add Peter's dependencies from CARE PR #144
tldahlgren Jul 15, 2021
912f0f7
Configure CARE env so hopefully all but umpire able to build
tldahlgren Jul 15, 2021
410f5bd
Skip umpire for now
tldahlgren Jul 15, 2021
eb0f3df
Merge branch 'add-care-env' into fix/add-care-env
tldahlgren Jul 15, 2021
9f14dbe
Merge pull request #17 from LLNL/fix/add-care-env
tldahlgren Jul 15, 2021
4b8d9a4
Restore Adrien's get-spack fix
tldahlgren Jul 15, 2021
5a65714
Attempt to get chai to build with original concretizer
tldahlgren Jul 15, 2021
90aeb5e
Attempt to get care to build with original concretizer
tldahlgren Jul 15, 2021
6529c87
Add raja@develop to care env
tldahlgren Jul 15, 2021
4273b55
Add camp@master dependency to raja@develop
tldahlgren Jul 16, 2021
2bb77f3
Remove dated comment
tldahlgren Jul 22, 2021
e94fa17
Copy care package customization to spack clone; enable quartz
tldahlgren Jul 23, 2021
3b5ac3e
Disable quartz (again)
tldahlgren Jul 23, 2021
9bcefd7
Skip care since failing now that using Peter's package
tldahlgren Jul 23, 2021
054c811
Start over with environment constraints for CARE's packages
tldahlgren Jul 23, 2021
a4bc8b5
Restore cmake constraint (and add/fix others)
tldahlgren Jul 23, 2021
9253d00
Fix care's chai variant issue
tldahlgren Jul 23, 2021
550fde4
Add cuda version constraint to care, disable chai@2.3.1
tldahlgren Jul 26, 2021
4796677
Just specify care, not any of its dependencies, since using CARE's pa…
tldahlgren Jul 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 26 additions & 19 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,53 @@

#[create-unique-path--]
variables:
SPACK_PARENT_DIR: ${CI_BUILDS_DIR}/llnl-stack-${CI_COMMIT_SHORT_SHA}
CARE_PATH: ${CI_BUILDS_DIR}/llnl-stack-${CI_COMMIT_SHORT_SHA}/care
REPO_PARENT_DIR: ${CI_BUILDS_DIR}/llnl-stack-${CI_COMMIT_SHORT_SHA}
SPACK_PATH: ${CI_BUILDS_DIR}/llnl-stack-${CI_COMMIT_SHORT_SHA}/spack
#[--create-unique-path]
CARE_REPO: https://github.com/LLNL/CARE
CARE_REF: develop
SPACK_REPO: https://github.com/spack/spack.git
SPACK_REF: develop
SPACK_REF: 1c92d832b6eefaf2cf1d053ff621ddd44de7606e
SPACK_DEBUG: "-d"
PROJECT_NAME: "radiuss"
PROJECT_NAME: "care"

# We only do one generation per stage because we found conflicts otherwise
#[one-generate-per-stage--]
stages:
- get-spack
- get-repos
- concretize-test
- generate-quartz
- generate-lassen
#- generate-quartz
- build
- rm-spack
- rm-repos
#[--one-generate-per-stage]

.on-quartz:
tags: [shell, quartz]
#.on-quartz:
# tags: [shell, quartz]

.on-lassen:
tags: [shell, lassen]

#[get-spack--]
get-spack:
extends: [.on-quartz]
stage: get-spack
#[get-repos--]
get-repos:
extends: [.on-lassen] # [.on-quartz]
stage: get-repos
script:
- export SPACK_PACKAGE_DIR=$SPACK_PATH/var/spack/repos/builtin/packages
- export CARE_PACKAGE_DIR=$CARE_PATH/scripts/spack_packages
- .gitlab/get-spack
#[--get-spack]
- .gitlab/get-care
- .gitlab/copy-care-packages
#[--get-repos]

#[rm-spack--]
rm-spack:
extends: [.on-quartz]
stage: rm-spack
#[rm-repos--]
rm-repos:
extends: [.on-lassen] # [.on-quartz]
stage: rm-repos
script:
- .gitlab/remove-spack
#[--rm-spack]
- .gitlab/remove-repos
#[--rm-repos]

include:
#- .gitlab/concretize.yml
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/child/concretize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stages:
extends: .concretize_rules
tags:
- shell
- quartz
- lassen # - quartz
before_script:
- date
- git clone ${CHILD_SPACK_PATH} --depth 1 local_spack
Expand Down
35 changes: 35 additions & 0 deletions .gitlab/copy-care-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

set -e

# Check necessary variables
care_package_dir=${CARE_PACKAGE_DIR:-""}
spack_package_dir=${SPACK_PACKAGE_DIR:-""}

usage() {
echo " $0 needs the CARE package directory"
echo " Use \$CARE_PACKAGE_DIR to specify it."
echo ""
echo " $0 needs a Spack package directory"
echo " Use \$SPACK_PACKAGE_DIR to specify it."
}

if [[ -z ${care_package_dir} || ! -d ${care_package_dir} ]]; then
echo "[ERROR] No CARE package directory defined in \$CARE_PACKAGE_DIR."
usage
else
echo "Using ${care_package_dir} as the CARE package directory."
fi

if [[ -z ${spack_package_dir} || ! -d ${spack_package_dir} ]]; then
echo "[ERROR] No Spack package directory defined in \$SPACK_PACKAGE_DIR."
usage
else
echo "Using ${spack_package_dir} as the SPACK package directory."
fi

DIRS=`ls ${care_package_dir}`
for dir in $DIRS; do
echo "Replace selected package file(s) for ${dir}"
cp -f ${care_package_dir}/${dir}/* ${spack_package_dir}/${dir}
done
50 changes: 27 additions & 23 deletions .gitlab/generate.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2019-2020, Lawrence Livermore National Security, LLC and
# Copyright (c) 2019-2021, Lawrence Livermore National Security, LLC and
# RADIUSS project contributors. See the COPYRIGHT file for details.
#
# SPDX-License-Identifier: (MIT)
Expand All @@ -11,7 +11,7 @@
rules:
- if: '$PROJECT_NAME == ""'
when: never
- if: '$CI_JOB_NAME == "rm-spack"'
- if: '$CI_JOB_NAME == "rm-repos"'
when: always
- when: on_success

Expand All @@ -24,35 +24,39 @@
.generate-pipeline:
script:
- . ${SPACK_PATH}/share/spack/setup-env.sh
- spack env activate spack-environments/${PROJECT_NAME}
#- spack --version
- echo $_spack_share_dir
- cd spack-environments/${PROJECT_NAME}
- spack ${SPACK_DEBUG} env activate --without-view .
- spack ${SPACK_DEBUG} ci generate
--artifacts-root "${CI_PROJECT_DIR}/jobs_scratch_dir"
--output-file "${CI_PROJECT_DIR}/jobs_scratch_dir/pipeline.yml"
- cp -r spack-environments/${PROJECT_NAME}/${SYS_TYPE} ${CI_PROJECT_DIR}/jobs_scratch_dir/concrete_environment/
#- cp -r spack-environments/${PROJECT_NAME}/${SYS_TYPE} ${CI_PROJECT_DIR}/jobs_scratch_dir/concrete_environment/
- cp -r ${SYS_TYPE} ${CI_PROJECT_DIR}/jobs_scratch_dir/concrete_environment/
artifacts:
paths:
- "${CI_PROJECT_DIR}/jobs_scratch_dir"

# quartz
generate-on-quartz:
extends: [.generate-pipeline, .on-quartz, .has_project_name]
stage: generate-quartz
before_script:
- .gitlab/print-variables
## quartz
#generate-on-quartz:
# extends: [.generate-pipeline, .on-quartz, .has_project_name]
# stage: generate-quartz
# before_script:
# - .gitlab/print-variables

#[send-variable-child--]
build-on-quartz:
extends: [.has_project_name]
stage: build
variables:
CHILD_SPACK_PATH: ${SPACK_PATH}
trigger:
include:
- artifact: "jobs_scratch_dir/pipeline.yml"
job: generate-on-quartz
strategy: depend
needs: [generate-on-quartz]
#[--send-variable-child]
##[send-variable-child--]
#build-on-quartz:
# extends: [.has_project_name]
# stage: build
# variables:
# CHILD_SPACK_PATH: ${SPACK_PATH}
# trigger:
# include:
# - artifact: "jobs_scratch_dir/pipeline.yml"
# job: generate-on-quartz
# strategy: depend
# needs: [generate-on-quartz]
##[--send-variable-child]

# lassen
generate-on-lassen:
Expand Down
71 changes: 71 additions & 0 deletions .gitlab/get-care
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash
#
# Required inputs are environment variables:
# - CARE_REF = a branch or hash
# - CARE_REPO = repository URL
# - CARE_PATH = repository clone destination

set -e

# Check necessary variables
care_ref=${CARE_REF:-""}
care_repo=${CARE_REPO:-""}
care_path=${CARE_PATH:-""}

usage() {
echo " $0 needs either a branch or a hash."
echo " Use \$CARE_REF to specify it."
echo ""
echo " $0 needs a repository url."
echo " Use \$CARE_REPO to specify it."
echo ""
echo " $0 needs a repository clone path."
echo " Use \$CARE_PATH to specify it."
}

if [[ -z ${care_ref} ]]; then
echo "[ERROR] No branch or hash are defined in \$CARE_REF."
usage
else
echo "[INFO] Using ${care_ref} as the branch or hash."
fi

if [[ -z ${care_repo} ]]; then
echo "[ERROR] No repository url defined in \$CARE_REPO."
usage
else
echo "[INFO] Using ${care_repo} as the repository URL."
fi

if [[ -z ${care_path} ]]; then
echo "[ERROR] No clone path defined in \$CARE_PATH."
usage
else
echo "[INFO] Using ${care_path} as the clone path."
fi

echo "[INFO] Calling .gitlab/get-repo from $PWD"
.gitlab/get-repo $care_repo $care_ref $care_path

##[get-care--]
## Create a new repo if not present, and prepare for fetch
#if [[ ! -d ${care_path} ]]
#then
# mkdir -p ${care_path}
# cd ${care_path}
# git init
# git remote add origin ${care_repo}
#fi
#
## Go to the repo.
#cd ${care_path}
#
## Fetch the reference.
#git fetch --depth 1 origin ${care_ref}
#
## Checkout the reference.
#git checkout FETCH_HEAD
#
## Tag the commit with current pipeline ID.
#git tag ${CI_PIPELINE_ID}
##[--get-care]
42 changes: 42 additions & 0 deletions .gitlab/get-repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

set -e

if [[ $# -ne 3 ]]; then
echo "[ERROR] $0 requires three command line arguments."
echo
echo "USAGE: $0 <repository-url> <repository-ref-or-hash> <clone-path>"
exit 1
else
echo "Using $1 as the repository url."
echo "Using $2 as the repository reference or branch."
echo "Using $3 as the clone path."
fi

# Check necessary variables
repo=$1
ref=$2
clone_path=$3

#[get-repo--]
# Create a new repo if not present, and prepare for fetch
if [[ ! -d ${clone_path} ]]
then
mkdir -p ${clone_path}
cd ${clone_path}
git init
git remote add origin ${repo}
fi

# Go to the repo.
cd ${clone_path}

# Fetch the reference.
git fetch --depth 1 origin ${ref}

# Checkout the reference.
git checkout FETCH_HEAD

# Tag the commit with current pipeline ID.
git tag ${CI_PIPELINE_ID}
#[--get-repo]
82 changes: 65 additions & 17 deletions .gitlab/get-spack
Original file line number Diff line number Diff line change
@@ -1,23 +1,71 @@
#!/bin/bash
#
# Required inputs are environment variables:
# - SPACK_REF = a branch or hash
# - SPACK_REPO = repository URL
# - SPACK_PATH = repository clone destination

set -e

#[get-spack--]
if [[ ! -d ${SPACK_PATH} ]]
then
mkdir -p ${SPACK_PATH}/..
# A shallow clone is enough, and much faster.
git clone ${SPACK_REPO} --depth 1 --branch ${SPACK_REF} ${SPACK_PATH}
# We tag the commit so we can retrieve which one was used by a given pipeline.
git tag ${CI_PIPELINE_ID}
# Check necessary variables
spack_ref=${SPACK_REF:-""}
spack_repo=${SPACK_REPO:-""}
spack_path=${SPACK_PATH:-""}

usage() {
echo " $0 needs either a branch or a hash."
echo " Use \$SPACK_REF to specify it."
echo ""
echo " $0 needs a repository url."
echo " Use \$SPACK_REPO to specify it."
echo ""
echo " $0 needs a repository clone path."
echo " Use \$SPACK_PATH to specify it."
}

if [[ -z ${spack_ref} ]]; then
echo "[ERROR] No branch or hash are defined in \$SPACK_REF."
usage
else
echo "[INFO] Using ${spack_ref} as the branch or hash."
fi

if [[ -z ${spack_repo} ]]; then
echo "[ERROR] No repository defined in \$SPACK_REPO."
usage
else
cd ${SPACK_PATH}
git checkout -b temp
git branch -D ${SPACK_REF}
git fetch --depth 1 ${SPACK_REPO} ${SPACK_REF}:${SPACK_REF}
git checkout ${SPACK_REF}
git tag ${CI_PIPELINE_ID}
git branch -D temp
cd -
echo "[INFO] Using ${spack_repo} as the repository."
fi
#[--get-spack]

if [[ -z ${spack_path} ]]; then
echo "[ERROR] No clone path defined in \$SPACK_PATH."
usage
else
echo "[INFO] Using ${spack_path} as the clone path."
fi

echo "[INFO] Calling .gitlab/get-repo from $PWD"
.gitlab/get-repo $spack_repo $spack_ref $spack_path

##[get-spack--]
## Create a new repo if not present, and prepare for fetch
#if [[ ! -d ${spack_path} ]]
#then
# mkdir -p ${spack_path}
# cd ${spack_path}
# git init
# git remote add origin ${spack_repo}
#fi
#
## Go to the repo.
#cd ${spack_path}
#
## Fetch the reference.
#git fetch --depth 1 origin ${spack_ref}
#
## Checkout the reference.
#git checkout FETCH_HEAD
#
## Tag the commit with current pipeline ID.
#git tag ${CI_PIPELINE_ID}
##[--get-spack]
Loading