|
| 1 | +# Configuration Guide for **newSPACKDevArea.sh** |
| 2 | + |
| 3 | +This document explains the configuration options available in the `newSPACKDevArea.env` file, which is used to set up Spack-based SBNDAQ development environments. |
| 4 | + |
| 5 | +## Basic Configuration |
| 6 | + |
| 7 | +| Option | Description | |
| 8 | +|--------|-------------| |
| 9 | +| `DEVNAME` | The developer's initials or short name (4-5 chars, all **UPPER** case) who owns this development environment. Example: `DEVNAME=ALICE` | |
| 10 | + |
| 11 | +## SBNDAQ Suite Configuration |
| 12 | + |
| 13 | +| Option | Description | |
| 14 | +|--------|-------------| |
| 15 | +| `DAQ_PKG_NAME` | The name of the DAQ software suite package (`sbndaq-suite` or `artdaq-suite`). Example: `DAQ_PKG_NAME=sbndaq-suite` | |
| 16 | +| `DAQ_PKG_VERSIONS` | Specifies the versions of the DAQ software suite to be used. Format: `version:qualifier:compiler:standard`. Multiple versions can be specified with a comma separator. Example: `migration_artdaqv3_13_02:s132:gcc13.1.0:c++20` | |
| 17 | +| `DAQ_PKG_SBNENV` | Specifies the SBN environment. Examples: `DAQ_PKG_SBNENV=sbn-fd` or `DAQ_PKG_SBNENV=sbn-nd` | |
| 18 | +| `DAQ_PKG_CHECKOUT_PACKAGES` | Lists packages to be checked out from github, with their respective branches. Format: `package@branch`. Multiple packages can be specified with commas. Example: `sbndaq@upgrade_gcc13.1.0,sbndaq-artdaq@upgrade_gcc13.1.0` | |
| 19 | + |
| 20 | +## Spack Configuration |
| 21 | + |
| 22 | +| Option | Description | |
| 23 | +|--------|-------------| |
| 24 | +| `SPACK_SOFTWARE_BASE` | Base directory for all Spack-related software. Example: `/daq/software` | |
| 25 | +| `SPACK_DIR` | Location of the Spack installation. Usually defined as `${SPACK_SOFTWARE_BASE}/spack_packages/spack` | |
| 26 | +| `SPACK_VERSION` | Version of Spack being used. Example: `v1.0.1.sbnd` | |
| 27 | +| `SPACK_MIRROR_BASE` | Location of Spack binary package mirrors. Usually defined as `${SPACK_SOFTWARE_BASE}/spack_mirrors/${DAQ_PKG_NAME}` | |
| 28 | +| `SPACK_DAQ_AREAS` | Directory where SBNDAQ development areas will be created. Example: `${HOME}/DAQ_SPACK_DevAreas` | |
| 29 | +| `SPACK_PACKAGES_TOP` | Top-level directory for installed Spack packages. Example: `${SPACK_SOFTWARE_BASE}/spack_packages` | |
| 30 | +| `SPACK_USE_USER_CONFIG` | Enables the use of user-specific Spack configuration. Set to `true` or `false` | |
| 31 | + |
| 32 | +## Build Options |
| 33 | + |
| 34 | +| Option | Description | |
| 35 | +|--------|-------------| |
| 36 | +| `RUN_BUILD` | Enables the automatic build process when setting up the environment. Set to `true` or `false` | |
| 37 | +| `BUILD_THREADS` | Number of parallel build threads to use. Example: `8` | |
| 38 | +| `DEBUG_BUILD` | Enables or disables debug information in the build. Set to `true` or `false` | |
| 39 | +| `ENABLE_TESTS` | Enables or disables building and running tests. Set to `true` or `false` | |
| 40 | +| `ENABLE_GIT_PUSH` | Allows changes to be pushed back to the git repositories. Set to `true` or `false` | |
| 41 | + |
| 42 | +## Access Control |
| 43 | + |
| 44 | +| Option | Description | |
| 45 | +|--------|-------------| |
| 46 | +| `ALLOW_HOSTS` | Restricts execution to specific host machines. Multiple hosts can be specified with commas. Example: `vm-60,vm-51` | |
| 47 | +| `ALLOW_USERS` | Restricts execution to specific users. Multiple users can be specified with commas. Example: `artdaq,icarus,sbnd` | |
| 48 | + |
| 49 | +## Example Configuration |
| 50 | + |
| 51 | +```bash |
| 52 | +DEVNAME=ALICE |
| 53 | +# DAQ suite configuration |
| 54 | +DAQ_PKG_NAME=sbndaq-suite |
| 55 | +DAQ_PKG_VERSIONS=migration_artdaqv3_13_02:s132:gcc13.1.0:c++20,migration_artdaqv3_13_02:s131:gcc13.1.0:c++20 |
| 56 | +DAQ_PKG_SBNENV=sbn-fd,sbn-nd |
| 57 | +DAQ_PKG_CHECKOUT_PACKAGES=sbndaq@upgrade_gcc13.1.0,sbndaq-artdaq@upgrade_gcc13.1.0,sbndaq-artdaq-core@upgrade_gcc13.1.0 |
| 58 | + |
| 59 | +# Spack configuration |
| 60 | +SPACK_SOFTWARE_BASE=/daq/software |
| 61 | +SPACK_DIR=${SPACK_SOFTWARE_BASE}/spack_packages/spack |
| 62 | +SPACK_VERSION=v1.0.1.sbnd |
| 63 | +SPACK_MIRROR_BASE=${SPACK_SOFTWARE_BASE}/spack_mirrors/${DAQ_PKG_NAME} |
| 64 | +SPACK_DAQ_AREAS=${HOME}/DAQ_SPACK_DevAreas |
| 65 | +SPACK_PACKAGES_TOP=${SPACK_SOFTWARE_BASE}/spack_packages |
| 66 | +SPACK_USE_USER_CONFIG=true |
| 67 | + |
| 68 | +# Build options |
| 69 | +RUN_BUILD=true |
| 70 | +BUILD_THREADS=8 |
| 71 | +DEBUG_BUILD=false |
| 72 | +ENABLE_TESTS=false |
| 73 | +ENABLE_GIT_PUSH=true |
| 74 | +ALLOW_HOSTS=vm-60,vm-51 |
| 75 | +ALLOW_USERS=artdaq,icarus,sbnd |
| 76 | +``` |
0 commit comments