environment
Functions containing more complex logic for Task environment configuration.
Functions:
| Name | Description |
|---|---|
setup_smd2_env |
Sets up psana2 environment variables. |
setup_glint_env |
GLINT's torch environment (ana-4.0.58-py3-minipytorch) and checkout. |
setup_glint_env_ana59 |
The same in ana-4.0.59-py3-minipytorch. |
GLINT_ANA_ENV = 'ana-4.0.58-py3-minipytorch'
module-attribute
Default GLINT environment: torch 2.1. Cannot parse Jungfrau.ConfigV4 (see GLINT_ANA_ENV_ALT).
GLINT_ANA_ENV_ALT = 'ana-4.0.59-py3-minipytorch'
module-attribute
torch 1.11; reads the detector ConfigV versions 4.0.58 cannot. Same GLINT code runs on both.
_glint_env(conda_env)
Environment of the GLINT ThirdPartyTask, on top of conda1's psconda.sh (shell_source).
What conda activate <conda_env> adds to psconda.sh on S3DF (measured 2026-10-09) is PATH,
CUDA_PATH (cupy's activate hook) and the two CONDA_ markers; SIT_* come from psconda.sh. PYTHONPATH
is the GLINT root alone: the interpreter here is the environment's python 3.9 with torch, and must
not inherit the Executor's own site-packages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conda_env
|
str
|
Name of the conda1 environment. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
env |
Dict[str, str]
|
Environment variables for the Task. |
Source code in lute/tasks/util/environment.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |
setup_glint_env()
GLINT in its default environment, GLINT_ANA_ENV. See _glint_env.
Source code in lute/tasks/util/environment.py
177 178 179 | |
setup_glint_env_ana59()
GLINT in GLINT_ANA_ENV_ALT, for detectors whose ConfigV the default cannot read.
Source code in lute/tasks/util/environment.py
182 183 184 | |
setup_smd2_env()
Setup environment variables smalldata_tools uses with psana2.
Tries to setup psana2 environment variables controlling the distribution of SRV, BD, and EB ranks automatically based on the SLURM allocation. If run without SLURM, it sets all relevant variables to 1. If the environment variables were intentionally set it will return those values instead.
It will also write a host file to specify mpi slots to make sure rank 0 is on the first node.
Returns:
| Name | Type | Description |
|---|---|---|
psana_vars |
Dict[str, str]
|
Dictionary of relevant psana environment variables. |
Source code in lute/tasks/util/environment.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |