From b9a4691c5d04d637f7c2843697291b0657581cf8 Mon Sep 17 00:00:00 2001 From: "Benedikt J. Daurer" Date: Wed, 12 Jun 2024 06:50:46 -0700 Subject: [PATCH] Added setup/installation instructions for NERSC --- scripts/install_ptypy_env_at_nersc.md | 47 +++++++++++++++++++++++++++ scripts/ptypy_workhsop_setup.sh | 10 ++++++ 2 files changed, 57 insertions(+) create mode 100644 scripts/install_ptypy_env_at_nersc.md create mode 100755 scripts/ptypy_workhsop_setup.sh diff --git a/scripts/install_ptypy_env_at_nersc.md b/scripts/install_ptypy_env_at_nersc.md new file mode 100644 index 0000000..8179c20 --- /dev/null +++ b/scripts/install_ptypy_env_at_nersc.md @@ -0,0 +1,47 @@ +First, clone the nersc conda env + +``` +conda create --prefix /global/common/software/ntrain7/ptypy_env --clone /global/common/software/nersc/pm-2022q3/sw/python/3.9-anaconda-2021.11 +``` + +Activate the new conda env + +``` +conda activate /global/common/software/ntrain7/ptypy_env +``` + +Add additional packages that we need for ptypy with cupy + +``` +conda install -c conda-forge pyfftw cupy +``` + +Add additional packages that we need for ptypy with pycuda +``` +conda install -c nvidia cuda-nvcc cuda-cudart-dev +conda install -c conda-forge reikna pycuda +``` + +Add additional packages for cufft +``` +conda install -c nvidia libcufft-dev libcufft-static +conda install -c conda-forge cmake>=3.8.0 pybind11 +``` + +Install Ptypy +``` +git clone https://github.com/ptycho/ptypy.git +pip install . + +``` + +Install cufft +``` +cd cufft +pip install . +``` + +Add kernel to user settings +``` +python -m ipykernel install --user --name ptypy_env --display-name PtyPy +``` diff --git a/scripts/ptypy_workhsop_setup.sh b/scripts/ptypy_workhsop_setup.sh new file mode 100755 index 0000000..e3a1a56 --- /dev/null +++ b/scripts/ptypy_workhsop_setup.sh @@ -0,0 +1,10 @@ +# Last time we used this script: /global/common/software/ntrain3/ptypy_workshop_setup.sh +# This script should be copied into /global/common/software/ntrain7/ +module load conda +conda activate /global/common/software/ntrain7/ptypy_env +#conda activate $HOME/ptypy_env +python -m ipykernel install --user --name ptypy_env --display-name PtyPy + +# Clone tutorials and create link to data +git clone https://github.com/ptycho/tutorials.git $HOME/tutorials +ln -s /global/cfs/cdirs/ntrain7/ptypy_workshop $HOME/tutorials/data