-
Notifications
You must be signed in to change notification settings - Fork 52
Traverse @ Princeton
Bharat Medasani edited this page Mar 1, 2023
·
6 revisions
Traverse has a low-endian PowerPC64 architecture. Since Github runners don't have the required hardware, we can not release the PPC64 wheels and containers along with those of X86_64 and M1. We hope this will serve you a guide for installing simsopt on other PowerPC64 machines.
- Set up the environment based on conda. To do that load modules for anaconda.
module load anaconda3/2022.5
- Create a conda virtual environment with python 3.9. Here we use
simsopt
as the name for the virtual environment.conda create -n simsopt python=3.9
- Before installing packages, load the compilers.
module load openmpi/cuda-11.0/gcc/4.0.4/64
- To minimize package mismatches with conda, we will try to install many of the dependencies from conda instead of from pip.
If you can not install any of these packages from conda, try pip later.
conda install numpy scipy Deprecated nptyping monty ruamel.yaml sympy f90nml randomgen pyevtk matplotlib
- We need other packages such as
JAX
andmpi4py
, which we can install only from pip or manually. There is a conda package formpi4py
, but don't use it. Installingmpi4py
from conda installs MPI compilers that clash with system MPI.pip install --no-cache-dir mpi4py
- Jaxlib, which is a dependency for Jax can only be installed manually on PowerPC. The version is also not the latest, but an older one released in 2021. We also need to load CUDA modules for Jaxlib.
Download jax source code
module load cudatoolkit/11.1 cudnn/cuda-11.1/8.0.4
git clone https://github.com/google/jax.git cd jax python build/build.py --enable_cuda --cuda_path /usr/local/cuda-11.1 --cuda_version=11.1 --cudnn_version=8.0.4 --cudnn_path /usr/local/cudnn/cuda-11.1/8.0.4 --noenable_mkl_dnn --bazel_path /usr/bin/bazel --target_cpu=ppc pip install dist/*.whl pip install .
- Now is the time to install simsopt. Download the source code and use pip to compile and install the package.
Apply the patch (TODO: Link to the patch and the instruction for patch application)
git clone https://github.com/hiddensymmetries/simsopt.git cd simsopt
pip install .