Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perlmutter installers #368

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
69 changes: 69 additions & 0 deletions bin/environment-perlmutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
channels:
- conda-forge
dependencies:
- astropy=6.1.*
- camb=1.5.*
- cosmosis=3.7.*
- cmake
- dask=2024.5.2
- dm-tree=0.1.8
- fitsio=1.2.*
- h5py>=3=mpi_mpich_*
- healpy=1.16.*
- healsparse=1.10.*
- jax=0.4.27
- jaxlib=0.4.23
- jupyter=1.0.*
- matplotlib=3.8.*
- mpi4py>=3
- mpich=*=external_*
- namaster=2.0.*
- numpy=1.26.*
- pandas>=2.0
- psutil=5.9.*
- pyccl=3.0.*
- python=3.10.*
- scikit-learn=1.5.*
- scipy=1.13.*
- tables-io-full=0.9.*
- threadpoolctl=3.5.*
- tjpcov=0.4.*
- treecorr=5.0.*
- pip=24.0.*
- pygraphviz=1.13.*
- nbconvert
- ipykernel
- lsstdesc-gcr-catalogs
- guppy3
- lsstdesc-dc2-dm-data
- psycopg2
- pyarrow
- pytables
- somoclu
- pip:
- ceci==2.0.1
- git+https://github.com/jlvdb/hyperbolic@b88b107a291fa16c2006cf971ce610248d58e94c
- dask-mpi>=2022.4.0
- git+https://github.com/LSSTDESC/[email protected]
- parallel-statistics==0.13
- sacc[all]==0.14
- jax==0.4.27
- jaxlib==0.4.23
- glass==2023.7
- git+https://github.com/beckermr/hybrideb@a3198ea5bc8175542b058e5c1289d910f05fd99d
# we must specifically request versions of rail algorithms
# to ensure that we get the ceci v2 versions
- pz-rail[algos] @ git+https://github.com/LSSTDESC/[email protected]
- pz-rail-astro-tools==1.0.4
- pz-rail-base==1.0.4
- pz-rail-bpz==1.0.1
- pz-rail-cmnn==1.0.1
- pz-rail-dsps==0.0.3 # no pypi release for more than 0.3
- pz-rail-flexzboost==1.0.1
- pz-rail-fsps==1.0.1
- pz-rail-gpz-v1==1.0.2
- pz-rail-lephare==0.2 # no release for ceci2 yet - cannot use
- pz-rail-pzflow==1.0.1
- pz-rail-sklearn==1.0.1
- pz-rail-som==1.0.1
- qp-prob==0.9.1
8 changes: 8 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ fi

# Figure out operating system details

if [ ${NERSC_HOST} == "perlmutter" ]
then
echo "Installing on Perlmutter using specialised script"
./bin/perlmutter-install.sh
exit
fi


INSTALLER_VERSION=24.3.0-0

export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
Expand Down
50 changes: 50 additions & 0 deletions bin/perlmutter-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

set -e

ENV_PATH=./conda

module load python

conda create --yes -p ${ENV_PATH} python=3.10
conda activate ${ENV_PATH}
module swap PrgEnv-${PE_ENV,,} PrgEnv-gnu
MPICC="cc -shared" pip install --force-reinstall --no-cache-dir --no-binary=mpi4py mpi4py -vv

# Okay, this is a terrible thing we're doing now.
# If I install the TX environment then it breaks something, somewhere
# in the compilation of mpi4py. So we are going to copy it out somewhere else,
# let conda overwrite it, and then replace it again
BACKUP_DIR=mpi4py-tmp-${RANDOM}
mkdir ${BACKUP_DIR}
mv ${ENV_PATH}/lib/python3.10/site-packages/mpi4py* ${BACKUP_DIR}/

# Install all the TXPipe dependencies. This is the same as the main installer
# except with FireCrown removed.
mamba env update --file bin/environment-perlmutter.yml

# Now we put mpi4py back manually. May God forgive me.
mamba remove --force --yes mpi4py
cp -r ${BACKUP_DIR}/* ${ENV_PATH}/lib/python3.10/site-packages/
rm -rf ${BACKUP_DIR}

# we manually install firecrown as we have to remove numcosmo to avoid clashes
FIRECROWN_DIR=firecrown-tmp-${RANDOM}
git clone --branch v1.7.5 https://github.com/LSSTDESC/firecrown ${FIRECROWN_DIR}
cd ${FIRECROWN_DIR}
sed -i '/numcosmo/d' setup.cfg
pip install .
cd ..
rm -rf ${FIRECROWN_DIR}

# Add some things that are set up automatically
cat > ./conda/etc/conda/activate.d/activate-txpipe.sh <<EOF
module load cray-mpich-abi
export MPI4PY_RC_RECV_MPROBE='False'
export HDF5_USE_FILE_LOCKING=FALSE
EOF

echo ""
echo "Installation successful!"
echo "Now you can set up your TXPipe environment using the command:"
echo "source ./conda/bin/activate"
Loading