Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rshimoura/ebrains-spack-builds
  • ziaee/ebrains-spack-builds
  • hl11/ebrains-spack-builds
  • filippomarchetti/ebrains-spack-builds
  • jkaiser/ebrains-spack-builds
  • hjorth/ebrains-spack-builds-sept-2024
  • dsegebarth/ebrains-spack-builds
  • kozlov/ebrains-spack-builds
  • dsegebarth/ebrains-spack-builds-na-3
  • ansimsek/ebrains-spack-builds
  • lupoc/ebrains-spack-builds
  • hartmut/ebrains-spack-builds
  • ri/tech-hub/platform/esd/ebrains-spack-builds
  • lcalori0/ebrains-spack-builds
  • deepu/ebrains-spack-builds
  • noelp/ebrains-spack-builds
16 results
Show changes
Commits on Source (1352)
Showing
with 1205 additions and 356 deletions
__pycache__ __pycache__
*.pyc *.pyc
*.err
*.out
.spack-env/
spack.lock
This diff is collapsed.
<!-- Thanks for taking the time to report this build failure. To proceed with the report please:
1. Title the issue "Installation issue: <name-of-the-package>".
2. Provide the information required below.
We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->
### Summary
| | |
|---------------|-----------------------------------------------|
| Summary | Spack package build failure |
| Package info | <!-- Spack package name or entire spec --> |
| System | <!-- HPC cluster name/Collab Lab/other --> |
| Related | <!-- Other related issues (if applicable) --> |
### Steps to reproduce the issue
<!-- Fill in the console output from the exact spec you are trying to build. -->
```console
$ spack spec -I <spec>
...
$ spack install <spec>
...
```
### Error message
<!-- Please post the error message from spack inside the <details> tag below: -->
<details><summary>Error message</summary><pre><code>
(add error logs here)
</code></pre></details>
### Information on your system
<!-- Please include the output of `spack debug report` -->
<!-- If you have any relevant configuration detail (custom `packages.yaml` or `modules.yaml`, etc.) you can add that here as well. -->
### Additional information
<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->
* [spack-build-out.txt]()
* [spack-build-env.txt]()
/label ~build-error
<!-- Thanks for taking the time to report this test failure. To proceed with the report please:
1. Title the issue "Testing issue: <name-of-the-package>".
2. Provide the information required below.
We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! -->
### Summary
| | |
|---------------|-----------------------------------------------|
| Summary | Spack package test failure |
| Package info | <!-- Spack package name or entire spec --> |
| System | <!-- HPC cluster name/Collab Lab/other --> |
| Related | <!-- Other related issues (if applicable) --> |
### Steps to reproduce the issue
<!-- Fill in the console output from the exact spec you are trying to build and test. -->
```console
$ spack spec -I <spec>
...
$ spack spack install --test root <spec>
...
```
### Error message
<!-- Please post the error message from install-time-test-log.txt inside the <details> tag below: -->
The test error message (first 1000 lines) from install-time-test-log.txt is the following:
<details><summary>Error message</summary><pre><code>
(add error logs here)
</code></pre></details>
### Information on your system
<!-- Please include the output of `spack debug report` -->
### Additional information
<!-- Please upload the following files. They should be present in the stage directory of the failing build. Also upload any config.log or similar file if one exists. -->
* [spack-build-out.txt]()
* [spack-build-env.txt]()
* [install-time-test-log.txt]()
/label ~test-error
### Summary
| | |
|---------------|----------------------------------------|
| Package | <!-- Spack package name --> |
| Contact point | <!-- maintainer GitLab handle --> |
| KG entry | <!-- insert link --> |
### Checks
<!-- please download the EBRAINS Software Quality checklist, fill it and replace the file below -->
* [ ] Software Quality Checklist: [SQ-Checklist.pdf](https://drive.ebrains.eu/d/6061531326d048308823/files/?p=%2FSQ-Checklist.pdf) (level: <!-- passing, silver, gold -->)
* [ ] Current maintainer is listed first in `package.py`
* [ ] No pinned dependency versions
* [ ] Post-installation tests are defined
\ No newline at end of file
### Summary
| | |
|---------------|----------------------------------------|
| Package | <!-- Spack package name --> |
| Version added | <!-- version number --> |
| Contact point | <!-- maintainer GitLab handle --> |
| KG entry | <!-- insert link --> |
### Checks
<!-- please download the EBRAINS Software Quality checklist, fill it and replace the file below -->
* [ ] Software Quality Checklist: [SQ-Checklist.pdf](https://drive.ebrains.eu/d/6061531326d048308823/files/?p=%2FSQ-Checklist.pdf) (level: <!-- passing, silver, gold -->)
* [ ] Current maintainer is listed first in `package.py`
* [ ] No pinned dependency versions
* [ ] Post-installation tests are defined
\ No newline at end of file
[submodule "vendor/spack"]
path = vendor/spack
url = https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/spack.git
shallow = true
[submodule "vendor/yashchiki"]
path = vendor/yashchiki
url = https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/dedal
shallow = true
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
MIT License
Copyright (c) 2013-2023 LLNS, LLC and other Spack Project Developers.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# ebrains-spack-builds # ebrains-spack-builds
Build and distribute software tools with Spack for the EBRAINS Collaboratory Lab containers. Build and distribute EBRAINS software tools with Spack.
**Quickstart for Notebooks** ## Introduction
- Open a terminal at a running Collaboratory Lab Container and execute the following:
Building and deploying EBRAINS tools to make them available for direct use in the Collaboratory Lab environment is a challenging task, mainly due to the number of tools and the increasing complexity of resolving their dependency conflicts. To efficiently solve this problem, we have implemented a delivery strategy based on [Spack](https://spack.io/), a package manager specifically designed to simplify the installation and management of scientific software (more information [here](https://drive.ebrains.eu/f/73bcfe5acf924cef83cc/)).
Spack is highly customizable and flexible, allowing developers to create their own packages and specify their dependencies and custom build configurations. It supports a wide range of programming languages (Python, R, C, C++, Fortran etc), different hardware architectures and operating systems. All an EBRAINS developer needs to do is create a Spack package (simple description of the build logic of their software). Then Spack automatically handles downloading, building, and installing the entire EBRAINS environment, managing all their dependencies and other requirements.
## Repository
This repository is where the EBRAINS Spack packages are maintained. It contains:
- the EBRAINS [Spack repository](https://spack.readthedocs.io/en/latest/repositories.html), that contains all available EBRAINS Spack packages ([packages/](packages))
- the latest EBRAINS [Spack environment](https://spack.readthedocs.io/en/latest/environments.html) ([spack.yaml](spack.yaml)), a list of the specific versions of EBRAINS tools that are part of the software release
- a script ([install_spack_env.sh](install_spack_env.sh)) that can be used to install the latest spack environment on any machine (either install from scratch or update an existing installation)
- CI/CD pipelines configured for (a) testing the installation of new packages and (b) deploying the environment to the EBRAINS Collaboratory Lab.
- (WIP) all the site-specific configurations that have been used to install the EBRAINS Spack environment in different systems, such as the EBRAINS Lab and the Fenix HPC systems.
## Contributing
HBP's developers/component owners that want their EBRAINS tools to be included in the official EBRAINS releases and deployed for direct use from the Lab environment should follow those steps:
- Fork this repository
- Clone the forked repository to local machine (or use the Gitlab Web IDE)
- Create a new Spack package for your tool. For instructions on how to do this, see [the Spack documentation](https://spack.readthedocs.io/en/latest/packaging_guide.html) and the developer's section of [our documentation](https://drive.ebrains.eu/f/73bcfe5acf924cef83cc/). **Add the new package** to the repository, by creating a directory inside [packages/](./packages/) and copying the package recipe there. Also don't forget to **add a spec** to [spack.yaml](spack.yaml)
- Commit the new package and push to a new branch, e.g. `add-packagename`
- Create a Merge Request to merge your changes into the master branch of the original repository
- Check the results of the automated test build job and solve any issues
- Once the tests pass, wait for TC to approve and merge. Once merged, the package will be automatically built and deployed to the integration environment of the Collaboratory Lab (lab-int).
## Installing the EBRAINS official Software release
To install the EBRAINS Spack environment on a new machine, it is recommended to follow exactly the steps from [install_spack_env.sh](install_spack_env.sh), that installs or updates and tests the spack environment defined in this repository. In general, you need to:
Clone this repository. You can use the `ebrains-yy-mm` branches to install the EBRAINS official releases, the `experimental-rel` branch for the experimental release, or the `master` branch for the latest state:
```
git clone --branch {branch-name} https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/ebrains-spack-builds.git
``` ```
#update modulepath of JupterLab container to include spack arch modulefiles path
module use /srv/test-build/spack/share/spack/modules/linux-centos7-broadwell/
module use /srv/test-build/spack/share/spack/modules/linux-centos7-x86_64/
#start JupyterLab kernel made for spack Clone Spack. We currently use version v0.23.1:
jupyter kernelspec install --user /srv/jupyterlab_kernels/int/release20210930/spack_python_kernel_release_20210930/
``` ```
- Then select File > New Launcher git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch v0.23.1 https://github.com/spack/spack
- Open a new Notebook with the "EBRAINS_release_20210930" kernel
- Import the tools available with spack:
``` ```
import nest
import arbor Activate Spack:
import neuron ```
. spack/share/spack/setup-env.sh
```
Add the project repository to your Spack environment:
```
spack repo add ebrains-spack-builds
``` ```
**Quickstart for terminal** Define your site-specific configurations:
- Open a terminal at a running Collaboratory Lab Container and execute the following:
``` ```
git clone https://gitlab.ebrains.eu/akarmas/ebrains-spack-builds.git export SYSTEMNAME=<your-system-name>
cd ebrains-spack-builds mkdir ebrains-spack-builds/site-config/$SYSTEMNAME
source ./load_sim_tools.sh # copy any site-specific .yaml files inside the new dir
``` ```
- Then you can start python and import the available tools
- Currently installed: Activate the environment and install:
arbor ```
neuron spack env activate ebrains-spack-builds
nest spack install --fresh
```
## Gitlab CI/CD Enviromental variables
## Troubleshooting
The following variable(s) must be set up if not or re-configured if tokens expire.
If you encounter any issues with installing, testing, or using the EBRAINS Spack environment or a specific package, please [open an issue](https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/ebrains-spack-builds/-/issues/new) using the provided templates, or contact the Technical Coordination team directly.
OPENSHIFT_TOKEN: Token to login to OpenShift cluster (with the "gitlab" service account)
OPENSHIFT_DEV_SERVER: The URL of the OpenShift Development cluster needed for deploying software in lab-int environment
BUILD_ENV: The name of the environment to deploy the software of the next commit
OPERATION: The operation to perform on the spack environment (one of the following: testing, create, update, delete)
## Copy spack .yaml files and packages to the Openshift job pod that does the build
The gitlab runner copies the various files needed for the build to the OpenShift job pod.
- It copies the {spack, repo}.yaml files, the create_JupyterLab_kernel.sh script and the packages/ directory
- The runner waits until the job's pod is running to start copying the files
- The pod (built from [tc/ebrains-spack-build-env:latest image](https://docker-registry.ebrains.eu/harbor/projects/8/repositories/ebrains-spack-build-env)) waits until the necessary file(s) has finished copying so that it can continue the build process
## Bulding software binaries with Spack
- The build process is powered by Spack a multi-platform package manager that builds and installs multiple versions and configurations of software.
- A Job (object) in OpenShift is responsible for the build process.
- The gitlab runner starts a new Job that runs on an OpenShift pod that uses the container image developed in [this](https://gitlab.ebrains.eu/akarmas/ebrains-spack-build-env/) repository that holds all the Spack specifics needed for the build process. All the Spack configuration necessary for a successfull build is to be changed from the Spack configuration files that are found in the present repository.
- The OpenShift Job's pod mounts an NFS drive that is also mounted by all Collaboratory Lab containers and performs the entire build process with Spack on that NFS drive and as a result all the installed software is readily available to Collaboratory Lab containers
- A schema of the build process can be found [here](https://drive.ebrains.eu/smart-link/6adcd99f-c088-472e-a596-37ac38869051/)
## Activating software in the Collaboratory Lab containers
- Currently to activate the pre-built simulation tools in the Collaboratory Lab containers refer to **Quickstart** at the beggining of this file
- There are two options: i) for using the simulation tools directly in the notebooks and ii) for using the simulation tools from a terminal in a Collaboratory Lab container
**ToDo: put the necessary activation commands in the startup script of a JupyterLab conatiner spawned in OpenShift to hide all implementation details from the users**
#!/bin/bash #!/bin/bash
#title :create_JupyterLab_kernel.sh
#description :Script to create a spackified JupyterLab kernel conf and place it to NFS where it can be loaded by all users.
#usage :./create_JupyterLab_kernel.sh $INSTALLATION_ROOT $ENV $LAB_KERNEL_PATH
#==============================================================================
INSTALLATION_ROOT=$1 # ===========================================================================================================
SPACKIFIED_ENV=$2 # title : create_JupyterLab_kernel.sh
LAB_KERNEL_PATH=$3 # usage : ./create_JupyterLab_kernel.sh $INSTALLATION_ROOT $EBRAINS_SPACK_ENV $RELEASE_NAME $LAB_KERNEL_ROOT
# description : creates a spackified JupyterLab kernel conf and places it to the NFS where it can be
# loaded by all users.
# ===========================================================================================================
# capture the empty env set -euo pipefail
cd /opt/app-root/src
env >> before.txt
# load spack, spack repos and spack env INSTALLATION_ROOT=$1
cp -r /srv/$INSTALLATION_ROOT/spack/.spack ~ EBRAINS_SPACK_ENV=$2
source /srv/$INSTALLATION_ROOT/spack/share/spack/setup-env.sh RELEASE_NAME=$3
spack repo add /srv/$INSTALLATION_ROOT/ebrains-spack-builds LAB_KERNEL_ROOT=$4
# no need to activate as the env is already activated in the context it is used
#spack env activate $SPACKIFIED_ENV
module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-broadwell/ # kernel name is lowercase release name
module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-x86_64/ KERNEL_NAME=$(echo "$RELEASE_NAME" | tr '[:upper:]' '[:lower:]')
source /srv/$INSTALLATION_ROOT/spack/var/spack/environments/$SPACKIFIED_ENV/loads # kernel dir is a directory inside LAB_KERNEL_ROOT named after the kernel
# add also user's .local python3.8 packages to allow package installation at runtime KERNEL_PATH=$LAB_KERNEL_ROOT/$KERNEL_NAME
# by the user using pip
export PYTHONPATH=$PYTHONPATH:/opt/app-root/src/.local/lib/python3.8/site-packages
export PATH=$PATH:/opt/app-root/src/.local/bin
# export also python modules installed in the base docker Collab image
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.8/dist-packages
# capture the env after spack activation # prepare the base env.sh script required for the JupyterLab kernels:
cd /opt/app-root/src mkdir -p $KERNEL_PATH/bin
env >> after.txt
# prepare the env file required for the JupyterLab kernel # (1) create env.sh bash script
mkdir $LAB_KERNEL_PATH/bin cat <<EOF > $KERNEL_PATH/bin/env.sh
cat <<EOF > $LAB_KERNEL_PATH/bin/env.sh
#!/usr/bin/env bash #!/usr/bin/env bash
set -euxo pipefail set -euxo pipefail
EOF EOF
# load here all tools # (2) append the necessary env variables for spack env and tools
#spack load --sh -r python@3.8.11 py-ipykernel py-pip py-numpy@1.21.0 py-scipy py-pandas py-seaborn py-matplotlib arbor nest@3.0 neuron py-pynn tvb-data tvb-library meta-brainscales %gcc@10.3.0 >> $LAB_KERNEL_PATH/bin/env.sh cat $INSTALLATION_ROOT/spack/var/spack/environments/$EBRAINS_SPACK_ENV/load_env.sh >> $KERNEL_PATH/bin/env.sh
# also copy the script so that it can be used independently:
cp $INSTALLATION_ROOT/spack/var/spack/environments/$EBRAINS_SPACK_ENV/load_env.sh $KERNEL_PATH/bin/
# (3) also add the user's .local locations to allow package installation at runtime,
# and the location of python modules installed in the base docker Collab image
cat <<EOF >> $KERNEL_PATH/bin/env.sh
export PATH=\$PATH:/opt/app-root/src/.local/bin
export PYTHONPATH=\$PYTHONPATH:/opt/app-root/src/.local/lib/python3.8/site-packages:/usr/local/lib/python3.8/dist-packages
export R_LIBS_USER=/opt/app-root/src/.local/lib/R/site-library
mkdir -p \$R_LIBS_USER
export R_LIBS=\$R_LIBS_USER:\$R_LIBS
EOF
# ... and set the SYSTEMNAME env var, to use Spack commands inside the kernel
cat <<EOF >> $KERNEL_PATH/bin/env.sh
export SYSTEMNAME=ebrainslab
EOF
# append the necessary env variables for spack env and tools # (4) create startup script for python kernel
cd /opt/app-root/src cat $KERNEL_PATH/bin/env.sh > $KERNEL_PATH/bin/env_python.sh
diff before.txt after.txt|grep ">"|cut -c 3- |awk '$0="export "$0' >> $LAB_KERNEL_PATH/bin/env.sh echo "python -m ipykernel_launcher -f \$@" >> $KERNEL_PATH/bin/env_python.sh
chmod +x $KERNEL_PATH/bin/env_python.sh
# end of env creation # ... and the new kernel's configuration file
cat <<EOF >>$LAB_KERNEL_PATH/bin/env.sh mkdir -p $KERNEL_PATH/$KERNEL_NAME
python -m ipykernel_launcher -f \$@ cat <<EOF > $KERNEL_PATH/$KERNEL_NAME/kernel.json
{
"argv": ["$KERNEL_PATH/bin/env_python.sh", "{connection_file}", "--profile=default"],
"display_name": "$RELEASE_NAME",
"language": "python",
"env": { "LAB_KERNEL_NAME": "$RELEASE_NAME", "LAB_KERNEL_RELEASE_DATE": "$(date +"%Y-%m-%d")" }
}
EOF EOF
chmod +x $LAB_KERNEL_PATH/bin/env.sh
# create the new kernel's configuration file # ... and add EBRAINS logo to kernel
mkdir $LAB_KERNEL_PATH/spack_python_kernel_release_202112 cp $(dirname ${BASH_SOURCE[0]})/etc/logo-64x64-python.png $KERNEL_PATH/$KERNEL_NAME/logo-64x64.png
cat <<EOF >$LAB_KERNEL_PATH/spack_python_kernel_release_202112/kernel.json
# (5) create startup script for R kernel
cat $KERNEL_PATH/bin/env.sh > $KERNEL_PATH/bin/env_r.sh
echo "R --slave -e \"IRkernel::main()\" --args \$@" >> $KERNEL_PATH/bin/env_r.sh
chmod +x $KERNEL_PATH/bin/env_r.sh
# ... and the new R kernel's configuration file
mkdir -p $KERNEL_PATH/${KERNEL_NAME}-R
cat <<EOF > $KERNEL_PATH/${KERNEL_NAME}-R/kernel.json
{ {
"argv": ["$LAB_KERNEL_PATH/bin/env.sh", "{connection_file}", "--profile=default"], "argv": ["$KERNEL_PATH/bin/env_r.sh", "{connection_file}"],
"display_name": "EBRAINS_release_v0.2_202112", "display_name": "R-$RELEASE_NAME",
"name": "spack_python_kernel_release_202112", "language": "R",
"language": "python" "env": { "LAB_KERNEL_NAME": "R-$RELEASE_NAME", "LAB_KERNEL_RELEASE_DATE": "$(date +"%Y-%m-%d")" }
} }
EOF EOF
# ... and add EBRAINS logo and kernel.js to kernel
cp $(dirname ${BASH_SOURCE[0]})/etc/logo-64x64-R.png $KERNEL_PATH/${KERNEL_NAME}-R/logo-64x64.png
cp $(dirname ${BASH_SOURCE[0]})/etc/kernel.js $KERNEL_PATH/${KERNEL_NAME}-R/
#!/bin/bash #!/bin/bash
INSTALLATION_ROOT=$1 # ===========================================================================================================
SPACKIFIED_ENV=$2 # title : create_job.sh
OP=$3 # usage : ./create_job.sh $OC_JOB_ID $BUILD_ENV_DOCKER_IMAGE $INSTALLATION_ROOT
SPACK_ENV_TAR_FILE=$4 # $SPACK_ENV $COMMIT_SHA $RELEASE_NAME $LAB_KERNEL_ROOT
OC_JOB_ID=$5 # description : creates OKD job yaml file that builds/updates spack environment and creates Lab kernel
BUILD_ENV_DOCKER_IMAGE=$6 # ===========================================================================================================
LAB_KERNEL_PATH=$7
OKD_CLUSTER_UID=$8 OC_JOB_ID=$1
BUILD_ENV_DOCKER_IMAGE=$2
INSTALLATION_ROOT=$3
EBRAINS_SPACK_ENV=$4
COMMIT_SHA=$5
RELEASE_NAME=$6
LAB_KERNEL_ROOT=$7
UPDATE_SPACK_OCI_CACHES=$8
OCI_CACHE_PREFIX=$9
cat <<EOT >> simplejob.yml cat <<EOT >> simplejob.yml
apiVersion: batch/v1 apiVersion: batch/v1
...@@ -15,32 +23,88 @@ kind: Job ...@@ -15,32 +23,88 @@ kind: Job
metadata: metadata:
name: simplejob${OC_JOB_ID} name: simplejob${OC_JOB_ID}
spec: spec:
parallelism: 1 parallelism: 1
completions: 1 completions: 1
backoffLimit: 0 backoffLimit: 0
template: template:
metadata: metadata:
name: testjob name: testjob
spec: spec:
#securityContext:
# supplementalGroups: [1000410000]
# seLinuxOptions:
# level: s0:c25,c10
containers: containers:
- name: simplejob - name: simplejob
image: ${BUILD_ENV_DOCKER_IMAGE} image: ${BUILD_ENV_DOCKER_IMAGE}
imagePullPolicy: Always imagePullPolicy: Always
securityContext: resources:
runAsUser: ${OKD_CLUSTER_UID} limits:
cpu: '8'
memory: '32Gi'
requests:
cpu: '4'
memory: '20Gi'
volumeMounts: volumeMounts:
- name: sharedbin - name: sharedbin
mountPath: /srv mountPath: /srv
command: ["/usr/local/bin/deploy-build-env.sh", "$INSTALLATION_ROOT", "$SPACKIFIED_ENV", "$OP", "$SPACK_ENV_TAR_FILE", "$LAB_KERNEL_PATH"] - name: tmp
mountPath: /tmp
command:
- /bin/bash
- -c
- |
# create root dir if it doesn't exist
mkdir -p \$INSTALLATION_ROOT
# reset spack repository dir by cloning the selected version
if [ ! -d \$EBRAINS_REPO_PATH ]; then git clone ${CI_PROJECT_URL} --recurse-submodules \$EBRAINS_REPO_PATH; fi
cd \$EBRAINS_REPO_PATH
git fetch origin
git reset --hard \$COMMIT_SHA
git submodule update --force
# reset build error log dir (delete previous logs to save space)
rm -rf \$BUILD_LOGS_DIR
mkdir -p \$BUILD_LOGS_DIR
cd \$BUILD_LOGS_DIR
# run installation script
bash \$EBRAINS_REPO_PATH/install_spack_env.sh \$SPACK_JOBS \$INSTALLATION_ROOT \$EBRAINS_REPO_PATH \$EBRAINS_SPACK_ENV "" \$UPDATE_SPACK_OCI_CACHES \$OCI_CACHE_PREFIX
if [ \$? -eq 0 ]
then
# build process succeeded - create or update kernel on the NFS based on the current spack environment
bash \$EBRAINS_REPO_PATH/create_JupyterLab_kernel.sh \$INSTALLATION_ROOT \$EBRAINS_SPACK_ENV \$RELEASE_NAME \$LAB_KERNEL_ROOT && exit 0
else
# build process failed - keep spack build logs and fail the pipeline
cp -r /tmp/spack/spack-stage/* \$BUILD_LOGS_DIR
exit 1
fi
env:
- name: SYSTEMNAME
value: ebrainslab
- name: INSTALLATION_ROOT
value: $INSTALLATION_ROOT
- name: EBRAINS_SPACK_ENV
value: $EBRAINS_SPACK_ENV
- name: UPDATE_SPACK_OCI_CACHES
value: '$UPDATE_SPACK_OCI_CACHES'
- name: OCI_CACHE_PREFIX
value: $OCI_CACHE_PREFIX
- name: COMMIT_SHA
value: $COMMIT_SHA
- name: RELEASE_NAME
value: $RELEASE_NAME
- name: LAB_KERNEL_ROOT
value: $LAB_KERNEL_ROOT
- name: BUILD_LOGS_DIR
value: /srv/build_logs/$EBRAINS_SPACK_ENV
- name: EBRAINS_REPO_PATH
value: $INSTALLATION_ROOT/ebrains-spack-builds
- name: SPACK_JOBS
value: '6'
volumes: volumes:
- name: sharedbin - name: sharedbin
persistentVolumeClaim: persistentVolumeClaim:
claimName: shared-binaries claimName: shared-binaries
- name: tmp
emptyDir: {}
restartPolicy: Never restartPolicy: Never
#nodeSelector:
# kubernetes.io/hostname: okd-worker-3.dev.hbp.eu
EOT EOT
const cmd_key = /Mac/.test(navigator.platform) ? 'Cmd' : 'Ctrl'const edit_actions = [
{
name: 'R Assign',
shortcut: 'Alt--',
icon: 'fa-long-arrow-left',
help: 'R: Inserts the left-assign operator (<-)',
handler(cm) {
cm.replaceSelection(' <- ')
},
},
{
name: 'R Pipe',
shortcut: `Shift-${cmd_key}-M`,
icon: 'fa-angle-right',
help: 'R: Inserts the magrittr pipe operator (%>%)',
handler(cm) {
cm.replaceSelection(' %>% ')
},
},
{
name: 'R Help',
shortcut: 'F1',
icon: 'fa-book',
help: 'R: Shows the manpage for the item under the cursor',
handler(cm, cell) {
const {anchor, head} = cm.findWordAt(cm.getCursor())
const word = cm.getRange(anchor, head)
const callbacks = cell.get_callbacks()
const options = {silent: false, store_history: false, stop_on_error: true}
cell.last_msg_id = cell.notebook.kernel.execute(`help(\`${word}\`)`, callbacks, options)
},
},
]
const prefix = 'irkernel'
function add_edit_shortcut(notebook, actions, keyboard_manager, edit_action) {
const {name, shortcut, icon, help, handler} = edit_action
const action = {
icon, help,
help_index : 'zz',
handler: () => {
const cell = notebook.get_selected_cell()
handler(cell.code_mirror, cell)
},
}
const full_name = actions.register(action, name, prefix)
Jupyter.keyboard_manager.edit_shortcuts.add_shortcut(shortcut, full_name)
}
function render_math(pager, html) {
if (!html) return
const $container = pager.pager_element.find('#pager-container')
$container.find('p[style="text-align: center;"]').map((i, e) =>
e.outerHTML = `\\[${e.querySelector('i').innerHTML}\\]`)
$container.find('i').map((i, e) =>
e.outerHTML = `\\(${e.innerHTML}\\)`)
MathJax.Hub.Queue(['Typeset', MathJax.Hub, $container[0]])
}
define(['base/js/namespace'], ({
notebook,
actions,
keyboard_manager,
pager,
}) => ({
onload() {
edit_actions.forEach(a => add_edit_shortcut(notebook, actions, keyboard_manager, a))
pager.events.on('open_with_text.Pager', (event, {data: {'text/html': html}}) =>
render_math(pager, html))
},
}))
etc/logo-64x64-R.png

14.4 KiB

etc/logo-64x64-python.png

14 KiB

etc/logo-64x64.png

12.3 KiB

#!/bin/bash
# =========================================================================================================================================
# title : install_spack_env.sh
# usage : ./install_spack_env.sh $SPACK_JOBS $INSTALLATION_ROOT $EBRAINS_REPO $EBRAINS_SPACK_ENV $UPSTREAM_INSTANCE \
# $UPDATE_SPACK_OCI_CACHES $OCI_CACHE_PREFIX
# description : installs or updates the spack environment defined in the EBRAINS spack repo
# (if the specified spack instance doesn't exist, it also creates it)
# =========================================================================================================================================
set -eo pipefail
SPACK_JOBS=$1 # number of jobs
INSTALLATION_ROOT=$2 # where to set up the installation
EBRAINS_REPO=$3 # location of ebrains-spack-builds repository
EBRAINS_SPACK_ENV=$4 # name of EBRAINS Spack environment to be created/updated
UPSTREAM_INSTANCE=$5 # path to Spack instance to use as upstream (optional)
UPDATE_SPACK_OCI_CACHES=$6 # "true" enables updating the OCI cache for spack sources and build results
export OCI_CACHE_PREFIX=$7
# make sure spack uses the symlinked folder as path
export CI_SPACK_ROOT=${INSTALLATION_ROOT}/spack
# disable local configuration and cache directories
export SPACK_DISABLE_LOCAL_CONFIG=true
export SPACK_USER_CACHE_PATH=/tmp/spack
# define SYSTEMNAME variable in sites where it's not already defined
export SYSTEMNAME=${SYSTEMNAME:-${HPC_SYSTEM:-$BSC_MACHINE}}
# cache related variables
export CACHE_SPECFILE=${CACHE_SPECFILE:-"env_specfile.yaml"}
export YASHCHIKI_HOME=${EBRAINS_REPO}/vendor/yashchiki
export SPACK_CACHE_SOURCE=${SPACK_CACHE_SOURCE:-${CI_SPACK_ROOT}/var/spack/cache}
export SPACK_CACHE_BUILD=${SPACK_CACHE_BUILD:-${CI_SPACK_ROOT}/var/spack/cache}
if [ ! -d ${INSTALLATION_ROOT} ]; then
mkdir -p ${INSTALLATION_ROOT}
fi
# initial setup: use spack submodule if spack dir doesn't already exist
SPACK_ROOT_EXISTED=1
if [ ! -d ${CI_SPACK_ROOT} ]; then
ln -s ${EBRAINS_REPO}/vendor/spack ${CI_SPACK_ROOT}
SPACK_ROOT_EXISTED=0
fi
# activate Spack
source ${CI_SPACK_ROOT}/share/spack/setup-env.sh
if [[ $UPSTREAM_INSTANCE ]]; then
UPSTREAM_PREFIX=$(find $UPSTREAM_INSTANCE/spack/opt/spack/ -type d -name ".spack-db" 2>/dev/null | xargs -I {} dirname {})
spack config add upstreams:upstream-spack-instance:install_tree:$UPSTREAM_PREFIX
fi
if [ "${SPACK_ROOT_EXISTED}" -eq 0 ]; then
# for caching purposes it's nice if we can relocate into long paths, but we
# can't do that for existing installations -> else path
# ECM (2025-01-23) true seems to yield too large paths for some packages (e.g., gcc)
spack config add config:install_tree:padded_length:128
fi
# add repo if it does not exist
if [[ ! $(spack repo list | grep ebrains-spack-builds$) ]]
then
spack repo add $EBRAINS_REPO
fi
# make sure all fetching/clingo stuff happens before anything else
spack spec aida
# rebuild spack's database (could be an debugging session)
spack reindex
# add local mirror if it does not exist
if [[ ! $(spack mirror list | grep local_cache) ]]; then
# TODO for newer spack versions, add: --autopush --unsigned, drop create cache command below
# (Note: spack expects `build_cache/` below the folder we specify here
spack mirror add local_cache ${SPACK_CACHE_BUILD}
fi
spack compiler find
# create environment if it does not exist
if [ ! -d "${CI_SPACK_ROOT}/var/spack/environments/$EBRAINS_SPACK_ENV" ]
then
spack env create $EBRAINS_SPACK_ENV
fi
# update environment site-configs
rm -rf ${CI_SPACK_ROOT}/var/spack/environments/$EBRAINS_SPACK_ENV/site-config && cp -r $EBRAINS_REPO/site-config ${CI_SPACK_ROOT}/var/spack/environments/$EBRAINS_SPACK_ENV
# update spack.yaml: merge top-level and site-specific spack.yaml files
spack-python $EBRAINS_REPO/site-config/ymerge.py $EBRAINS_REPO/spack.yaml $EBRAINS_REPO/site-config/$SYSTEMNAME/spack.yaml > /tmp/spack.yaml
cp /tmp/spack.yaml ${CI_SPACK_ROOT}/var/spack/environments/$EBRAINS_SPACK_ENV/
# activate environment
spack env activate --without-view $EBRAINS_SPACK_ENV
# deactivate view during concretization and installation
spack env view disable
spack concretize --force --fresh --test root
# dump dag to file
spack spec -y > "${CACHE_SPECFILE}"
if [ -n "${OCI_CACHE_PREFIX}" ]; then
# fetch missing sources (if packages not yet installed)
python3 ${YASHCHIKI_HOME}/fetch_cached_sources.py \
--local-cache=${SPACK_CACHE_SOURCE} \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/source_cache \
--yashchiki-home=${YASHCHIKI_HOME} \
/tmp/missing_paths_sources.dat ${CACHE_SPECFILE}
# fetch missing build results (if packages not yet installed)
python3 ${YASHCHIKI_HOME}/fetch_cached_buildresults.py \
--local-cache=${SPACK_CACHE_BUILD}/build_cache \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/build_cache \
--yashchiki-home=${YASHCHIKI_HOME} \
/tmp/missing_paths_buildresults.dat ${CACHE_SPECFILE}
fi
spack-python -c "exit(not len(spack.environment.active_environment().uninstalled_specs()))" && (
# fetch all sources but delay exit code handling
spack fetch --dependencies --missing && ret=$? || ret=$?;
if [ -n "${OCI_CACHE_PREFIX}" ] && [ "${UPDATE_SPACK_OCI_CACHES:-false}" = "true" ]; then
# push freshly fetched sources to remote cache
echo "Performing update of the source cache"
python3 ${YASHCHIKI_HOME}/update_cached_sources.py \
--local-cache=${SPACK_CACHE_SOURCE} \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/source_cache \
/tmp/missing_paths_sources.dat;
else
echo "Updating of the source cache disabled."
fi
if [ "$ret" -ne 0 ]; then
(exit $ret)
fi
)
if [ -n "${OCI_CACHE_PREFIX}" ]; then
# record the state of installed/uninstalled packages before actually installing them
dag_hashes_pre_install=$(spack-python ${YASHCHIKI_HOME}/specfile_dag_hash.py ${CACHE_SPECFILE})
fi
# install the environment, use 2 jobs to reduce the amount of required RAM
# delay exit code until we have updated the cache below
spack install --no-check-signature -y -j$SPACK_JOBS --fresh --test root && spack_install_ret=$? || spack_install_ret=$?
# re-enable view
spack env view enable
spack env view regenerate
# no need to update the local cache nor the remote cache if we don't want to update
if [ -n "${OCI_CACHE_PREFIX}" ] && [ "${UPDATE_SPACK_OCI_CACHES:-false}" = "true" ]; then
# push previously missing (but now installed) packages to the local cache
for dag_hash in $dag_hashes_pre_install; do
spack buildcache create --unsigned --only package ${SPACK_CACHE_BUILD} /${dag_hash} && ret=$? || ret=$?
if [ $ret -ne 0 ]; then
echo "Failed to push ${dag_hash}, trying to call spack find on it:"
spack find -Lvp /${dag_hash} || true
fi
done
# upload packages from local to remote cache
echo "Performing update of the build cache"
python3 ${YASHCHIKI_HOME}/update_cached_buildresults.py \
--local-cache=${SPACK_CACHE_BUILD}/build_cache \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/build_cache \
/tmp/missing_paths_buildresults.dat
else
echo "Updating of the build cache disabled."
fi
# propagate spack install exit code
if [ $spack_install_ret -ne 0 ]; then
(exit "$spack_install_ret")
fi
# remove local cache content
if [ -d ${SPACK_CACHE_BUILD} ]; then
spack mirror destroy --mirror-name local_cache
fi
# TODO: when using spack remote OCI build caches require an index file
#spack mirror add ebrains oci://docker-registry.ebrains.eu/esd/build_cache
#spack buildcache list -a ebrains && ret=$? || ret=$?
# rebuild spack's database
spack reindex
# create load script that when sourced activates and loads the installed spack environment, using views
# this needs deactivating the environment first:
spack env deactivate
unset SPACK_LD_LIBRARY_PATH
spack env activate --sh $EBRAINS_SPACK_ENV > ${CI_SPACK_ROOT}/var/spack/environments/$EBRAINS_SPACK_ENV/load_env.sh
# create modules files with spack
# spack module tcl refresh -y
# create loads script that when sourced activates and loads the installed spack environment, using modules
# spack env loads -r
#!/bin/bash
#title :load_sim_tools.sh
#description :Script to load simulation software on the Collaboratory Lab containers from the Object Storage at CSCS.
#author :Athanasios Karmas
#date :20210601
#usage :source ./load_sim_tools.sh
#==============================================================================
echo "Setting up environment..."
INSTALLATION_ROOT="test-build"
SPACKIFIED_ENV="ebrains-spack-builds"
cp -r /srv/$INSTALLATION_ROOT/spack/.spack ~
source /srv/$INSTALLATION_ROOT/spack/share/spack/setup-env.sh
cd /srv/$INSTALLATION_ROOT
spack repo add ebrains-spack-builds
spack env activate $SPACKIFIED_ENV
module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-x86_64/
source /srv/$INSTALLATION_ROOT/spack/var/spack/environments/$SPACKIFIED_ENV/loads
echo "Everything ready!"
# ensure compatability with Spack v0.18.0
try:
from spack.package_base import PackageStillNeededError
except:
from spack.package import PackageStillNeededError
needed = set()
# keep packages that are part of an environment
for e in spack.environment.all_environments():
needed.update(e.all_hashes())
# also keep packages that provide compilers (and their dependencies)
for c in spack.compilers.all_compiler_specs():
pkg_spec = spack.compilers.pkg_spec_for_compiler(c)
needed.update([dep.dag_hash() for pkg in spack.store.db.query(pkg_spec) for dep in pkg.traverse()])
installed = {spec.dag_hash(): spec for spec in spack.store.db.query()}
to_remove = set(installed) - needed
# this will try to uninstall ANY package that is not part of an environment
# including test dependencies
# for a list of all the packages that will be uninstalled:
print('The following packages will be uninstalled:')
print('\n'.join(sorted([installed[h].short_spec+' ('+h+')' for h in to_remove])))
# iteratively uninstall packages with no dependents
while to_remove:
# print('New iteration')
for hash in to_remove.copy():
spec = installed[hash]
try:
spec.package.do_uninstall()
to_remove.discard(hash)
except PackageStillNeededError:
pass
# print('Not ready to remove', spec.short_spec, 'in this iteration')