-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpixi.toml
More file actions
79 lines (69 loc) · 2.98 KB
/
pixi.toml
File metadata and controls
79 lines (69 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
[project]
name = "pyelegant"
version = "0.15.2"
description = "Python Interface to the 6D Accelerator Program ELEGANT (ELEctron Generation ANd Tracking)"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-64", "osx-arm64"]
[feature.base.dependencies]
python = "3.12.*"
pip = ">=25.3,<26"
icu = "<78" # cluster compatibility requirements as of 01/21/2026; python breaks otherwise (try importing sqlite3).
[feature.base.pypi-dependencies]
numpy = ">=2.3.2,<3.0"
scipy = ">=1.16.1,<2.0"
matplotlib = ">=3.10,<4.0"
"ruamel.yaml" = ">=0.17,<0.18" # >=0.18 fails at "add_yaml_merge()"
pillow = ">=10.0"
h5py = ">=3.14.0,<4.0"
pydantic = ">=2.12"
python-dotenv = ">=1.0.0"
[feature.jupy.pypi-dependencies]
jupyter = ">=1.1.1"
ipympl = ">=0.9.7"
[feature.parallel.pypi-dependencies]
dill = ">=0.4.0"
qtpy = ">=2.4.3"
# mpi4py 4.x pre-built MPICH backend hardcodes soname libmpi.so.12 (stable MPICH),
# but MPICH 4.3.0b1 (used on the NSLS-II cluster as of 2026-02) uses libmpi.so.0.
# Run "pixi run fix-mpi4py-soname" once after install to create the necessary symlink.
mpi4py = ">=3.1.0"
[feature.genreport.pypi-dependencies]
qtpy = ">=2.4.3"
pylatex = ">=1.4.2"
xlsxwriter = ">=3.2.5"
packaging = ">=25.0"
[feature.all.pypi-dependencies]
jupyter = ">=1.1.1"
ipympl = ">=0.9.7"
dill = ">=0.4.0"
qtpy = ">=2.4.3"
pyqt5 = ">=5.15.10"
pylatex = ">=1.4.2"
xlsxwriter = ">=3.2.5"
packaging = ">=25.0"
# See comment in [feature.parallel.pypi-dependencies] about mpi4py soname issue.
mpi4py = ">=3.1.0"
[feature.dev.pypi-dependencies]
pytest = ">=8.4.1"
pre-commit = "*"
[environments]
default = { features = ["base", "jupy"], no-default-feature = true }
parallel = { features = ["base", "parallel"], no-default-feature = true }
genreport = { features = ["base", "genreport"], no-default-feature = true }
all = { features = ["base", "all"], no-default-feature = true }
dev = { features = ["base", "all", "dev"], no-default-feature = true }
[feature.base.activation]
# Prepend ~/.local/lib to LD_LIBRARY_PATH so mpi4py 4.x can find the libmpi.so.12
# symlink created by "pixi run fix-mpi4py-soname". This also propagates to SLURM
# compute nodes when jobs are submitted from within this pixi shell.
scripts = ["pixi_activation.sh"]
[feature.base.tasks]
install-editable-all = "pip install -e '.[all]'"
install-editable = "pip install -e ."
test = "pytest tests/"
# mpi4py 4.x pre-built MPICH backend hardcodes soname libmpi.so.12 (stable MPICH),
# but MPICH 4.3.0b1 (used on the NSLS-II cluster as of 2026-02) uses libmpi.so.0.
# This task creates a symlink libmpi.so.12 -> libmpi.so.0 in ~/.local/lib.
# ~/.local/lib is added to LD_LIBRARY_PATH by pixi_activation.sh on "pixi shell".
# Run once after install. Requires mpicc in PATH (e.g. via "module load mpich").
fix-mpi4py-soname = "mkdir -p $HOME/.local/lib && ln -sf $(mpicc -show | tr ' ' '\\n' | awk '/^-L/{print substr($0,3);exit}')/libmpi.so.0 $HOME/.local/lib/libmpi.so.12 && python -c 'import mpi4py; from mpi4py import MPI; print(\"mpi4py import OK (mpi4py \" + mpi4py.__version__ + \")\")'"